iPad: more keyboard shortcuts, a New-chat button, and hover polish

Round out the Mac-parity keyboard/pointer affordances on the iPad split view.

Keyboard shortcuts (hidden buttons in SplitRootView carry them):
- ⌘N — start a new chat: select Home and focus the composer (also defaults the
  project). A one-shot Bool binding threads Home→StartChatComposer and is
  consumed on use, so it grabs focus on ⌘N but never on a later Home appearance
  (handles both "already on Home" via onChange and "switched from a session"
  via onAppear).
- ⌘1–4 — jump to Home / Projects / To-dos / Settings.
- ⌘R — refresh sessions.
- ⌘. — interrupt a running session (Mac's "stop"; otherwise only in the ⋯ menu).

UI:
- A visible "New chat" (compose) button in the sidebar toolbar runs the same
  action, so touch users get the affordance too (gated on control scope).

Hover (pointer):
- .hoverEffect on the transcript tool-call / tool-block rows and the Home
  in-progress session rows (native List rows already hover).

Verified in the iPad simulator: the New-chat action scrolls to + focuses the
composer with the project defaulted. Builds clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
2026-07-04 01:18:35 -07:00
co-authored by Claude Opus 4.8
parent fb7aeffcf0
commit 005776685d
5 changed files with 75 additions and 6 deletions
@@ -74,6 +74,19 @@ struct SessionDetailView: View {
// Pass our own id so an iPad split-view A→B switch (which may mount B before A
// disappears) unsubscribes A without tearing down B's just-opened state.
.onDisappear { store.closeOpen(sessionID) }
.background { interruptShortcut }
}
/// ⌘. interrupts a running session (the Mac's "stop" convention) — the action is otherwise
/// only in the ⋯ menu. A hidden button carries the shortcut; present only when it applies.
@ViewBuilder
private var interruptShortcut: some View {
if store.canControl, summary?.status == .running {
Button("Interrupt") { store.interrupt(sessionID) }
.keyboardShortcut(".", modifiers: .command)
.opacity(0)
.accessibilityHidden(true)
}
}
/// Whether this session's project is under Nucleic Control (gates Orchestra + autoship).