Repository navigation
fix(renderer): focus, status and shortcut correctness - #308
Merged
Merged
Conversation
Seven session-workflow fixes from the 2026-11-09 review. None touches the PTY stream or the main process. Focus and maximize - The split-layout reducer now keeps the focused pane on screen: a focus that lands on a pane hidden behind a maximized one drops the maximize, and maximizing a pane focuses it (as Canvas already does). Before, a sidebar click, a notification click, Ctrl+1..9 or Ctrl+Up/Down could leave the active session pointing at a hidden pane, so keystrokes went to the visible session while Ctrl+W and Session > Stop/Remove acted on the hidden one. - A repeated SET_FOCUS on the already-focused pane is a no-op, so a terminal mousedown no longer re-renders the app. Sessions - Resume previous conversation keeps the source session's launch snapshot (profile, env, flags) and Helm setting, like Duplicate. - Stopped and dead are distinct again, as the docs describe: a clean stop is dim gray, a failure is red and labelled "Failed", in the sidebar, the pane header, the session switcher and the ended-pane overlay. - Ctrl+W and Session > Stop Session ask before stopping a session that is starting, running or blocked on a permission prompt. A session resting at its prompt stops at once, and the default chord is unchanged. The sidebar's per-session Stop stays immediate. - Ctrl+1..9 open the Nth session in sidebar order through the same path as a Ctrl+P pick, which is what the action label and docs already said. They used to index visible layout leaves, so Ctrl+5..9 could never work and Ctrl+2 did nothing in a single pane. Sidebar - One definition of the width bounds (180-400 px) for both the drag handle and the rendered sidebar; the CSS no longer caps it at 320. A dragged width is saved (config key sidebarWidth, one write per drag) and wins over the density default. - The sidebar ordering rules moved into pure functions that the render path and the switch shortcut both use. Docs: Settings opens from File, not View; GIF and Pip are sidebar panels rather than Appearance settings; diagnostics export is not listed under Integrations; the sidebar footer list is complete; the README no longer claims regex terminal search. Tests: npx tsc --noEmit clean; eslint clean on touched files; vitest 201 files / 2333 tests pass. The one failure, src/main/usage/remote-command.test.ts "runs the quoted probe through a real POSIX shell", is the known Windows-host real-shell case and is unrelated to this change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
4 of 10 tasks
|
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.


Summary
Seven session-workflow fixes from the 2026-11-09 review. Renderer and docs only: no main-process, IPC, persistence-schema or PTY changes.
Ctrl+1..9orCtrl+Up/Downcould leave the active session pointing at an invisible pane, so keystrokes went to the visible session whileCtrl+Wand Session → Stop/Remove acted on the hidden one.sessions.mdalready documented.Ctrl+Wand Session → Stop Session show the existing confirm dialog when the active session is starting, running or blocked on a permission prompt. A session resting at its prompt stops at once. The default chord is unchanged, and the sidebar's per-session Stop stays immediate.Ctrl+1..9select the Nth session in sidebar order, through the same path as aCtrl+Ppick. They used to index visible layout leaves, soCtrl+5..9could never work andCtrl+2did nothing in a single pane. Sessions inside collapsed groups still count.sidebarWidth(one write per drag) and wins over the density default.Supporting changes: the sidebar ordering rules moved into pure functions (
utils/sidebar-order.ts) used by both the render path and the switch shortcut; a repeatedSET_FOCUSon the focused pane is now a no-op, so a terminal mousedown no longer re-renders the app.Test plan
npx tsc --noEmitnpx eslinton every touched filenpx vitest run— 201 files / 2333 tests pass. One failure,src/main/usage/remote-command.test.ts"runs the quoted probe through a real POSIX shell", is the known Windows-host real-shell case and is unrelated.isSessionWorking, pane header and overlay for stopped vs deadCtrl+ArrowDown; each should restore the split and focus the targetCtrl+Won a running session asks; on a session waiting at its prompt it stops at once; pressingCtrl+Wagain while the dialog is open does nothingCtrl+1..9open sessions in sidebar order in single, split and Canvas layouts, including a session not currently in any paneCtrl+POut of scope
Ctrl+Wchord. It still never reaches the terminal, where it means "delete previous word".🤖 Generated with Claude Code