Skip to content

Optimize slow dashboard pages and simplify Model routing - #19015

Merged
pelikhan merged 3 commits into
mainfrom
pelikhan-dashboard-performance-review
Oct 20, 2026
Merged

pelikhan merged 3 commits into
mainfrom
pelikhan-dashboard-performance-review

Conversation

@pelikhan

@pelikhan pelikhan commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Collects all five performance workstreams into one PR covering six slow pages: Repository overview, Campaigns, Campaign repositories, Domain runs, Model routing run detail, and Campaign workflows. Also integrates the reviewed Model routing overview reduction from 24 views to five in #19014.

  • Repository overview and Campaigns share JSON query-binding: page: one abort-scoped canonical subscription and request-local dependency DAG, not competing worker result caches. Preserve presentation modes, phase/backend-eligible previews, independent pagination/continuation compilation scope, refresh and cleanup.
  • Campaign topology and execution inventory share JSON campaign-workflow-declarations. Preserve raw identity and inactive/unknown declarations; keep execution/import quality separate, and remove redundant role filtering.
  • Domain runs declares a bounded view source in JSON. Generic, proven string-equality index seeks avoid returning the raw domain collection.
  • Routing run identities, composite relationships, joins, ordering and bounds remain JSON-authored. Generic partition/lineage execution uses existing byRun reads, preserving authored semantic limits and cross-run evidence.
  • Campaign workflow quality uses declarative retained-source counts and fail-closed unavailable-input handling. Remove imperative table-source limit rewriting; keep canonical pagination and fail-closed output budgets.
  • Model routing overview now declares Health, Models picked over time, Cost per run over time, Problems and Routing runs. Remove 41 unused queries and add eight, reducing the fragment from 82 queries to 49. All 41 retained queries and the complete routing-run declaration deep-match the prior consolidated revision; run-key/event accounting correlation, the authored one-row detail bound and Audit-index regression guards are preserved.

Both catalogs are regenerated from composed declarations. Overlapping estimator expectations are 74/88, 47/69, 44/63, retaining original ratio thresholds and quality assertions. No page-ID optimizer, persistent query cache, rollout/policy change, screenshot or profiling data is committed.

Source revisions

Source PR Collected revision
#19004, Campaign workflows b88b01ac65ee9386d85e280f71aafbe92d4031a2
#19005, Domain runs ab045c73da25980add0a22a039a8f14202226c21
#19007, Repository overview + Campaigns 812f42c87c8428d97626a6bfd03f177ef30b7c66, including 6dbb636f8 pagination/backend-preview correction
#19008, Campaign repositories 4d7dab4fc5a25775313e6581b073bf07812fae4e
#19012, Routing run 644cce537a3e0a3090d3f1be7e8635c18ad131d5
#19014, Five-view Model routing overview 5bbaf45af43371f48c4ceb1027f48cbd26cf872b; substantive delta bf676aa2f, integrated as 245851498

The competing Campaigns cache from closed #19006 is excluded. The original five source PRs are superseded by this consolidation; #19014 has been collected here but remains open. No PR has been merged.

Deployed-data evidence

Independently paired source-branch measurements, not an aggregate combined-build benchmark. Each pair used the same pinned, fully ingested 575,582-record snapshot and checked payload/evidence parity. Host contention means values must not be compared or summed across workstreams.

Page Before → after median Reduction
Repository overview 22.6254 → 5.5304 s 75.56%
Campaigns 17.5604 → 5.5612 s 68.33%
Campaign repositories, EU CRA 15.118 → 2.564 s 83.0%
Campaign repositories, Dependabot 15.163 → 2.468 s 83.7%
Campaign workflows 10.458 → 3.521 s 66.3%
Domain runs 15.127 → 5.122 s 66.1%
Model routing run detail 10.438 → 0.464 s 95.6%

