fix(terminal): right-pane switching + mobile soft keys #26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/right-pane-terminal-ux"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two changes to the right-pane session terminal:
onMount, so clicking a different session from the left pane updated the topbar but left the terminal bound to the original target. The Files-and-back workaround worked because the tab toggle unmounted the component. Wrapping<SessionTerminal>in{#key kind|worker|session}forces a clean remount per scope, which is what the existing 250ms scope debouncer inMainSplitalready assumed.@media (max-width: 768px)(matches the existingMainSplitbreakpoint).pointerdown preventDefaultkeeps focus on the terminal so the on-screen keyboard doesn't flap.Test plan
pnpm lint— cleanpnpm typecheck— 840 files, 0 errors, 0 warningspnpm test— 474/474 passingThe right-pane SessionTerminal opens its WebSocket in onMount only. Switching session or workspace from the left pane updated the topbar label but reused the same component instance, so the WS stayed bound to the original target. Wrap the component in {#key kind|worker|session} so scope changes destroy the old terminal and mount a fresh one. The 250ms scope debouncer in MainSplit already coalesced rapid clicks on the assumption that the terminal would remount per scope — this restores that contract. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>