Repository navigation
File Explorer follows a file opened at a commit to the same path at HEAD - #674
Merged
Merged
Conversation
A commit's changed files and the graph's file nodes open a file as it was at that commit, which File Explorer, showing HEAD, had no row for: its folders stayed closed. A file read at a commit now links the same path at HEAD as head when HEAD holds a file there; File Explorer opens that path's folders and marks its row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#673 made File Explorer open the folders above the open file, but only when the open file's address is in the tree at HEAD (
/workspace/{slug}/file/{path}). A commit's changed files and the graph's file nodes open a file as it was at that commit (/workspace/{slug}/commit/{id}/file/{path}). File Explorer had no row for that address, so its folders stayed closed. #673's test opened the HEAD address directly, so it did not catch this.Change
head, when the tree at HEAD holds a file there. A file read at HEAD has noheadlink.headlink: it opens that path's folders and marks its row with the box. A file open at HEAD is followed as before.Controls
headlink, so File Explorer opens no folders and marks no row.Verification
bun run check: exit 0, 1105 pass, 0 fail.bun run e2ewithE2E_PORT_API=9019 E2E_PORT_DEV=8970 E2E_PORT_BUILT=8971: 175 passed, 11 skipped (the dev-only tests, in the built bundle).tests/git-api.test.ts):src/a.tsat the first commit linksheadto/workspace/alpha/file/src/a.ts.data/blob.binat the first commit, dropped later, has noheadlink.src/a.tsread at HEAD has noheadlink.notes/plan.mdopens the commit's version (/commit/{id}/file/notes/plan.md). It also opensnotesin File Explorer, and marksplan.md.Linked issues
None. Follows #673.
🤖 Generated with Claude Code