Skip to content

feat(dashboards): add table-backed dashboard resources - #8305

Draft
TheodoreSpeaks wants to merge 4 commits into
stagingfrom
codex/research-sim-dashboards
Draft

TheodoreSpeaks wants to merge 4 commits into
stagingfrom
codex/research-sim-dashboards

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds dashboards as a workspace resource with their own navigation, folders, resource tabs, and Mothership tools. Dashboard YAML selects authorized table queries and lays out metrics, ECharts charts, tables, text, and tabs; aggregation runs on the server with bounded results and timeouts.

Companion: https://github.com/simstudioai/mothership/pull/531

  • Adds shared time-range and timezone controls, drag-to-select ranges, synchronized hover values, floating tooltips, responsive layout, muted EMCN styling, and animated numeric metrics.
  • Adds conditional percentage aggregates using the existing table filter grammar. Percentages use all rows in the scoped group as the denominator; empty populations remain null, and tables no longer need 100/0 helper columns.
  • Reuses file storage and versioning while hiding the backing extension. Updates require an expected revision; dashboard and folder operations use the shared authorization boundary.
  • Separates file discovery (listed / unlisted) from storage/ownership context. Files listings, Mothership file inventory, pickers, and search filter in SQL before pagination. Chat uploads and new dashboard definitions are unlisted; dashboards have their own listing API. Explicit references retain existing authorization, and copies preserve discovery.
  • Gates dashboards behind the default-off runtime flag, with global and organization targeting. UI, APIs, analytics, and authoring availability are gated; local development can use DASHBOARDS=true.

Type of Change

  • New feature

Testing

  • Dashboard implementation: 264 focused Sim tests and 6 numeric-animation tests passed, including real PostgreSQL analytics checks. Two CLI-adapter tests timed out in the parallel run; their complete 28-test suite passed unchanged when rerun alone.
  • Discovery follow-up: 70 PostgreSQL integration checks and 76 focused unit tests pass. One optional search benchmark is skipped. Integration coverage includes migration replay, legacy upload writers, unchanged content revisions, pagination, explicit chat references, and stale search builds. The search suite required a UTF-8 disposable database; the initial SQL_ASCII test database could not run its Unicode cases.
  • Conditional percentage follow-up: 10 real PostgreSQL integration tests and 42 focused unit/component tests pass, covering scoped denominators, grouping, nested conditions, empty populations, and parameterized values. Verified the live demo computes 198/300 as 66%.
  • All 49 repository audits and 26 lint tasks pass. Migration safety passes against staging.
  • Applied the additive migration locally and verified the full dashboard still renders. Mothership's picker shows the dashboard under Dashboards and excludes its backing file from Files.
  • Typechecking was explicitly skipped at the reviewer's request.

Review the shared chart renderer, table aggregate semantics, discovery lifecycle, and rollout gates. Idle chart summaries describe plotted buckets; an average of bucket percentages is not a weighted overall rate. Independent panels share time bounds, not a database snapshot.

Rollout and scope

This draft targets staging. Migration 0384_dashboard_folders adds dashboard to the existing folder resource enum; it creates no new table. Migration 0385_file_discovery adds the defaulted discovery column, updates search-index eligibility, and installs a temporary bridge for old upload writers. Script migration 0025_backfill_file_discovery classifies existing non-workspace uploads in idempotent pages of 1,000 without rewriting content or ownership. There is no dashboard backfill because dashboards have not shipped. A documented follow-up removes the bridge once discovery-aware writers are fully deployed.

The companion Mothership change adds dashboard CLI authoring and persists per-turn rollout availability. Apply both repositories' additive migrations and deploy the worker before enabling dashboards. The discovery follow-up needs no separate worker change because its file inventory uses the shared Sim application operations.

No merge or deployment is included. Public sharing, log queries, and a tool for inspecting the user's displayed data remain deferred. Local research artifacts and workspace data are excluded.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing, with environment and timeout reruns noted above
  • 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 Sep 25, 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 Sep 25, 2026 9:36pm UTC

Request Review

@github-actions github-actions Bot added the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Sep 25, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Cross-repo companion check

One or more companion PRs aren't merged into staging yet. Merging this without them will leave copilot and sim out of sync — merge them in lockstep.

  • ❌ simstudioai/mothership#531 — OPEN, not merged (targets staging) — feat(dashboards): add gated dashboard resource authoring

This branch was previously deployed

1 inactive deployment
Preview — f894b9ea Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant