Repository navigation
Conversation
Bind repository-detail to one abort-scoped canonical page query and reuse equivalent scoped dependency graphs per request while preserving view aliases and refresh semantics. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
Contributor
Dashboard dead viewsDead element views (0):
|
There was a problem hiding this comment.
🟡 Changes recommended
Page binding can omit an unscoped metric’s source when another metric shares that source with global filters.
1 open issue
What changed in this PR
Optimizes Repository overview by sharing one page-level subscription and equivalent query dependencies within each request.
Changes:
- Adds opt-in
query-binding: pagewith validation and documentation. - Shares scoped dependency graphs while retaining separate view aliases.
- Adds regression coverage for performance, refreshes, cleanup, and failures.
| File | Description |
|---|---|
| docs/dashboard-language-specification.md | Defines page-binding behavior. |
| dashboard/site/test/unit/view-payload-compiler.test.js | Tests shared graphs and distinct limits. |
| dashboard/site/test/unit/validator.test.js | Tests binding validation. |
| dashboard/site/test/unit/repository-activity-query-optimization.test.js | Checks scope, quality, and operation budgets. |
| dashboard/site/test/unit/presenter.test.js | Tests subscription lifecycle and failures. |
| dashboard/site/test/fixtures/repository-overview-contract.json | Defines overview contract expectations. |
| dashboard/site/test/e2e/repository-overview.spec.js | Checks worker refreshes and responsive rendering. |
| dashboard/site/src/validator-pages.js | Validates binding values. |
| dashboard/site/src/specification.js | Allows the custom-page binding key. |
| dashboard/site/src/presenter.js | Implements page-level binding and failure states. |
| dashboard/site/src/data/queries/view-payload-compiler.js | Reuses equivalent scoped dependency graphs. |
| dashboard/site/dashboard-fragments/repositories.json | Enables binding for Repository overview. |
Review effort: Balanced
Opt Campaigns into the same JSON page-binding contract as Repository overview. Preserve production-worker payload, provenance, pagination, horizon, refresh, navigation, and mobile-mode coverage without adding a worker cache. Retain unaliased derived sources required by context-opted-out views alongside scoped aliases, with compiler and canonical-worker regressions for the review finding. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Interpret the declarative page binding consistently in source discovery and compilation so every ordinary view keeps its payload across Chart, Cards, and Table. Reuse the same scoped DAG without marking inactive charts unavailable. Cover complete-mode aliases, page-source selection, and unavailable-state parity in browser navigation. The existing built-in inventory preview integration regression passes unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve authored partial-source views through the canonical compiler and publish only phase-ready preview aliases. Keep earlier ready previews when another becomes available, without reading a deferred complete graph or caching query results. Cover inventory/run-phase page previews, deferred filters, complete replacement, and real browser Table/Cards links and pending cells while record ingestion is held open. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Continuation loaders retain the original source set and view/page compilation scope, keeping signatures valid for page-bound and independent subscriptions. Filter declared previews by the same backend eligibility used by canonical compilation before phase publication. Verify second-page Campaigns retrieval through production startup and worker APIs with 31 rows, independent-view continuation scope, and a hosted-only preview sharing a deferred static source. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require the original page source set and independent view scope at the canonical continuation boundary instead of the superseded alias-to-view reconstruction. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Optimize only the Repository overview (
repository-detail) by declaringquery-binding: page. Its ordinary widgets now share one abort-scoped canonical subscription instead of independently recomputingrepository-activity. Other pages keep their existing independent subscriptions.The production view-payload compiler shares equivalent scoped dependency graphs within one request while retaining distinct view aliases. Per-view filters, search, ordering, limits, source quality, and provenance remain intact; there is no cross-request cache. Database updates still refresh the active page, and navigation or context changes dispose the old subscription. Page-bound failures render an explicit unavailable state.
Measured result
Fully settled default-page readiness fell from a 26.59 s median to 5.88 s: 77.9% less latency / 4.52× faster.
Each before run started five page subscriptions (four duplicate activity widgets and page chrome); each after run started one. All active widget rows and evidence availability, completeness, freshness, and timestamps matched their before results.
Method: the unchanged base checkout at
2de03249512f65fc0eb7ca2a438eac647205f2e2and the optimized build were alternated on the same Chromium origin/database and pinned public manifest. Each round forced a full app reload, waited for eager ingestion to finish, then navigated to#page-repository-detail?repository=githubnext%2Fgh-aw-cao. Readiness waits for all active page requests and visible views, excluding ingestion and the 400 ms quiet-period confirmation. No CPU/network throttling; 1440×1000 viewport. Alternating pair order and three samples account for shared-machine variability.Every round verified the same 575,582 canonical records, including 4,073 runs, 695 workflows, and 6 repositories. This reproduces the reported deployment's fourfold repeated dependency evaluation without treating its single 27.86 s sample or the abandoned diagnostic run as the paired baseline.
Pinned manifest SHA-256:
cce19a1f7237786b47a363678ea51e6a685e93a2eca21dd1bd80aac82b605808.Coverage
Regression tests require a single shared import-evidence dependency graph and less than 40% of the independent row-operation budget. Scoped values and partial/stale provenance are compared across time horizons, repository/organization/workflow/mode filters, and search. Additional tests cover distinct filters/limits, binding validation, page-lifetime aborts, refreshes, query errors, and browser-worker updates to metrics and health in Table mode and mobile layout.
Passed:
Full-suite caveats, not hidden or loosened:
Populated desktop and mobile screenshots are attached in a PR comment.