Skip to content

docs: Document Custom Dashboards feature for AI-powered data visualization#1279

Open
promptless[bot] wants to merge 1 commit intodevfrom
promptless/document-custom-dashboards
Open

docs: Document Custom Dashboards feature for AI-powered data visualization#1279
promptless[bot] wants to merge 1 commit intodevfrom
promptless/document-custom-dashboards

Conversation

@promptless
Copy link
Copy Markdown
Contributor

@promptless promptless bot commented Mar 23, 2026

Open this suggestion in Promptless to view citations and reasoning process

Adds documentation for the new Custom Dashboards feature from PR #1243. Documents how to create dashboards using natural language prompts, available features (metric cards, charts, tables, navigation), editing workflows, and automatic saving. Updates the Analytics overview, diagram, and best practices to include dashboards.

Trigger Events

stack-auth/stack-auth commit (dev): 8267ebc Custom dashboards and unified ai no playground (#1243)

Promptless Research (5 files, 1 GitHub PR)

  • Reviewed stack-auth/stack-auth#1243
  • Viewed .long_term_context/product_knowledge/product_overview.md
  • Viewed .long_term_context/doc_workflow/client_instructions.md
  • Viewed .long_term_context/style/client_style_guide.md
  • Viewed docs/content/docs/(guides)/apps/analytics.mdx
  • Viewed docs/content/docs/(guides)/meta.json

Agent Response

I've reviewed PR #1243 ("Custom dashboards and unified ai no playground") and created documentation for the new Custom Dashboards feature.

Summary

PR #1243 contains two main changes:

  1. Unified AI Endpoint - An internal architectural change that consolidates AI calls across the codebase (email drafts, templates, docs AI, command center search). This is backend infrastructure and doesn't require user-facing documentation.

  2. Custom Dashboards - A new user-facing feature that allows users to create personalized data visualizations using natural language prompts in the Stack Auth dashboard.

Documentation Updates

I created a suggestion that updates the Analytics documentation (analytics.mdx) to include the Custom Dashboards feature:

  • Overview section: Updated to mention Dashboards as a fourth area (alongside Tables, Queries, and Replays)
  • Mermaid diagram: Added "Custom dashboards" as a data destination
  • New "Custom Dashboards" section: Documents how to create dashboards using natural language, available features (metric cards, charts, tables, navigation), editing workflows, and automatic saving
  • Best Practices: Added a new tip about using custom dashboards for quick visualizations

The documentation follows the existing style and structure of the Analytics page.


Tip: Sort by Shortest Review in the Dashboard to find quick wins ⚡


`maskAllInputs` defaults to `true`, so form fields are masked unless you explicitly disable it.

## Custom Dashboards
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: Custom Dashboards feature introduced in this PR. Based on the implementation in apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/dashboards/ and the AI prompts in apps/backend/src/lib/ai/prompts.ts which describe the dashboard creation workflow with metric cards, charts, tables, and navigation capabilities.
View source

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-auth-hosted-components Ready Ready Preview, Comment Mar 23, 2026 3:08pm
stack-backend Ready Ready Preview, Comment Mar 23, 2026 3:08pm
stack-dashboard Ready Ready Preview, Comment Mar 23, 2026 3:08pm
stack-demo Ready Ready Preview, Comment Mar 23, 2026 3:08pm
stack-docs Ready Ready Preview, Comment Mar 23, 2026 3:08pm

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 23, 2026

Greptile Summary

This PR documents the new Custom Dashboards feature introduced in PR #1243, updating analytics.mdx to add a new section covering creation, features, and editing of AI-generated dashboards, along with minor updates to the overview bullet list, Mermaid diagram, and Best Practices.

However, cross-referencing the documentation against the actual implementation in apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/dashboards/ reveals three factual inaccuracies that should be fixed before merging:

  • Auto-save claim is wrong: The docs state "Dashboards are automatically saved to your project," but the implementation uses an explicit Save button that only appears when hasUnsavedChanges is true — there is no auto-save mechanism.
  • "Edit" / "Done" buttons don't exist as described: The editing steps reference a standalone Edit button and a Done button; neither exists as a fixed element in the outer dashboard UI. The chat panel toggle is wired through window.dashboardEdit() inside the AI-generated sandbox, and closing the panel uses an X icon, not a "Done" action.
  • Creation flow is missing the name step: Clicking New Dashboard opens a FormDialog requiring the user to enter a name before the dashboard is created and navigation occurs. This required step is absent from the documented creation workflow.

Confidence Score: 2/5

  • The PR should not be merged as-is — it contains multiple factual inaccuracies about the actual dashboard UI that will mislead users.
  • All three issues are P1 logic errors that directly contradict the real implementation: the auto-save claim, missing creation step, and non-existent Edit/Done buttons. Users following these docs will be confused when the UI doesn't match. Fixes are straightforward — the score reflects that meaningful corrections are needed before this docs page ships.
  • docs/content/docs/(guides)/apps/analytics.mdx — the Custom Dashboards section has three inaccurate descriptions of the actual UI workflow.

Important Files Changed

Filename Overview
docs/content/docs/(guides)/apps/analytics.mdx Adds Custom Dashboards documentation, but contains three factual inaccuracies relative to the actual implementation: dashboards are not auto-saved (require an explicit Save click), the "Edit" and "Done" buttons referenced in the editing steps do not exist as described in the outer UI, and the creation flow is missing the required name-entry step in the FormDialog.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User visits Dashboards page] --> B{Existing dashboards?}
    B -- No --> C[Click New Dashboard]
    B -- Yes --> G[Select existing dashboard]
    C --> D[Enter dashboard name in FormDialog]
    D --> E[Navigate to dashboard detail page]
    E --> F[Chat panel opens automatically]
    F --> H[User describes desired visualization in chat]
    H --> I[AI generates TSX dashboard code]
    I --> J[Dashboard renders in sandbox iframe]
    J --> K{Unsaved changes?}
    K -- Yes --> L[Save button appears in chat header]
    L --> M[User clicks Save → persisted to project config]
    K -- No --> N[Close chat panel with X]
    G --> O[Chat panel closed by default]
    O --> P[AI-generated Edit button inside sandbox calls dashboardEdit]
    P --> F
