Skip to content

fix: preserve scrollback input, navigation and Hermes restore - #115

Merged
howdeploy merged 3 commits into
howdeploy:mainfrom
Likitang:fix/terminal-scrollback-hermes-restore
Oct 1, 2026
Merged

howdeploy merged 3 commits into
howdeploy:mainfrom
Likitang:fix/terminal-scrollback-hermes-restore

Conversation

@Likitang

@Likitang Likitang commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

1|## Problem
2|
3|Five UI/runtime regressions break normal restored-terminal use:
4|
5|- While a terminal is scrolled into normal-buffer history, live shell input is off-screen; long wrapped input and the cursor are especially hard to track.
6|- Chromium can treat Mouse4 as History Back at the same time CanvasTTY handles it as an application shortcut, returning the window to the startup page.
7|- A legacy Hermes card without a stored conversation ID uses --continue, which can select an unrelated same-folder conversation instead of asking the user.
8|- The attention queue remains visible as an empty panel after every attention-requiring session clears.
9|- An OSC 8 terminal link can display a complete URL while carrying a stale or truncated hidden target, causing the embedded browser to open the wrong host.
10|
11|## Change
12|
13|- Keep scrollOnUserInput disabled and render the live logical cursor line in space reserved below the xterm viewport while normal scrollback is active. Wrapped rows, the real cursor row/column, terminal width, resize/refit, and terminal colors are preserved. The pinned display disappears at the live bottom and in alternate-screen TUIs, and it does not intercept scrollback selection.
14|- Clear the startup document from Chromium navigation history after the application surface finishes loading.
15|- Resume Hermes by exact stored ID when available; otherwise launch hermes sessions browse so legacy cards require an explicit choice.
16|- Render the attention queue only while at least one session needs approval or has failed.
17|- At the terminal-to-browser boundary, prefer a complete visible non-credentialed HTTP(S) URL over a mismatched OSC 8 target; keep explicit targets for descriptive, wrapped, or unsafe labels.
18|
19|## Validation
20|
21|- Full npm test on Windows before the final bounded-row regression: 1,217 passed, 0 failed, 76 skipped (1,293 total). The final bounded-row delta passed its 41-test terminal suite and TypeScript checks; a later full rerun hit two pre-existing timing-sensitive orchestration-pipe tests, unrelated to the changed files.
22|- npm run build: passed, including Node, renderer, mobile, and TypeScript checks.
23|- npm run audit:secrets: passed for repository source and the built application bundle.
24|- Focused terminal/restore/startup suite: 88 passed, 0 failed; final terminal-focused suite: 41 passed, 0 failed.
25|- Windows Electron smoke: emitted 220 lines, scrolled into history, entered a 105-character command, moved five columns left, pressed Backspace, and executed it through the PTY. The pinned input used two reserved rows, retained all 132 displayed characters including the prompt, matched the measured xterm width (340 px), and moved the cursor from column 47 to 41 without changing the scrollback anchor.
26|- Alternate-buffer suppression and wrapped-row/cursor positioning have regression coverage.
27|- Attention queue regression suite: 13 passed; TypeScript checks passed.
28|- Terminal link regression suite: 47 passed; TypeScript checks passed. The stuckfunds.eth.limo fixture proves a truncated hidden target is replaced by the full rendered URL, while wrapped fragments and malformed labels fail closed.
29|
30|## Review notes
31|
32|- The branch is based on current main.
33|- Open PR #114 also touches TerminalCard.tsx for a WebGL refit; this change is in the scrollback/input setup and may need a small conflict resolution if #114 lands first.
34|- No installers, user settings, session stores, backups, temporary smoke scripts, or generated build artifacts are included.
35|

Keep wrapped live input visible while normal scrollback is active, prevent Mouse4 from navigating back to the startup page, and open the Hermes session picker when a legacy card lacks an exact ID.
@howdeploy
howdeploy merged commit bae2b46 into howdeploy:main Oct 1, 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