Skip to content

feat: v2 - always-on Compare page with in-page run switching - #2604

Draft
camielvs wants to merge 1 commit into
cmp-08-compare-page-and-wiringfrom
cmp-09-compare-empty-single-states
Draft

feat: v2 - always-on Compare page with in-page run switching#2604
camielvs wants to merge 1 commit into
cmp-08-compare-page-and-wiringfrom
cmp-09-compare-empty-single-states

Conversation

@camielvs

@camielvs camielvs commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Description

A follow-up on top of the Compare Runs stack (builds on #2603) that makes the Compare page far more forgiving and easier to drive.

Before this, if you opened the Compare page without two runs already chosen, it dropped you onto a full-screen "pick a run" list and wouldn't show anything else. Landing there with a single run (e.g. from a run's "Compare" menu) was a dead end. Now the full comparison page always shows, no matter what:

  • No runs chosen → the whole page still renders, with each view showing a neutral "select two runs to compare" message.
  • One run chosen → the run is compared against itself, so every view simply reads "no changes" — you see the page fully populated with one run's data.
  • Two runs chosen → exactly the same comparison as before.

You can now also change or clear either run without leaving the page. Next to each run label (A / B) there's:

  • a small swap/replace button that opens a pop-up run picker, and
  • an to clear that side back to empty.

The run picker pop-up borrows the look & feel of the dashboard's run list — status, date, who started it — with search, "created by" and date-range filters so you can quickly find the run you want. Picking one drops it straight into the comparison without any page navigation.

Net effect: the Compare page behaves like a live workspace — start with nothing, one run, or two, and add/swap/remove runs in place until you're looking at what you want.

Related Issue and Pull requests

Follow-up to the Compare Runs stack. Builds on #2603.

Type of Change

  • New feature
  • Improvement

Checklist

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

Screenshots (if applicable)

Test Instructions

  1. Enable the Compare runs flag under Settings → Beta features.
  2. Empty state: open /compare directly. Confirm the full page renders with dashed "Select run A / B" buttons and each tab (Structured / YAML / Graph) shows a "select two runs" message instead of a picker takeover.
  3. Single run: open /compare?a=<run-id> (or use a run's Compare menu). Confirm run A is filled in, B shows "Select run B", and all tabs read "no changes" with the single run's data visible.
  4. Add a run: click the replace button (or the empty "Select run B" button) to open the run picker pop-up. Try the search, created by and date range filters; the run already on the other side is excluded from the list. Pick a run and confirm it drops into the comparison without leaving the page.
  5. Swap / clear: confirm swap flips A and B, and the clears a side back to empty (a two-run comparison correctly falls back to the single-run "no changes" state).
  6. Two runs: confirm the full diffing behaviour across all three tabs is unchanged from before.

Additional Comments

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cmp-09-compare-empty-single-states/496aee3

@camielvs
camielvs force-pushed the cmp-09-compare-empty-single-states branch 2 times, most recently from e4c9cca to d068d70 Compare July 31, 2026 23:55
Render the full Run Comparison page in every state instead of forcing a
full-screen run picker when fewer than two runs are selected:

- Zero runs -> neutral "select runs" empty states across all views.
- One run  -> compared against itself, so every view reads "no changes".
- Two runs -> unchanged diffing behaviour.

Add a RunSwitcher next to each A/B label that opens a RunPickerDialog
(modal borrowing the dashboard runs-list look & feel: status, date,
initiated-by, search + created-by + date-range filters) so either run can
be changed or cleared without leaving the page. The dialog uses local
filter state via a new useCompareRunList hook (no URL coupling), replacing
the deleted CompareRunPicker.

View components degrade gracefully via a mode ("empty" | "single" | "both")
prop; YamlDiffView accepts optional specs; GraphDiffView hides the spotlight
controls for a single run. Extends comparePipelines tests with self-vs-self
and undefined-vs-undefined cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@camielvs
camielvs force-pushed the cmp-09-compare-empty-single-states branch from d068d70 to 496aee3 Compare July 31, 2026 23:59
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