Repository overview/Campaigns final results use three complete alternating pairs (before/after, after/before, before/after), baseline 2de032495 versus final runtime 6dbb636f8; 812f42c87 changes tests only. Each variant used a fresh Chromium process, the same origin/profile, blocked service workers, a 1440×1000 viewport, and main/worker evidence clocks frozen at 2026-10-19T18:09:55Z. Readiness includes every complete page/view result and completed DOM rendering; excludes ingestion, partial previews, the 400 ms quiet confirmation and subsequent Table interaction. Complete default and Table source objects, including every row and all metadata, deep-match across all variants. Subscriptions fall from 5→1 and 4→1 respectively. No server/browser/query errors. Snapshot manifest SHA-256: cce19a1f7237786b47a363678ea51e6a685e93a2eca21dd1bd80aac82b605808. Final paired evidence and four populated source-build desktop/mobile captures. Earlier interrupted/active-mode runs are superseded, not final evidence.

Domain runs returns 25 view rows rather than 384,701 raw rows plus the view; routing reads the selected 99-record Audit partition instead of 138,032 audits.

Combined validation

Latest routing-integrated revision: 245851498186837fa078b34e30f3f54d21e63c51.

  • Full dashboard units: 3,655 passed / 1 skipped, 375 files. The focused routing, resolution and retained run-detail contracts also pass.
  • Full browser suite: 300 passed / 1 skipped; one inherited core-size failure. Current experimental core is 77,266 bytes, down from 78,140 before the five-view integration; main declarations produce 78,039 with the same production splitter. The unchanged guard is 76,500 bytes. No threshold relaxed. All eight routing browser cases pass across IndexedDB/SQLite and desktop/mobile, including preserved scope and missing-run refresh regressions.
  • Live PostgreSQL TestModelResolutionContractUsesPostgres passes against an isolated database, retaining failed-resolution Problems and run-link parity. No skipped-database result is counted as a pass.
  • Dashboard lint, strict types, document validation, 36 catalog contracts, docs build/static discovery and seeded compilation of all 71 workflows pass. The previously verified deployed-data Overview worker-heap guard is retained; this integration changes no worker/storage runtime.
  • Experimental build explicitly enabled: all 41 removed query names are absent from all 71 checked core/page/catalog files. The default build alone is not used as evidence for an experimental page.
  • All 12 latest combined-build Lighthouse scenarios passed: CFO/CTO/CSO × empty/full × desktop/mobile, cold HTTP, one repeat. Scores 97–100, all metric/CLS budgets passed. This is a bounded cold-only run, not the default repeated cold/PWA matrix. Full canonical counts remained stable, including 384,701 domains, 138,032 audits, 40,440 tools, 4,073 runs and 11 campaigns. Manifest digest: 327bdb28950672a1a3230abcb3eb6a9f3ceac302bd505dbf97f37f57c2b85c97.

The unrelated root documentation-contract failure remains: the landing-page test expects four hero paragraphs while main contains five; the aggregate test job cascades from it. A successful docs build is not a claim that this separate unit contract is green.

Model routing review and UI limitation

Health excludes runs without flagged agent-phase requests from the adherence denominator. Unknown outcomes/costs remain unknown, weekly medians below the sample threshold remain gaps, and cost is observational rather than causal. Problems keeps one row per run and kind, distinct causes, newest timed runs first and untimed runs last. Scope form, navigation, adapters, canonical/storage schemas and run detail remain unchanged by this integration.

Known acceptance gap: current chart/Table presentation does not expose the cost chart's complete-run count and sample-status columns in Table mode. Those fields remain in routing-weekly-cost; no specialized JavaScript or competing query path was introduced. The five views are declared views using existing page modes, not five simultaneous panels.

The integrated full-site review uses the pinned deployed snapshot through the actual browser worker. It contains 381 identified routing-session runs and two weekly cost groups, but no positively routed selections or recorded problems; Health, Models picked and Problems correctly show empty states. Positive routed and resolution-failure cases are covered by the production-site browser fixtures on both backends. Scope refresh, desktop/mobile containment and deployed-run drill-down pass without worker/browser/console errors.

Four integrated Model routing desktop/mobile full-site captures, combined-build Campaigns captures, and the paired source-build captures are published in this PR's conversation, outside the repository.

Consolidate the six deployed-data performance workstreams into one reviewed implementation. Share page-bound dependency graphs and campaign declarations; retain scoped canonical reads, evidence quality, authored limits, previews, pagination and reactive lifetimes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Dashboard dead views

