Skip to content

feat: run comparison - structured diff view - #2601

Merged
camielvs merged 1 commit into
masterfrom
cmp-06-structured-diff-view
Aug 19, 2026
Merged

feat: run comparison - structured diff view#2601
camielvs merged 1 commit into
masterfrom
cmp-06-structured-diff-view

Conversation

@camielvs

@camielvs camielvs commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Sixth PR in the Compare Runs stack. Adds the Structured view — the main list-based way of reading a comparison.

It shows a summary line (how many tasks were added / removed / changed / unchanged, plus how many had a different outcome) and a Show unchanged toggle to hide the noise. Below that, inputs, tasks and outputs are listed in sections, each row showing exactly what changed:

  • Per-task detail: diff status, per-run execution status (with an arrow when the outcome differs), changed arguments/annotations, cache changes, and the artifact comparison from the previous PR.
  • A Compare logs button that opens a side-by-side log diff for tasks that ran in both runs and changed.
  • Input/output detail rows with the same treatment.

Related Issue and Pull requests

Part of the Compare Runs stack. Builds on #2600; the next PR (#2602) builds on this branch.

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)

Test Instructions

Reachable once the stack is wired up (#2603).

  • Check out the top of the stack, enable the Compare runs beta flag, and compare two runs.
  • On the Structured tab, confirm:
    • The summary counts (added / removed / changed / unchanged / outcome differs) look right, and Show unchanged hides/shows unchanged rows.
    • Tasks, inputs and outputs are grouped into sections, with changed fields listed on each row.
    • A task with a different outcome is highlighted and shows both runs' statuses.
    • Compare logs opens a side-by-side log diff for a task that ran in both runs.
    • Two identical runs show a "no differences" state.

Additional Comments

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cmp-06-structured-diff-view/47ea33c

@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 90b3472 to f58787e Compare July 30, 2026 23:22
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch 2 times, most recently from 38d1bf5 to d0ef921 Compare July 31, 2026 00:24
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from f58787e to 6d8d1a9 Compare July 31, 2026 00:24
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from d0ef921 to dc53d9d Compare July 31, 2026 01:05
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 6d8d1a9 to 15d5b88 Compare July 31, 2026 01:05
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from dc53d9d to 1e12a5d Compare July 31, 2026 01:36
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 15d5b88 to 16384ae Compare July 31, 2026 01:36
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from 1e12a5d to 9ef9026 Compare August 14, 2026 18:17
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 16384ae to 0bbd00e Compare August 14, 2026 18:17
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from 9ef9026 to d5b078f Compare August 14, 2026 19:07
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch 2 times, most recently from 1c31e0a to 63ee9b6 Compare August 14, 2026 21:01
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from d5b078f to c24848f Compare August 14, 2026 21:01
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 63ee9b6 to e57e483 Compare August 14, 2026 23:47
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from c24848f to e998ef1 Compare August 14, 2026 23:47
Comment thread src/routes/v2/pages/CompareView/components/TaskLogComparisonDialog.tsx Outdated
Comment thread src/routes/v2/pages/CompareView/components/StructuredDiffView.tsx Outdated
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from e998ef1 to 921fd30 Compare August 17, 2026 20:01
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 53c193a to 3886fe5 Compare August 17, 2026 23:03
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from 0f02d18 to 6980587 Compare August 18, 2026 00:44
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 3886fe5 to 6294327 Compare August 18, 2026 00:44
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from 6980587 to fbe96eb Compare August 18, 2026 00:56
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 6294327 to de2ad56 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
Comment thread src/routes/v2/pages/CompareView/components/TaskLogComparisonDialog.tsx Outdated
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from fbe96eb to dc50db3 Compare August 18, 2026 21:00
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch 2 times, most recently from 3164dfe to 863eced Compare August 18, 2026 21:59
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch 2 times, most recently from 32ce641 to f21b148 Compare August 18, 2026 23:07
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 863eced to 9a83b68 Compare August 18, 2026 23:07
@camielvs
camielvs requested a review from Mbeaulne August 19, 2026 00:00
Comment thread src/hooks/useContainerLog.ts Outdated
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 9a83b68 to 8accd4a Compare August 19, 2026 20:50
@camielvs
camielvs force-pushed the cmp-05-run-metadata-comparison branch from f21b148 to 360348a Compare August 19, 2026 20:50

camielvs commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Aug 19, 9:01 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 19, 9:25 PM UTC: Graphite rebased this pull request as part of a merge.
  • Aug 19, 9:29 PM UTC: @camielvs merged this pull request with Graphite.

@camielvs
camielvs changed the base branch from cmp-05-run-metadata-comparison to graphite-base/2601 August 19, 2026 21:17
camielvs added a commit that referenced this pull request Aug 19, 2026
## Description

Fifth PR in the **Compare Runs** stack. Adds run-level metadata comparison — the context around the two runs, as opposed to their pipeline structure.

It compares who created each run, when, and any run-level annotations and arguments, and surfaces what changed. Two things are deliberately handled specially:

- **Created-at** is shown for context but never counts as a "change" on its own — two different runs always have different timestamps.
- Superficial keys (notes, tags) and layout-only editor annotations are ignored so they don't create noise.

Annotation and argument keys are treated generically, so whatever a given deployment stores shows up without needing hardcoded knowledge of the keys. Rendered as a compact summary bar that expands to show the details when something actually differs.

## Related Issue and Pull requests

<!-- Link to any related issues using the format #<issue-number> -->

Part of the Compare Runs stack. Builds on #2599; the next PR (#2601) builds on this branch.

## Type of Change

- [x] New feature

## Checklist

<!-- Please ensure the following are completed before submitting the PR -->

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

## Screenshots (if applicable)

<!-- Add screenshots of the collapsed summary bar and the expanded metadata diff. -->

## Test Instructions

- Run the unit tests: `npm run test -- compareRunMetadata`
  - Covers author changes, the created-at exception, generic annotation/argument diffing, and exclusion of superficial/frontend-only keys.
- End-to-end (via the top of the stack, #2603, with the **Compare runs** flag on):
  - Compare two runs by different authors and confirm the metadata bar flags the author change and expands to show details.
  - Confirm two runs by the same author with only different timestamps are reported as unchanged.

## Additional Comments

<!-- Add any additional context or information that reviewers might need to know regarding this PR -->
@camielvs
camielvs changed the base branch from graphite-base/2601 to master August 19, 2026 21:23
@camielvs
camielvs force-pushed the cmp-06-structured-diff-view branch from 8accd4a to 47ea33c Compare August 19, 2026 21:24
@camielvs
camielvs merged commit 45dc3bc into master Aug 19, 2026
15 of 17 checks passed
@camielvs
camielvs deleted the cmp-06-structured-diff-view branch August 19, 2026 21:29
camielvs added a commit that referenced this pull request Aug 19, 2026
## Description

Seventh PR in the **Compare Runs** stack. Adds the **Graph** view — a visual, side-by-side-in-one-canvas take on the comparison.

It renders the merged graph (from #2597) with colour-coded nodes and edges: green for added, red for removed, amber for changed, grey for unchanged, plus a legend. Nodes show each task's status, digest and a short change summary; clicking one opens a detail popover reusing the same task/IO diff detail from the Structured view. A **Highlight A / B / Both** control dims everything not present in the chosen run and switches nodes to show that run's actual values.

Also refactors the run view's status indicator to extract a reusable `StatusTab` so the merged task nodes can show per-run (A/B) status tabs.

## Related Issue and Pull requests

<!-- Link to any related issues using the format #<issue-number> -->

Part of the Compare Runs stack. Builds on #2601; the final PR (#2603) builds on this branch.

## Type of Change

- [x] New feature
- [x] Cleanup/Refactor

## Checklist

<!-- Please ensure the following are completed before submitting the PR -->

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

## Screenshots (if applicable)

<!-- Add screenshots of the graph tab: the merged graph with legend, a node detail popover, and the A/B highlight modes. -->

## Test Instructions

Reachable once the stack is wired up (#2603).

- Check out the top of the stack, enable the **Compare runs** beta flag, and compare two runs.
- On the **Graph** tab, confirm:
  - The merged graph lays out and node/edge colours match the legend (added / removed / changed / unchanged).
  - Clicking a node opens its detail popover; clicking the background closes it.
  - **Highlight A / B / Both** dims the other run and shows the highlighted run's values.
- Regression check the refactor: open a normal run's graph and confirm task status indicators (including the cache-disabled state) still render as before.

## Additional Comments

<!-- Add any additional context or information that reviewers might need to know regarding this PR -->
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