Skip to content

Commit 5b614af

Browse files
sandy081Copilot
andcommitted
sessions: refine single-pane details behavior
Keep the side-pane boundary stable when toggling docked details, align new-session editor closing with existing sessions, and reveal details when Empty Files opens. Also order the details action before maximize and allow workspace-backed draft sessions to open Changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b8b400c commit 5b614af

10 files changed

Lines changed: 226 additions & 240 deletions

File tree

src/vs/sessions/LAYOUT_CONTROLLER.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This guarantees that after collapsing back to a single session the **default vis
5555

5656
Skipped entirely on mobile web (`isWeb && isMobile`) to avoid disruptive auto-expand on narrow viewports.
5757

58-
> **Docked detail panel (experimental).** With `sessions.layout.singlePaneDetailPanel` enabled, the auxiliary bar is docked inside the editor part rather than being a grid column (see [Editor presentation](LAYOUT.md#editor-presentation)). `SinglePaneExistingSessionStrategy` persists one shared Existing Session Editor/Details profile (via `SinglePaneVisibilityProfileStore`) under `sessions.singlePane.sidePaneVisibility`. New Sessions do not apply or capture an Editor profile; submitting preserves Editor visibility and seeds the Existing profile. `SinglePaneQuickChatStrategy` shares the Existing profile's overall side-pane visibility when Quick Chat has a saved editor working set, mapping any visible composition to Editor-only because Quick Chat has no Details. Opening the first editor or changing visibility in an editor-bearing Quick Chat updates that shared profile, even before the chat has a saved working set. A Quick Chat without editors hides the side pane transiently without changing the profile, so navigating away restores the shared visibility. The per-session rules below apply to the classic layout only. The docked detail panel opens at a 300px preferred width unless the user explicitly resized it; cached editor node sizes and temporary sidebar-collapse growth are not allowed to widen the first/opened detail-only pane. Docked sash collapse is also expressed through the same visibility API: the left grid sash hides editor content when the editor node reaches the detail width, and the middle docked sash hides the auxiliary bar when the raw dragged detail width reaches ~0. Single-pane also keeps new-session views Files-first without owning side-pane visibility: when an uncreated workspace session is entered and its restored editor set contains only Empty Files, `SinglePaneNewSessionStrategy` hides Editor once under editor-auto-visibility suppression. Auxiliary Bar visibility is unchanged. A completed Toggle Side Panel reopen is a separate transition: after managed tabs settle, a sole Empty Files input produces dock-only Files. Closing the last non-Empty input is a third, authoritative transition that restores Empty Files and the exact pre-close visibility. New, Existing, and Quick Chat share one `SinglePaneDetailPanelCoordinator` for Changes/Files content selection and context publication. Auxiliary Bar visibility is not shared: each lifecycle strategy applies its own visibility rules before publishing its content target.
58+
> **Docked detail panel (experimental).** With `sessions.layout.singlePaneDetailPanel` enabled, the auxiliary bar is docked inside the editor part rather than being a grid column (see [Editor presentation](LAYOUT.md#editor-presentation)). `SinglePaneExistingSessionStrategy` persists one shared Existing Session Editor/Details profile (via `SinglePaneVisibilityProfileStore`) under `sessions.singlePane.sidePaneVisibility`. New Sessions do not apply or capture an Editor profile; submitting preserves Editor visibility and seeds the Existing profile. `SinglePaneQuickChatStrategy` shares the Existing profile's overall side-pane visibility when Quick Chat has a saved editor working set, mapping any visible composition to Editor-only because Quick Chat has no Details. Opening the first editor or changing visibility in an editor-bearing Quick Chat updates that shared profile, even before the chat has a saved working set. A Quick Chat without editors hides the side pane transiently without changing the profile, so navigating away restores the shared visibility. The per-session rules below apply to the classic layout only. The docked detail panel opens at a 300px preferred width unless the user explicitly resized it; cached editor node sizes and temporary sidebar-collapse growth are not allowed to widen the first/opened detail-only pane. Docked sash collapse is also expressed through the same visibility API: the left grid sash hides editor content when the editor node reaches the detail width, and the middle docked sash hides the auxiliary bar when the raw dragged detail width reaches ~0. Single-pane also keeps new-session views Files-first without owning side-pane visibility: when an uncreated workspace session is entered and its restored editor set contains only Empty Files, `SinglePaneNewSessionStrategy` reveals Files Details before hiding Editor once under editor-auto-visibility suppression. Both the New and Existing strategies reveal Files Details when Empty Files is opened or restored in a visible editor area, while later user visibility changes remain authoritative until the editor is opened again. A completed Toggle Side Panel reopen is a separate transition: after managed tabs settle, a sole Empty Files input produces dock-only Files. Closing the last input closes the whole side pane without replacing a non-Empty input with Empty Files. New, Existing, and Quick Chat share one `SinglePaneDetailPanelCoordinator` for Changes/Files content selection and context publication. Auxiliary Bar visibility is not shared: each lifecycle strategy applies its own visibility rules before publishing its content target.
5959

6060
### 3.1 Switching away — capture
6161

0 commit comments

Comments
 (0)