Loading

Reviews (1): Last reviewed commit: "Document Custom Dashboards feature for A..." | Re-trigger Greptile

4. The AI updates the dashboard while preserving parts you didn't change
5. Click **Done** when finished

Dashboards are automatically saved to your project. View and manage all saved dashboards from the **Dashboards** page.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Dashboards are not automatically saved

The documentation states "Dashboards are automatically saved to your project," but the actual implementation requires an explicit save action. In [dashboardId]/page-client.tsx, the hasUnsavedChanges flag tracks unsaved state and a Save button (FloppyDiskIcon) only appears in the chat panel header when there are unsaved changes. There is no useEffect or other mechanism for auto-saving — handleSaveDashboard is only triggered by the user clicking Save.

Suggested change
Dashboards are automatically saved to your project. View and manage all saved dashboards from the **Dashboards** page.
Dashboards must be saved manually. When changes are pending, a **Save** button appears in the chat panel header — click it to persist your dashboard. View and manage all saved dashboards from the **Dashboards** page.

Comment on lines +138 to +143
1. Open the dashboard you want to edit
2. Click the **Edit** button
3. Describe your changes in the chat panel (e.g., "Add a pie chart showing user distribution by country")
4. The AI updates the dashboard while preserving parts you didn't change
5. Click **Done** when finished

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 "Edit" and "Done" buttons do not exist as described

The editing steps reference clicking an Edit button (step 2) and a Done button (step 5), but neither exists as a fixed UI element in the dashboard detail page. Looking at [dashboardId]/page-client.tsx:

  • The chat panel opens automatically for new, empty dashboards (via useState(!hasSource)) and can be toggled via handleEditToggle, which is wired through window.dashboardEdit() inside the AI-generated sandbox — it is not a standalone button in the outer dashboard UI.
  • There is no Done button anywhere. Users close the chat panel with the X icon, and must separately click Save if there are unsaved changes.

The steps should be updated to reflect the actual interaction model:

Suggested change
1. Open the dashboard you want to edit
2. Click the **Edit** button
3. Describe your changes in the chat panel (e.g., "Add a pie chart showing user distribution by country")
4. The AI updates the dashboard while preserving parts you didn't change
5. Click **Done** when finished
1. Open the dashboard you want to edit
2. Click **Edit** within the dashboard (or reopen the chat panel using the **X** toggle) to show the chat panel
3. Describe your changes in the chat panel (e.g., "Add a pie chart showing user distribution by country")
4. The AI updates the dashboard while preserving parts you didn't change
5. Click **Save** in the chat panel header to persist your changes, then close the panel with **X**

Comment on lines +122 to +125
1. Go to **Dashboards** in the sidebar
2. Click **New Dashboard** or use the command palette (Cmd+K / Ctrl+K)
3. Describe what you want to visualize (e.g., "Show me user signups over the last 30 days with a breakdown by authentication method")
4. The AI generates an interactive dashboard
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing dashboard name step in creation flow

The documented creation flow skips a required step. In page-client.tsx, clicking New Dashboard opens a FormDialog that prompts for a dashboard name (name: yup.string().defined().min(1, "Name is required")). Only after entering a name is the dashboard created and the user navigated to the detail page. The current step 3 ("Describe what you want to visualize") actually happens on the subsequent detail page, not in a prompt during creation.

Suggested change
1. Go to **Dashboards** in the sidebar
2. Click **New Dashboard** or use the command palette (Cmd+K / Ctrl+K)
3. Describe what you want to visualize (e.g., "Show me user signups over the last 30 days with a breakdown by authentication method")
4. The AI generates an interactive dashboard
1. Go to **Dashboards** in the sidebar
2. Click **New Dashboard** (or use the command palette with Cmd+K / Ctrl+K)
3. Enter a name for your dashboard and click **Create**
4. Describe what you want to visualize in the chat panel that opens (e.g., "Show me user signups over the last 30 days with a breakdown by authentication method")
5. The AI generates an interactive dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant