Skip to content

Open the file list in an empty Files tab - #359

Merged
RBilly merged 1 commit into
mainfrom
maestro/true-shore-107
Sep 11, 2026
Merged

Open the file list in an empty Files tab#359
RBilly merged 1 commit into
mainfrom
maestro/true-shore-107

Conversation

@RBilly

@RBilly RBilly commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Opening a Files tab without a file — the side panel's + menu, or anything calling openTabKind("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: useReviewPanelLayout forces 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.

useReviewPanelLayout now 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 to localStorage — a user who closed the list keeps that preference, and a Files tab opened at a path (initialPath set, from a file link in the stream) behaves as before. Every other caller keeps the old default.

Release Notes:

  • Fixed the file list being hidden when a Files tab is opened without a file

🤖 Generated with Claude Code

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>
@RBilly
RBilly merged commit d57b752 into main Sep 11, 2026
3 checks passed
@RBilly
RBilly deleted the maestro/true-shore-107 branch September 11, 2026 13:00
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