From 0024596e0906dce2757d70357bfce552b61ed463 Mon Sep 17 00:00:00 2001 From: cvsloane Date: Tue, 21 Jul 2026 01:58:54 -0400 Subject: [PATCH 01/11] docs(program): FW6-FOCUS ship + rollout receipt Co-Authored-By: Claude Fable 5 --- tasks/frontend-ux-log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/frontend-ux-log.md b/tasks/frontend-ux-log.md index 46e96718..bbc62472 100644 --- a/tasks/frontend-ux-log.md +++ b/tasks/frontend-ux-log.md @@ -54,3 +54,4 @@ - ~03:47Z agentd v0.4.1 ROLLED OUT fleet-wide (homelinux via owner ! command; heavisidelinux completed by AI Lead after the wrapped-line mv failure — swap succeeded, reconnected). Both hosts on the Wave-6 binary. ONLY REMAINING ITEM: owner device checklist (docs/device-checklist.md). - ~04:20Z DEVICE-CHECKLIST FINDINGS (owner, S25 Ultra): (1) terminal attach/detach loop — letterbox dims were in the terminal identity key, fed by live topology that our own agentd pin/release mutates; fixed (key = session+pane, dims frozen per attachment), hotfix PR #92 merged + DEPLOYED (fbac2dd). (2) "settings saved locally" — production PUT /v1/settings 500: user_settings_legacy_subjects owned by postgres with no grant to agent_console (superuser-run migration gap); GRANT applied to prod + migration 039 recorded. Lesson: migrations run as superuser MUST include app-role GRANTs; device testing catches what emulation structurally cannot (both bugs required a real desktop-attached/production-DB environment). - ~05:10Z (07-21) DEVICE-CHECKLIST FINDING 3 (owner): multi-pane windows show ALL panes compressed on mobile; window switches via header picker slow (full reattach). FW6-FOCUS lane launched (brief d49682e) and froze at `a62bef5` (attempt 2, 7 impl commits): viewer-scoped `terminal.navigate` (select_window/select_pane/zoom) executed against the grouped VIEWER session (phone nav no longer yanks desktop's active window), same-session switches keep descriptor/WS/xterm instance (no reconnect), mobile Focus mode = channel-owned tmux zoom with auto-focus on multi-pane attach + guaranteed unzoom on detach/supersede/sweep/close, letterbox pin migrates across viewer window switches. AI Lead review: SHIP with 1 integration fix — lane spelled the attachment-key NUL separator as a literal byte, making TmuxTerminalWorkspace.tsx binary to git (fixed to escape sequence, c00cf86). Journey assertions STRENGTHENED (asserts no new terminal WS + legacy select_window path unused). INTEGRATED @ 3c4f715; FULL GATE GREEN (508 unit, 21/21 smoke, 28 journeys, build, Go incl. real-tmux private-socket suite). Lane window/worktree + stale fw6-canvas leftovers cleaned. PR next. +- ~06:00Z (07-21) FW6-FOCUS SHIPPED: PR #93 MERGED (main 7b21b26, checks-then-admin) + DEPLOYED (SOURCE_COMMIT verified, health ok, agents:2). agentd FW6 binaries built + rolled on BOTH hosts by AI Lead (no classifier blocks this round; staged short-path /tmp/agentd-fw6). Incident during rollout: heavisidelinux entered a ~3s register/kick loop — root cause was an ORPHAN agentd (no --config, un-parented by systemd, leftover of the owner's hung v0.4.1 background swap chain) fighting the service process for the host token; killing it also unblocked that hours-old chain (harmless — hashes verified identical to FW6 build afterward). Fresh-window verification: 0 read errors, 0 CP churn. LESSON: after any manual/`!` agentd rollout, `pgrep -a agentd` — exactly one process per host; hung background chains can fire much later. Owner phone re-test of finding 3 (pane Focus + instant window switching) is the acceptance step. From acbdae4c3a7f7baa77868cab3f0742aa6d055b87 Mon Sep 17 00:00:00 2001 From: cvsloane Date: Tue, 21 Jul 2026 01:59:17 -0400 Subject: [PATCH 02/11] docs(backlog): record Dependabot uuid advisory Co-Authored-By: Claude Fable 5 --- BACKLOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BACKLOG.md b/BACKLOG.md index 3055a52d..e9330ee3 100644 --- a/BACKLOG.md +++ b/BACKLOG.md @@ -60,3 +60,4 @@ This is the git-tracked backlog for this workstream. Keep local next steps here; - [ ] Window-strip arrow-key navigation dispatches live select_window per keypress (valid ARIA auto-activation but can burst commands) — consider focus-only + Enter-to-activate (Wave-5 review INFO). - [ ] Commit a refreshed docs-site screenshot of the Command Center (acceptance checklist residual NOT-MET). - [ ] Wave-6 batch-2 review LOWs: prune command-mark seenRef on marker disposal; 4px selection-handle offset; double-tap vs touch-scroll listener ordering; thumbnail "live capture" wording; scroll-freeze anchor drift at 10k scrollback saturation; heuristic ❯/› prompt-glyph tuning; stuck suppressClickRef edge (touch tap then BT-keyboard click). +- [deps] Dependabot #39 (medium): uuid < 11.1.1 buffer bounds check in v3/v5/v6-with-buf — we only use v4(); bump uuid across lockfile at next dep pass. (2026-07-21) From 71724774a2b532f34c79e969216989dea5335a92 Mon Sep 17 00:00:00 2001 From: cvsloane Date: Tue, 21 Jul 2026 08:44:42 -0400 Subject: [PATCH 03/11] =?UTF-8?q?docs(program):=20FW6-SCROLL=20brief=20?= =?UTF-8?q?=E2=80=94=20touch=20scroll-back=20via=20SGR=20wheel=20reports?= =?UTF-8?q?=20+=20pager=20session=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- tasks/2026-07-21-fw6-scroll-brief.md | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tasks/2026-07-21-fw6-scroll-brief.md diff --git a/tasks/2026-07-21-fw6-scroll-brief.md b/tasks/2026-07-21-fw6-scroll-brief.md new file mode 100644 index 00000000..1af6e4fa --- /dev/null +++ b/tasks/2026-07-21-fw6-scroll-brief.md @@ -0,0 +1,40 @@ +# FW6-SCROLL — Touch scroll-back in attached tmux terminals (Wave 6 punch-list) + +Lane: FW6-SCROLL · Machine: homelinux · Worktree: `~/dev/wt/ac-fw6-scroll` · Branch: `refactor/fw6-scroll` (off `refactor/frontend-command-center`; local, do NOT push) +Owner device finding (S25 Ultra, production): "I can't scroll the tmux session to see the previous history." Attached mode is now the primary mobile surface (attach-everywhere + Focus), and vertical swipe does nothing. + +## Root cause (verified empirically by AI Lead — do not re-litigate) + +1. An attached tmux client ALWAYS puts the outer terminal on the alternate screen (probe: `ESC[?1049h` on every attach, all pane/zoom states). `terminal.scrollLines()` — what `useTerminalTouchScroll` calls on vertical swipe — is a no-op on xterm's alt buffer. Live swipe scroll-back has never worked in attached mode; pre-Wave-6 the mobile default was the stream view (plain DOM scroll), which masked this. +2. Both hosts run tmux with `set -g mouse on`, so the attached client activates SGR mouse tracking (probe: `?1002h` + `?1006h` requested). Feeding SGR wheel-up reports (`\x1b[<64;COL;ROWM`) into the client PTY enters copy-mode and scrolls the pane history — VERIFIED while zoomed (`in_mode=1 scroll=10`, `zoomed=1`); wheel-down at the bottom exits copy-mode automatically. For alt-screen apps in the pane (codex TUI), tmux passes wheel through and the app scrolls its own transcript. This is exactly native tmux semantics — the owner's benchmark. Desktop trackpad already works this way because xterm.js translates real wheel events to mouse reports; touch is the only gap. +3. Second defect, same deploy: after an in-session window/pane switch (FW6-FOCUS instant navigation), `PersistentTerminalHost` renders `TerminalView` from the ATTACHMENT descriptor, so the ScrollbackPager ("History") fetches capture-pane scrollback for the ORIGINAL session, not the currently selected one. + +## Design (locked) + +- In `useTerminalTouchScroll`, route the existing vertical-swipe line deltas (live drag AND momentum ticks) through one scroll dispatcher: + - If `terminal.buffer.active.type === 'alternate'` AND `terminal.modes.mouseTrackingMode !== 'none'` AND the connection is writable (connected, not read-only): emit SGR wheel reports — `\x1b[<64;COL;ROWM` per line scrolled up, `\x1b[<65;COL;ROWM` per line down — via the existing `sendInput` path. COL/ROW are the 1-based cell under the touch start point (derive from container rect + the already-computed cellWidth/lineHeight, clamped to the grid) so the pane under the finger scrolls in multi-pane views. + - Else: keep `terminal.scrollLines()` exactly as today (normal-buffer sessions must not regress — scroll-freeze/jump-to-live behavior stays intact). + - tmux scrolls ~5 lines per wheel report (copy-mode default); map swipe line-deltas → wheel-report count with a remainder accumulator so slow swipes still scroll and fast swipes don't overshoot. Keep the pure mapping function exported and unit-tested (same style as `synthesizeCursorDragInput`). + - Read-only or disconnected attached terminals: no input is sent (explicitly assert this in tests). +- Pager fix: thread the SELECTED session id (store `snapshot.descriptor.sessionId`) into `TerminalView` as a new optional prop (e.g. `historySessionId`) used ONLY by the ScrollbackPager; the WebSocket/attach identity keeps using the attachment sessionId. Additive prop, default = sessionId. +- No protocol, schema, CP, or agentd changes. This is a pure dashboard change. + +## Work items + +1. Scroll dispatcher in `useTerminalTouchScroll` (+ exported pure mapping/report-builder functions) wired to writable-state + buffer/mode gates; momentum path included. +2. `TerminalView`: pass writability + `sendInput` into the hook (cursor mode already has `onCursorInput` — reuse or parallel it); thread `historySessionId` to `ScrollbackPager`. +3. `PersistentTerminalHost`: pass `historySessionId={snapshot.descriptor.sessionId}`. +4. Tests. Unit: wheel-report synthesis (line→report mapping incl. remainder, up/down, cell coords, clamping), gating matrix (normal buffer → scrollLines; alt+mouse+writable → reports; alt without mouse → scrollLines fallback; read-only → nothing). Component/journey-level: extend an existing terminal touch test to assert emitted `input` frames contain SGR wheel sequences when the mock stream sets `?1049h` + `?1002h`/`?1006h`; History pager uses the selected session after a same-session switch (extend the fw6-focus journey mock). + +## Ownership firewall + +You may edit: `apps/dashboard/src/hooks/useTerminalTouchScroll.ts`, `apps/dashboard/src/components/TerminalView.tsx`, `apps/dashboard/src/components/terminal/(PersistentTerminalHost|ScrollbackPager).tsx`, related tests, `tests/journeys/**` (additive). You may NOT edit: `agents/agentd/**`, `packages/**`, `services/**`, the terminal host store descriptor-key/navigation contract, letterbox logic, key rail, mobileFocus, cursor-mode/context-menu gesture timers (450/500ms choreography — do not disturb). + +## Gates + +Full chain: `pnpm lint && pnpm typecheck && pnpm test:ci && pnpm test:smoke:dashboard && pnpm test:journeys && pnpm build`. Playwright from a tmux TTY. Commit per work item, prefix `feat(scroll):`. ≤3 attempts per failure then hold. + +## Done + +Handoff `tasks/frontend-ux-handoffs/fw6-scroll.md`, committed, then print exactly: +`FW6-SCROLL FROZEN ` From 3b11437b2e6d49d49cc7cc1f3e4af465bc2002cd Mon Sep 17 00:00:00 2001 From: cvsloane Date: Tue, 21 Jul 2026 08:45:46 -0400 Subject: [PATCH 04/11] docs(program): device finding 4 diagnosis + FW6-SCROLL launch receipt Co-Authored-By: Claude Fable 5 --- tasks/frontend-ux-log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/frontend-ux-log.md b/tasks/frontend-ux-log.md index bbc62472..769d2b0e 100644 --- a/tasks/frontend-ux-log.md +++ b/tasks/frontend-ux-log.md @@ -55,3 +55,4 @@ - ~04:20Z DEVICE-CHECKLIST FINDINGS (owner, S25 Ultra): (1) terminal attach/detach loop — letterbox dims were in the terminal identity key, fed by live topology that our own agentd pin/release mutates; fixed (key = session+pane, dims frozen per attachment), hotfix PR #92 merged + DEPLOYED (fbac2dd). (2) "settings saved locally" — production PUT /v1/settings 500: user_settings_legacy_subjects owned by postgres with no grant to agent_console (superuser-run migration gap); GRANT applied to prod + migration 039 recorded. Lesson: migrations run as superuser MUST include app-role GRANTs; device testing catches what emulation structurally cannot (both bugs required a real desktop-attached/production-DB environment). - ~05:10Z (07-21) DEVICE-CHECKLIST FINDING 3 (owner): multi-pane windows show ALL panes compressed on mobile; window switches via header picker slow (full reattach). FW6-FOCUS lane launched (brief d49682e) and froze at `a62bef5` (attempt 2, 7 impl commits): viewer-scoped `terminal.navigate` (select_window/select_pane/zoom) executed against the grouped VIEWER session (phone nav no longer yanks desktop's active window), same-session switches keep descriptor/WS/xterm instance (no reconnect), mobile Focus mode = channel-owned tmux zoom with auto-focus on multi-pane attach + guaranteed unzoom on detach/supersede/sweep/close, letterbox pin migrates across viewer window switches. AI Lead review: SHIP with 1 integration fix — lane spelled the attachment-key NUL separator as a literal byte, making TmuxTerminalWorkspace.tsx binary to git (fixed to escape sequence, c00cf86). Journey assertions STRENGTHENED (asserts no new terminal WS + legacy select_window path unused). INTEGRATED @ 3c4f715; FULL GATE GREEN (508 unit, 21/21 smoke, 28 journeys, build, Go incl. real-tmux private-socket suite). Lane window/worktree + stale fw6-canvas leftovers cleaned. PR next. - ~06:00Z (07-21) FW6-FOCUS SHIPPED: PR #93 MERGED (main 7b21b26, checks-then-admin) + DEPLOYED (SOURCE_COMMIT verified, health ok, agents:2). agentd FW6 binaries built + rolled on BOTH hosts by AI Lead (no classifier blocks this round; staged short-path /tmp/agentd-fw6). Incident during rollout: heavisidelinux entered a ~3s register/kick loop — root cause was an ORPHAN agentd (no --config, un-parented by systemd, leftover of the owner's hung v0.4.1 background swap chain) fighting the service process for the host token; killing it also unblocked that hours-old chain (harmless — hashes verified identical to FW6 build afterward). Fresh-window verification: 0 read errors, 0 CP churn. LESSON: after any manual/`!` agentd rollout, `pgrep -a agentd` — exactly one process per host; hung background chains can fire much later. Owner phone re-test of finding 3 (pane Focus + instant window switching) is the acceptance step. +- ~06:50Z (07-21) DEVICE FINDING 4 (owner): cannot swipe-scroll attached tmux history on mobile. AI Lead diagnosis (two empirical probes, byte-level): attached tmux client is ALWAYS on the alternate screen (smcup on every attach) where xterm scrollLines() is a no-op — live swipe scroll-back NEVER worked in attached mode; pre-Wave-6 the stream view (DOM scroll) masked it, attach-everywhere+Focus exposed it. Both hosts have tmux mouse on: probe proved SGR wheel reports fed to the client PTY scroll copy-mode even while ZOOMED, exit cleanly at bottom, and pass through to alt-screen TUIs (codex transcript) — native tmux semantics; desktop trackpad already works via xterm wheel→mouse-report translation, touch is the only gap. Second defect found during diagnosis: post-navigate History pager captures the ORIGINAL attachment session (TerminalView renders from attachmentDescriptor). FW6-SCROLL lane launched (brief 7172477): touch → SGR wheel dispatcher (gated on alt-buffer + mouseTracking + writable; scrollLines fallback preserved) + historySessionId threading. Pure dashboard change, no protocol/agentd. From 3b890fb45f59acdf29a092940281fd399a432601 Mon Sep 17 00:00:00 2001 From: cvsloane Date: Tue, 21 Jul 2026 08:47:42 -0400 Subject: [PATCH 05/11] feat(scroll): dispatch touch scroll through tmux wheel reports --- .../src/hooks/useTerminalTouchScroll.ts | 126 +++++++++++++++++- 1 file changed, 124 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/hooks/useTerminalTouchScroll.ts b/apps/dashboard/src/hooks/useTerminalTouchScroll.ts index b3c870e9..76eaaec7 100644 --- a/apps/dashboard/src/hooks/useTerminalTouchScroll.ts +++ b/apps/dashboard/src/hooks/useTerminalTouchScroll.ts @@ -25,9 +25,14 @@ type TouchScrollState = { cursorSentX: number; cursorSentY: number; cellWidth: number; + wheelRemainder: number; + wheelColumn: number; + wheelRow: number; panning: boolean; }; +const TMUX_LINES_PER_WHEEL_REPORT = 5; + function createTouchScrollState(): TouchScrollState { return { startY: 0, @@ -50,6 +55,9 @@ function createTouchScrollState(): TouchScrollState { cursorSentX: 0, cursorSentY: 0, cellWidth: 8, + wheelRemainder: 0, + wheelColumn: 1, + wheelRow: 1, panning: false, }; } @@ -91,6 +99,79 @@ export function synthesizeCursorDragInput( return { data: `${horizontal}${vertical}`, sentX: nextX, sentY: nextY }; } +export function mapScrollLinesToWheelReports( + lineDelta: number, + remainder = 0 +): { reportDelta: number; remainder: number } { + const total = lineDelta + remainder; + const reportDelta = Math.trunc(total / TMUX_LINES_PER_WHEEL_REPORT); + return { + reportDelta, + remainder: total - reportDelta * TMUX_LINES_PER_WHEEL_REPORT, + }; +} + +export function resolveTouchCell( + clientX: number, + clientY: number, + rect: Pick, + cellWidth: number, + lineHeight: number, + cols: number, + rows: number +): { column: number; row: number } { + const safeCellWidth = cellWidth > 0 ? cellWidth : 1; + const safeLineHeight = lineHeight > 0 ? lineHeight : 1; + const maxColumn = Math.max(1, cols); + const maxRow = Math.max(1, rows); + return { + column: Math.max(1, Math.min(maxColumn, Math.floor((clientX - rect.left) / safeCellWidth) + 1)), + row: Math.max(1, Math.min(maxRow, Math.floor((clientY - rect.top) / safeLineHeight) + 1)), + }; +} + +export function buildSgrWheelReports( + reportDelta: number, + column: number, + row: number +): string { + if (reportDelta === 0) return ''; + const button = reportDelta < 0 ? 64 : 65; + return `\x1b[<${button};${column};${row}M`.repeat(Math.abs(reportDelta)); +} + +export function dispatchTerminalTouchScroll({ + terminal, + lineDelta, + wheelRemainder, + column, + row, + writable, + onInput, +}: { + terminal: XTerminal; + lineDelta: number; + wheelRemainder: number; + column: number; + row: number; + writable: boolean; + onInput: (data: string) => void; +}): number { + const usesMouseReports = terminal.buffer.active.type === 'alternate' + && terminal.modes.mouseTrackingMode !== 'none'; + + if (!usesMouseReports) { + terminal.scrollLines(lineDelta); + return 0; + } + if (!writable) return 0; + + const mapped = mapScrollLinesToWheelReports(lineDelta, wheelRemainder); + const data = buildSgrWheelReports(mapped.reportDelta, column, row); + if (data) onInput(data); + return mapped.remainder; +} + export function resolveTerminalHorizontalSwipe( deltaX: number, deltaY: number, @@ -110,6 +191,8 @@ export function useTerminalTouchScroll({ onFontSizeChange, cursorEnabled, onCursorInput, + writable = false, + onScrollInput = onCursorInput, onHorizontalSwipe, }: { enabled: boolean; @@ -119,6 +202,8 @@ export function useTerminalTouchScroll({ onFontSizeChange: (fontSize: number) => void; cursorEnabled: boolean; onCursorInput: (data: string) => void; + writable?: boolean; + onScrollInput?: (data: string) => void; onHorizontalSwipe?: (direction: 'previous' | 'next') => void; }) { const touchScrollRef = useRef(createTouchScrollState()); @@ -126,11 +211,15 @@ export function useTerminalTouchScroll({ const onFontSizeChangeRef = useRef(onFontSizeChange); const cursorEnabledRef = useRef(cursorEnabled); const onCursorInputRef = useRef(onCursorInput); + const writableRef = useRef(writable); + const onScrollInputRef = useRef(onScrollInput); const onHorizontalSwipeRef = useRef(onHorizontalSwipe); fontSizeRef.current = fontSize; onFontSizeChangeRef.current = onFontSizeChange; cursorEnabledRef.current = cursorEnabled; onCursorInputRef.current = onCursorInput; + writableRef.current = writable; + onScrollInputRef.current = onScrollInput; onHorizontalSwipeRef.current = onHorizontalSwipe; useEffect(() => { @@ -204,6 +293,18 @@ export function useTerminalTouchScroll({ touchState.lastTime = performance.now(); touchState.lineHeight = computeLineHeight(terminal); touchState.cellWidth = computeCellWidth(terminal); + const touchCell = resolveTouchCell( + touch.clientX, + touch.clientY, + container.getBoundingClientRect(), + touchState.cellWidth, + touchState.lineHeight, + terminal.cols, + terminal.rows + ); + touchState.wheelRemainder = 0; + touchState.wheelColumn = touchCell.column; + touchState.wheelRow = touchCell.row; touchState.cursorArmed = false; touchState.cursorMode = false; touchState.cursorSentX = 0; @@ -299,6 +400,7 @@ export function useTerminalTouchScroll({ touchState.lastTime = performance.now(); touchState.velocity = 0; touchState.remainder = 0; + touchState.wheelRemainder = 0; return; } if (absDx > absDy * AXIS_RATIO) { @@ -308,6 +410,7 @@ export function useTerminalTouchScroll({ touchState.lastTime = performance.now(); touchState.velocity = 0; touchState.remainder = 0; + touchState.wheelRemainder = 0; return; } @@ -332,6 +435,7 @@ export function useTerminalTouchScroll({ touchState.lastTime = performance.now(); touchState.velocity = 0; touchState.remainder = 0; + touchState.wheelRemainder = 0; return; } @@ -343,7 +447,15 @@ export function useTerminalTouchScroll({ const lines = Math.trunc(totalDelta / lineHeight); touchState.remainder = totalDelta - lines * lineHeight; if (lines !== 0) { - terminal.scrollLines(-lines); + touchState.wheelRemainder = dispatchTerminalTouchScroll({ + terminal, + lineDelta: -lines, + wheelRemainder: touchState.wheelRemainder, + column: touchState.wheelColumn, + row: touchState.wheelRow, + writable: writableRef.current, + onInput: onScrollInputRef.current, + }); } const now = performance.now(); const dt = now - touchState.lastTime; @@ -362,6 +474,7 @@ export function useTerminalTouchScroll({ touchState.active = false; touchState.axis = null; touchState.remainder = 0; + touchState.wheelRemainder = 0; touchState.velocity = 0; return; } @@ -387,6 +500,7 @@ export function useTerminalTouchScroll({ if (axis !== 'vertical') { touchState.remainder = 0; + touchState.wheelRemainder = 0; touchState.velocity = 0; return; } @@ -423,7 +537,15 @@ export function useTerminalTouchScroll({ accum += currentVelocity * dt; const lines = Math.trunc(accum / lineHeight); if (lines !== 0) { - terminal.scrollLines(-lines); + touchState.wheelRemainder = dispatchTerminalTouchScroll({ + terminal, + lineDelta: -lines, + wheelRemainder: touchState.wheelRemainder, + column: touchState.wheelColumn, + row: touchState.wheelRow, + writable: writableRef.current, + onInput: onScrollInputRef.current, + }); accum -= lines * lineHeight; } touchState.momentumRaf = requestAnimationFrame(tick); From eb93db8b9233e99952cbfd8a4509e9f581a9fc29 Mon Sep 17 00:00:00 2001 From: cvsloane Date: Tue, 21 Jul 2026 08:48:00 -0400 Subject: [PATCH 06/11] feat(scroll): wire writable touch input and history identity --- apps/dashboard/src/components/TerminalView.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/components/TerminalView.tsx b/apps/dashboard/src/components/TerminalView.tsx index b8568c55..38a90e13 100644 --- a/apps/dashboard/src/components/TerminalView.tsx +++ b/apps/dashboard/src/components/TerminalView.tsx @@ -24,6 +24,7 @@ import { useSettingsStore } from '@/stores/settings'; interface TerminalViewProps { sessionId: string; + historySessionId?: string; hostId?: string; paneId?: string; className?: string; @@ -39,6 +40,7 @@ export type { TerminalController } from '@/components/terminal/types'; export function TerminalView({ sessionId, + historySessionId = sessionId, hostId, paneId, className, @@ -206,6 +208,7 @@ export function TerminalView({ onOutputStart: handleOutputStart, onOutputWritten: handleTerminalOutputWritten, }); + const terminalWritable = status === 'connected' && !readOnly; controllerReadOnlyRef.current = readOnly; const dispatchStickyCtrl = useCallback((event: StickyCtrlEvent) => { const nextMode = reduceStickyCtrl(stickyCtrlModeRef.current, event); @@ -234,8 +237,10 @@ export function TerminalView({ terminalRef, fontSize: terminalFontSize, onFontSizeChange: setTerminalFontSize, - cursorEnabled: status === 'connected' && !readOnly, + cursorEnabled: terminalWritable, onCursorInput: sendInput, + writable: terminalWritable, + onScrollInput: sendInput, onHorizontalSwipe: (direction) => { termRef.current?.dispatchEvent(new CustomEvent('terminal-window-swipe', { bubbles: true, @@ -380,7 +385,7 @@ export function TerminalView({ search={searchControls} /> setHistoryOpen(false)} /> From 707809558b27720f5c06d74fd0ad32d36625a5ec Mon Sep 17 00:00:00 2001 From: cvsloane Date: Tue, 21 Jul 2026 08:48:18 -0400 Subject: [PATCH 07/11] feat(scroll): target history at the selected session --- .../src/components/terminal/PersistentTerminalHost.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/dashboard/src/components/terminal/PersistentTerminalHost.tsx b/apps/dashboard/src/components/terminal/PersistentTerminalHost.tsx index ed9360ac..c9075ad0 100644 --- a/apps/dashboard/src/components/terminal/PersistentTerminalHost.tsx +++ b/apps/dashboard/src/components/terminal/PersistentTerminalHost.tsx @@ -97,6 +97,7 @@ export function PersistentTerminalHost() { (state) => state.terminalWarmTimeoutMinutes ?? DEFAULT_TERMINAL_WARM_TIMEOUT_MINUTES ); const attachmentDescriptor = snapshot.attachmentDescriptor ?? snapshot.descriptor; + const selectedSessionId = snapshot.descriptor?.sessionId; const terminalContext = attachmentDescriptor ? { descriptorKey: snapshot.descriptorKey!, @@ -167,11 +168,12 @@ export function PersistentTerminalHost() { return ( <>