Dead element views (0):
Dead dashboard pages (0):
Analyzed 8 element renderers and 66 dashboard pages across 1 dashboard.json file(s) from dashboard/site/src/components/ui-elements.js.

⚠️ This reachability report is informational and does not block the pull request.
🔎 View the workflow run and report artifact.

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Combined-build Campaigns captures, not mocked views: the complete deployed snapshot was ingested through the production worker, all canonical collection counts matched the successful combined Lighthouse run, and the 11-row Campaigns inventory finished rendering before desktop (1440×1000) and mobile (390×844) capture. The worker evidence clock matches the pinned snapshot. Images are attached only, never committed.

Combined populated Campaigns inventory, desktop

Combined populated Campaigns inventory, mobile

@pelikhan

Copy link
Copy Markdown
Collaborator Author

Final populated captures for the shared JSON page binding in Repository overview and Campaigns, at desktop and mobile widths.

Page Before median After median Less latency
Repository overview 22.63 s 5.53 s 75.6%
Campaigns 17.56 s 5.56 s 68.3%

Three alternating before/after pairs used the same 575,582 canonical records, a fresh Chromium process per variant, blocked service workers, and a frozen evidence clock. Readiness includes every complete page/view result, excludes ingestion and the quiet wait, and ignores partial previews. Complete default and Table payloads, including all rows and metadata, deep-match across all six variants. Page subscriptions fell 5→1 and 4→1 respectively.

These are isolated shared-binding measurements of base 2de032495 versus runtime 6dbb636f8, now included in this consolidated PR—not a benchmark of the combined five workstreams. Screenshots show the fully rendered, fully ingested production site build; no mocked page or committed image files.

Populated Repository overview, desktop 1440 pixels

Populated Repository overview, mobile 390 pixels

Populated Campaigns page, desktop 1440 pixels

Populated Campaigns page, mobile 390 pixels

@pelikhan
pelikhan marked this pull request as ready for review October 20, 2026 00:43
Integrate the reviewed page reduction from #19014 while preserving run-scoped accounting correlation, authored detail bounds and canonical Audit-index execution. Regenerate query catalogs and retarget contracts to health, models, costs, problems and routing runs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Integrated Model routing overview

The five-view simplification from #19014 is collected here in 245851498, preserving the consolidated run-detail optimizations. The page now declares Health, Models picked over time, Cost per run over time, Problems and Routing runs; the fragment contains 49 queries instead of 82. All retained queries and the complete routing-run declaration deep-match this PR's prior revision.

These are full-site captures from the integrated build, with experimental pages explicitly enabled and the pinned deployed dataset ingested through the production browser worker. They are not mocked pages or source-branch screenshots. The evidence clock and canonical counts match the previous combined-build snapshot. The snapshot has 381 identified routing-session runs and two weekly cost groups, but no positively routed selections or recorded problems: Health, Models picked and Problems correctly show empty states rather than manufacturing evidence. Positive routing and resolution-failure states are covered separately by the populated production-site browser fixtures on IndexedDB and SQLite.

Chart and Table/Cards remain the existing page-level presentation modes; five declared views does not mean five simultaneous panels. The cost chart is observational and retains unknown/gap semantics. Known limitation: the shared presentation vocabulary does not provide a chart's complete-run count and sample-status columns in Table mode. Those fields remain in routing-weekly-cost; this integration does not add specialized JavaScript or claim that acceptance detail is complete.

Desktop charts

Integrated Model routing charts on deployed data at desktop width

Mobile charts

Integrated Model routing charts on deployed data at mobile width

Desktop tables

Integrated Model routing health, problems and runs on deployed data at desktop width

Mobile tables

Integrated Model routing health, problems and runs on deployed data at mobile width

@pelikhan pelikhan changed the title Optimize six slow dashboard pages with shared declarative queries Optimize slow dashboard pages and simplify Model routing Oct 20, 2026
@pelikhan
pelikhan merged commit c0661e5 into main Oct 20, 2026
34 checks passed
@pelikhan
pelikhan deleted the pelikhan-dashboard-performance-review branch October 20, 2026 01:26
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