Open the file list in an empty Files tab - #359
Merged
Merged
Conversation
A Files tab opened without a file showed only "No file selected": the side panel is narrower than the 1300px fixed-layout threshold, and `useReviewPanelLayout` starts its overlay layout dismissed. `startOpen` overrides that for the first measurement only and is never written to localStorage, so the user's own preference survives and a tab opened at a path is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <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.
Opening a Files tab without a file — the side panel's
+menu, or anything callingopenTabKind("files")— landed on a bare "No file selected" with the file tree hidden, so the tab offered no way to reach a file.The cause is the shared layout hook:
useReviewPanelLayoutforces its panel closed in the overlay layout, which is correct for the Changes tab (the floating list covers the diff it navigates), and the side panel is almost always below the 1300px fixed-layout threshold. An empty Files tab has nothing for that list to cover.useReviewPanelLayoutnow takes a second argument,startOpen. It seeds the open state and is consumed by the first successful measurement, so it overrides the overlay default exactly once and is never written tolocalStorage— a user who closed the list keeps that preference, and a Files tab opened at a path (initialPathset, from a file link in the stream) behaves as before. Every other caller keeps the old default.Release Notes:
🤖 Generated with Claude Code