Skip to content

Esc in the side composer goes back to the tab you came from; add a close button - #148

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-kf3yp9
Nov 24, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-kf3yp9

Conversation

@HarryCordewener

Copy link
Copy Markdown
Member

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 via ComposerSession.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 in CloseDockedComposer → 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

  • Tui 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.
  • Tui NativeComposerRoutingTests: the host's Esc returns to Chat; the host's close button closes the pane.
  • Avalonia NativeComposerTests: the docked heading shows the button and pressing it closes the composer. SurfaceParityTests: native close and the cells' × end in the same state.
  • The two Esc tests fail on main.

All seven suites pass locally except Core's AReadOnlyCacheDirectory_DegradesToMemoryOnly, which also fails on main here because the container runs as root.


Generated by Claude Code

…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
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@HarryCordewener HarryCordewener self-assigned this Nov 23, 2026
@HarryCordewener
HarryCordewener marked this pull request as ready for review November 24, 2026 01:17
@HarryCordewener
HarryCordewener merged commit 9d44abe into main Nov 24, 2026
3 checks passed
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.

2 participants