Skip to content

feat: run comparison - compare page, run selection & routing - #2603

Open
camielvs wants to merge 1 commit into
cmp-08-run-pickerfrom
cmp-08-compare-page-and-wiring
Open

feat: run comparison - compare page, run selection & routing#2603
camielvs wants to merge 1 commit into
cmp-08-run-pickerfrom
cmp-08-compare-page-and-wiring

Conversation

@camielvs

@camielvs camielvs commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Final PR in the Compare Runs stack — this is the one that turns all the previous pieces into a usable feature.

  • Adds the Compare page (/compare) that ties everything together: a header with both runs (labelled A/B, swap, share-link and close), the run metadata bar, and the Structured / YAML / Graph tabs.
  • Adds the ways to get there:
    • Dashboard run list — checkboxes on each row; selecting exactly two runs shows a "Compare" action bar.
    • Run view menu — a "Compare with another run…" item that pre-fills that run as side A.
  • If you land on /compare without both runs chosen, it shows a run picker for the missing side (and guards against comparing a run with itself).
  • Everything is gated behind a new compare-runs beta flag — the route redirects away and the entry points stay hidden when it's off.

Also moves the shared buildTaskExecutionStatusMap helper into utils/executionStatus (used by both the run view and the comparison).

Related Issue and Pull requests

Final PR in the Compare Runs stack. Builds on #2602 (#2596#2603).

Type of Change

  • New feature

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

image.png

image.png

image.png

image.png

image.png

image.png

image.png

Test Instructions

  1. Enable the Compare runs flag under Settings → Beta features.
  2. From the dashboard: select exactly two runs with the row checkboxes — a Compare bar appears at the bottom. Click Compare.
  3. From a run: open a run's menu and choose Compare with another run…, then pick a second run.
  4. On the compare page, confirm:
    • The header shows both runs (A/B); swap flips them, share copies the URL, close returns to the run list.
    • The Structured, YAML and Graph tabs all work.
    • Opening the page URL directly (with ?a=…&b=…) loads the same comparison; picking the same run twice is blocked.
  5. Flag off: confirm the checkboxes, compare bar and run-menu item disappear, and visiting /compare redirects to the run list.
  6. Regression: open a normal run view and confirm task statuses still render (the buildTaskExecutionStatusMap move).

Additional Comments

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cmp-08-compare-page-and-wiring/eb80245

camielvs commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

@camielvs
camielvs force-pushed the cmp-07-graph-diff-view branch from e34d81d to 22f985a Compare July 30, 2026 23:22
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch 2 times, most recently from 091c054 to 8d790d4 Compare July 31, 2026 00:24
@camielvs
camielvs force-pushed the cmp-07-graph-diff-view branch 2 times, most recently from a1c4ec9 to 69226d7 Compare July 31, 2026 01:05
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from 8d790d4 to 357bd26 Compare July 31, 2026 01:05
@camielvs
camielvs force-pushed the cmp-07-graph-diff-view branch from 69226d7 to cf080ba Compare July 31, 2026 01:36
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from 357bd26 to 89ec2e4 Compare July 31, 2026 01:36
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from 89ec2e4 to a65446a Compare August 14, 2026 18:17
@camielvs
camielvs force-pushed the cmp-07-graph-diff-view branch from cf080ba to e6b562b Compare August 14, 2026 18:17
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from a65446a to adf468d Compare August 14, 2026 19:07
@camielvs
camielvs force-pushed the cmp-07-graph-diff-view branch from e6b562b to 659f92c Compare August 14, 2026 19:07
@camielvs
camielvs changed the base branch from cmp-07-graph-diff-view to graphite-base/2603 August 14, 2026 21:01
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from adf468d to c5a8ffa Compare August 14, 2026 21:01
@camielvs
camielvs force-pushed the graphite-base/2603 branch from 659f92c to 5c839e1 Compare August 14, 2026 21:01
@camielvs
camielvs changed the base branch from graphite-base/2603 to cmp-08-run-picker August 14, 2026 21:02
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from c5a8ffa to 4e67563 Compare August 14, 2026 23:47
Comment thread src/components/Home/RunSection/RunBulkActionsBar.tsx Outdated
Comment thread src/routes/v2/pages/CompareView/CompareView.tsx
Comment thread src/components/Home/RunSection/RunBulkActionsBar.tsx Outdated
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from 4e67563 to 8b1ccc6 Compare August 17, 2026 20:01
@camielvs
camielvs force-pushed the cmp-08-run-picker branch 2 times, most recently from ec51b4c to 98fa398 Compare August 17, 2026 23:03
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from 8b1ccc6 to 35b4714 Compare August 17, 2026 23:03
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from 35b4714 to d2f4d3d Compare August 18, 2026 00:44
@camielvs
camielvs force-pushed the cmp-08-compare-page-and-wiring branch from d2f4d3d to eb80245 Compare August 18, 2026 00:56
@camielvs
camielvs marked this pull request as ready for review August 18, 2026 01:20
@camielvs
camielvs requested a review from a team as a code owner August 18, 2026 01:20
const LABEL_B = "B";

export function CompareView() {
const search = useSearch({ strict: false }) as CompareSearch;

@Mbeaulne Mbeaulne Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 This is an AI-generated response.

AI review [severity: medium]

These search params are cast without validation. TanStack Router’s default parser JSON-parses query values, so /compare?a=123&b=456 produces numbers rather than strings. Those values reach usePipelineRunData, where id.length > 0 fails and leaves execution loading disabled.

Please validate the route search values, normalize valid scalar string/number IDs with String(value), and reject arrays or objects. A regression test for unquoted numeric parameters would cover the direct-link case.

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.

2 participants