Skip to content

feat(dashboards): embed live dashboard panels in markdown - #8527

Merged
TheodoreSpeaks merged 5 commits into
stagingfrom
feat/dashboard-embeds
Oct 1, 2026
Merged

TheodoreSpeaks merged 5 commits into
stagingfrom
feat/dashboard-embeds

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • ```dashboard fences in markdown files render live dashboard panels (stat, chart, table, row), using the same YAML grammar as dashboards minus text/tabs
  • embeds show their range as a muted caption; drag-to-zoom is temporary with a Reset link, and relative ranges refresh every minute while visible
  • placeholder while Sim is still streaming the doc, and on public share links (no queries without a workspace session)
  • /chart slash command inserts a starter fence
  • dashboards and embeds: time accepts fixed {from, to} instants as well as presets
  • highlights (shaded time bands or single-instant lines) and per-chart thresholds (reference lines), coloured from theme tokens via neutral | error | info tones; marks draw under the data, labels above it
  • range/zoom/refresh logic moved into a shared useDashboardTime hook used by both the dashboard page and embeds

Type of Change

  • New feature

Testing

Tested manually against live table data in a markdown file. bun run lint, bun run check:audits, bun run type-check, and unit tests for the embed parser, fixed ranges, highlights, and thresholds pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 1, 2026 6:31pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Adds live dashboard panels embedded in markdown documents.

The PR appears safe to merge; duplicate requests for identical fixed-range embeds are a non-blocking performance cost.

Findings

  1. P2 Duplicate analytics requests ▶

Summary

The PR renders dashboard YAML fences as live markdown panels and adds fixed ranges, chart annotations, and shared time handling.

  • The latest changes re-key panel queries to refresh fixed ranges without invalidating other views.
  • Fixed-range embeds with identical queries consequently lose initial-request deduplication.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A["Markdown dashboard fence"] --> B["useDashboardTime: per-embed now"]
  B --> C["DashboardPanel"]
  C --> D["Analytics key: table + body + refreshedAt"]
  D --> E["Analytics request"]
Loading

Reviews (3) · Last reviewed commit: "fix(dashboards): scope live refresh to e..."

Comment thread apps/sim/lib/charts/annotations.ts
Comment thread apps/sim/lib/charts/annotations.ts Outdated
Comment thread apps/sim/components/dashboards/use-dashboard-time.ts Outdated
Comment thread apps/sim/components/dashboards/use-dashboard-time.ts Outdated
Comment thread apps/sim/components/dashboards/use-dashboard-time.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

Review completed against the latest diff

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread apps/sim/lib/charts/annotations.ts
Comment thread apps/sim/components/dashboards/use-dashboard-time.ts
Comment thread apps/sim/components/dashboards/dashboard-embed.tsx Outdated
Comment thread apps/sim/lib/charts/annotations.ts Outdated
Comment thread apps/sim/components/dashboards/use-dashboard-time.ts Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/components/dashboards/use-dashboard-time.ts Outdated
Comment thread apps/sim/components/dashboards/use-dashboard-time.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 25 files

Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread apps/sim/components/dashboards/use-dashboard-time.ts Outdated
Comment thread apps/sim/lib/charts/annotations.ts
Comment thread apps/sim/lib/charts/annotations.ts
Comment thread apps/sim/components/dashboards/use-dashboard-time.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@TheodoreSpeaks I have started the AI code review. It will take a few minutes to complete.

Comment thread apps/sim/hooks/queries/table-analytics.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

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.

No issues found across 28 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@TheodoreSpeaks
TheodoreSpeaks merged commit 4d51401 into staging Oct 1, 2026
32 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the feat/dashboard-embeds branch October 1, 2026 18:55

This branch was previously deployed

1 inactive deployment
Preview — 2b0d291b Deployed Oct 1, 2026 by vercel[bot]
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