Skip to content

fix(changes): open source at the selected revision - #452

Merged
byronwall merged 2 commits into
mainfrom
fix/changes-deleted-historical-source
Nov 22, 2026
Merged

byronwall merged 2 commits into
mainfrom
fix/changes-deleted-historical-source

Conversation

@byronwall

@byronwall byronwall commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Open code from Changes at the same revision, side, path, and line range as the selected diff, including diffs opened from the chunk’s touch strip. Deleted symbols open their source from before the change; renamed files use their path at the selected revision.
  • Label historical source in the code viewer and keep the selected diff open when the viewer closes. If the historical blob cannot be read, report that without opening the working copy.

Validation

  • Client typecheck and 492 unit tests passed (scripts/check.sh client).
  • All 27 Changes API tests passed (uv run pytest -q tests/test_change_lens.py).
  • Full Playwright suite before the touch-strip follow-up: 22 passed, 1 skipped (the existing opt-in return-latency test). All 3 focused Changes browser tests passed on the final tree, including the added touch-strip regression.
  • Ruff passed. The full local server run had 621 passes and four failures outside Changes; all four reproduced on unchanged main. Three had pytest temp directories treated as inside a Git worktree by this environment.

Survey moves: The Changes source viewer now consumes the hunk response’s repository, revision, side, path, and line range before loading file content; it no longer goes straight from a selected chunk’s current scan path to the Treemap viewer. This intentionally introduces an API handoff, which the static survey cannot prove end to end. On the client it reports unproven handoff +3, unbound read +1, budget exhausted −3, disconnected −4, and unresolved symbol −12; these are aggregate stop deltas, not per-call attributions. On the server, the only new trace is app/services/changelens/service.py#_source_location (assumed), which selects a source locator from the diff’s already-resolved refs and scopes, not from a separate filesystem read. The server’s aggregate stops shift filesystem −3 and external code −19. Neither side loses an existing OK trace or introduces a trace error. The Changes API and browser regressions exercise the revision handoff at runtime, including from the commit touch strip and when a historical blob is unavailable.

@byronwall
byronwall marked this pull request as ready for review November 22, 2026 20:22
@byronwall
byronwall enabled auto-merge (squash) November 22, 2026 20:22
@byronwall
byronwall marked this pull request as draft November 22, 2026 20:23
auto-merge was automatically disabled November 22, 2026 20:23

Pull request was converted to draft

@byronwall
byronwall marked this pull request as ready for review November 22, 2026 20:25
@byronwall
byronwall enabled auto-merge (squash) November 22, 2026 20:25
@byronwall
byronwall merged commit 61f2079 into main Nov 22, 2026
10 of 11 checks passed
@byronwall
byronwall deleted the fix/changes-deleted-historical-source branch November 22, 2026 20:45
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