Skip to content

feat(vscode): compare arbitrary revision graphs - #85

Merged
forhappy merged 3 commits into
mainfrom
agent/arbitrary-versioned-graph-comparison
Jul 30, 2026
Merged

feat(vscode): compare arbitrary revision graphs#85
forhappy merged 3 commits into
mainfrom
agent/arbitrary-versioned-graph-comparison

Conversation

@forhappy

@forhappy forhappy commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace adjacent-parent-only comparison actions with an explicit baseline revision picker
  • compare the selected graph against any loaded revision, including non-adjacent commits
  • build a missing selected or baseline graph in place without losing the comparison pair
  • keep change counts aligned with the chosen baseline and clear stale comparison results when it changes
  • align the query action, baseline picker, and compare action on one shared control baseline
  • make the native comparison picker follow VS Code light, dark, and high-contrast themes

Why

The comparison backend already accepted arbitrary revision IDs, but the history UI exposed only parent buttons. That made non-adjacent comparisons impossible even when both graphs were available. Missing graphs also forced users out of the comparison flow.

This change exposes the backend capability directly and keeps graph materialization, comparison, and recovery in one workflow.

User impact

Users can select any loaded commit as a baseline, load older commits through the existing timeline pagination, build either missing graph on demand, and inspect source, graph, and semantic changes between arbitrary revisions.

Screenshots

Light theme

Arbitrary revision comparison in the light theme

Dark theme

Arbitrary revision comparison in the dark theme

Validation

  • npm test -w @compass/viewer — 110 tests passed
  • npm test -w crabbuild-compass-vscode — 100 tests passed
  • npm test -w @compass/viewer-tests -- history.spec.ts — 14 tests passed
  • npm test -w @compass/viewer-tests -- theme.spec.ts — 16 tests passed
  • npm run typecheck -w @compass/viewer
  • npm run typecheck -w crabbuild-compass-vscode
  • graphify update .
  • git diff --check

@forhappy

Copy link
Copy Markdown
Contributor Author

Updated the revision action layout in 4674ca9:

  • aligned Query this revision, the baseline picker, and Compare revisions to the same 28px control baseline
  • preserved a clean stacked layout at narrow widths
  • added a browser geometry assertion for matching top and bottom coordinates
  • refreshed the light and dark screenshots in the PR description

Validation: history.spec.ts now passes all 14 tests, and the viewer typecheck passes.

@forhappy

Copy link
Copy Markdown
Contributor Author

CI asset drift is fixed in 90daf8a by regenerating the checked-in viewer bundle and manifest.

Validation:

  • node scripts/check_viewer_assets.mjs
  • npm run typecheck -w @compass/viewer
  • javascript-and-vscode CI job ✅

The remaining matrix jobs are still in progress.

@forhappy
forhappy marked this pull request as ready for review July 30, 2026 16:21
@forhappy
forhappy merged commit c6d2839 into main Jul 30, 2026
14 checks passed
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