Before submitting
Area
apps/web
Problem or use case
The inline right panel can show Files, Diff, Terminal, Browser, and Plan surfaces, but its own header does not provide an explicit way to close the whole panel. Individual tabs expose an × that closes that surface, while the whole-panel toggle lives outside the panel in the workspace titlebar.
This makes dismissing the panel less discoverable: a user looking at the panel header can reasonably interpret the tab × as the only close affordance, even though that action has different semantics.
Proposed solution
Add a dedicated close button to the trailing edge of the inline right-panel header.
- Use the existing right-panel close/toggle action; do not introduce new state.
- Keep individual tab close buttons unchanged.
- Give the button an accessible label and tooltip such as “Close right panel”.
- Limit the first pass to the inline desktop/web layout. The sheet layout already carries its layout controls.
Why this matters
The close action becomes visible where users expect it, and the distinction between closing one surface and dismissing the entire panel becomes clear. This is especially useful when the panel was opened indirectly by selecting a file or diff from the chat timeline.
Smallest useful scope
Render one close control in the inline RightPanelTabs header and wire it to the existing panel-close callback. No settings, persistence, keyboard shortcut, or panel-state changes.
Alternatives considered
- Keep using the workspace titlebar toggle or the existing
rightPanel.toggle keybinding. These work, but they are spatially disconnected from the panel being dismissed.
- Close every tab individually. This changes the set of open surfaces rather than merely hiding the panel, so reopening loses useful panel state.
- Reuse a tab
×. That would blur the distinction between closing a surface and closing the container.
Risks or tradeoffs
- The added control consumes a small amount of horizontal space in a potentially crowded tab bar.
- The icon and placement should remain visually consistent with the existing titlebar layout controls.
- The callback should hide the panel without closing its tabs so reopening restores the prior surface.
Examples or references
The panel already has a whole-panel toggle in PanelLayoutControls; this proposal makes the same action available in the panel header itself.
Contribution
Before submitting
Area
apps/web
Problem or use case
The inline right panel can show Files, Diff, Terminal, Browser, and Plan surfaces, but its own header does not provide an explicit way to close the whole panel. Individual tabs expose an
×that closes that surface, while the whole-panel toggle lives outside the panel in the workspace titlebar.This makes dismissing the panel less discoverable: a user looking at the panel header can reasonably interpret the tab
×as the only close affordance, even though that action has different semantics.Proposed solution
Add a dedicated close button to the trailing edge of the inline right-panel header.
Why this matters
The close action becomes visible where users expect it, and the distinction between closing one surface and dismissing the entire panel becomes clear. This is especially useful when the panel was opened indirectly by selecting a file or diff from the chat timeline.
Smallest useful scope
Render one close control in the inline
RightPanelTabsheader and wire it to the existing panel-close callback. No settings, persistence, keyboard shortcut, or panel-state changes.Alternatives considered
rightPanel.togglekeybinding. These work, but they are spatially disconnected from the panel being dismissed.×. That would blur the distinction between closing a surface and closing the container.Risks or tradeoffs
Examples or references
The panel already has a whole-panel toggle in
PanelLayoutControls; this proposal makes the same action available in the panel header itself.Contribution