Repository navigation
Esc in the side composer goes back to the tab you came from; add a close button - #148
Merged
Merged
Conversation
…lose button Esc released the composer but left the focus on the composer's own pane, so the command line was the character's main window's even after reading Chat. It now activates the window that was in front before the composer took the keyboard (not when that window shares the composer's pane, which would hide it). Both hosts go through LeaveComposer. A composer alone in its pane draws no tab strip, so it could only be closed with Ctrl+W. Its heading now carries a close: a × link in the cells and a button in the window, both ending in CloseDockedComposer. Closing a composer window also re-pins the focus to the command line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rqqt7SwB1QPsj3aFAjhdDd
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.
Requested by Grave · project thread
What
Esc from the docked composer. Esc released the composer but left the focus on the composer's own pane. That pane's command line belongs to the character's main window, so after reading Chat and writing in the side composer, Esc put you on the main window's bar ("the first tab"). Esc now activates the window that was in front before the composer took the keyboard (
LeaveComposer,_windowBeforeComposer). It does not do that when the window shares the composer's pane, because bringing it forward would hide the composer. Both hosts go through the same method (the window's editor viaComposerSession.Release), and ⌥⏎ (Esc then Enter) puts the keyboard back in the composer first.Closing the side composer. A composer alone in its pane draws no tab strip, so the only way to close it was Ctrl+W from inside it or dragging a tab into its pane. The heading now has a close: a
×link at the end of the cell heading band (DockedComposer.CloseLink, answered only by that header) and a button in the window's docked heading (ComposerSession.ClosePanel). Both end inCloseDockedComposer→CloseWindow, so the panel is recorded closed and the draft is kept; Dock the composer brings it back. Closing any composer window now re-pins the focus to the command line, which was left on the removed editor (Ctrl+W too).Tests
DockedComposerTests: Esc returns to Chat in Roleplay; ⌥⏎ still inserts a line after that; a composer that shares its pane stays in front; the heading's × closes it and keeps the draft; Ctrl+W closes it with focus on the bar; the × keeps its cell at every width.NativeComposerRoutingTests: the host's Esc returns to Chat; the host's close button closes the pane.NativeComposerTests: the docked heading shows the button and pressing it closes the composer.SurfaceParityTests: native close and the cells' × end in the same state.main.All seven suites pass locally except Core's
AReadOnlyCacheDirectory_DegradesToMemoryOnly, which also fails onmainhere because the container runs as root.Generated by Claude Code