镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

chore(terminal): upgrade xterm with compatible navigation - #1268

Merged
kalvinnchau merged 1 commit into
mainfrom
am/xterm6
Oct 16, 2026
Merged

kalvinnchau merged 1 commit into
mainfrom
am/xterm6

Conversation

@kalvinnchau

@kalvinnchau kalvinnchau commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

xterm 6 removes the legacy Alt-arrow mappings and changes the scrollbar and DOM renderer. A dependency-only upgrade would change shell navigation. Upgrade @xterm/xterm from 5.5.0 to 6.0.0 and @xterm/addon-fit from 0.10.0 to 0.11.0, preserving the old macOS/Linux navigation sequences after the existing shortcut dispatcher runs.

Mapped keys use public Terminal.input(..., true), retaining normal user-input provenance and scrolling. The private coreService.onUserInput seam remains necessary: v6's public onData still omits the source. Both upstream implementations were checked, and real keyboard/paste/parser events exercise the boundary. Existing appearance assertions now measure actual glyph spans and the visible v6 background.

Validation:

  • Production build passes.
  • All 18 cases in the complete terminal renderer, motion, and browser-availability files pass in Chromium and WebKit at 23a694a7.
  • New navigation tests fail without the compatibility mapping in both engines and for both platform mappings.
  • Three browser cases added, none removed. They require real xterm event ordering, rendering, layout, wheel input, and scrollbar dragging. Coverage includes modified arrows, application cursor mode, bracketed paste, parser replies, atomic synchronized output and timeout recovery, alternate-screen restoration, hidden output, retained scrollback, live shortcut overrides, themes, and enlarged text.
  • Mandatory push checks pass: TypeScript, the full Vitest suite (10,081 passed, 9 skipped; 662 passed files, 2 skipped), design types and design guards. No tests were disabled by this change.

The platform mappings are exercised on macOS with navigator-platform emulation; this does not establish execution on Linux or native packaged-desktop acceptance. The scrollbar now uses xterm's themed implementation, so its appearance and wheel normalization follow v6. No new addon or native PTY behavior is introduced.

Human-reported native macOS smoke test passed on 2026-10-16 at 23a694a7. The human confirmed all five supplied checks:

  1. Word navigation and Ctrl+C line cancellation.
  2. Interrupting a running process and returning to the prompt.
  3. Fullscreen TUI use, resizing, hide/reopen, and switching channels while retaining the session.
  4. Wheel/scrollbar scrolling, light/dark appearance, and interface-size changes.
  5. Restart/end/reopen, live shortcut rebinding without shell input, and plugin disable/re-enable.

Linux execution and packaged-desktop acceptance remain unverified. The optional manual synchronized-redraw command was not included in the human confirmation; synchronized output and timeout recovery are covered by the automated browser cases.

Agent self-review and automated renderer validation completed before the human smoke test; no blocking code findings remain.

buzz-review-completed

upgrade xterm and fit while preserving legacy alt-arrow sequences after
shortcut dispatch. verify input provenance, synchronized rendering,
scrollback, appearance, and retained sessions against the real renderer.

Signed-off-by: am <6e30cd56c30e030cd31bb0939b94a7c257c9a09d5ba2d92cf2735da45629f248@buzz.block.builderlab.xyz>
@kalvinnchau
kalvinnchau marked this pull request as ready for review October 16, 2026 17:13
@kalvinnchau
kalvinnchau requested a review from a team as a code owner October 16, 2026 17:13

@wpfleger96 wpfleger96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 thanks for this. I diffed xterm's Keyboard.ts between 5.5.0 and 6.0.0 and the restored sequences match what 5.5 sent, including Alt+Up/Down passing through unchanged on macOS. terminal.input(..., true) goes through triggerDataEvent with wasUserInput, so the onUserInput provenance seam and scroll-on-input both still work, and the other v6 breaking changes (overviewRulerWidth, windowsMode, fastScrollModifier) aren't used here.

two nonblocking nits:

  • for every other key it sends, xterm calls cancel(event, true), which also does stopPropagation(). the compat path only calls preventDefault(), so Alt+arrow keydowns keep bubbling out of the terminal. the shortcut dispatcher skips prevented events, so I don't see a live bug, but adding event.stopPropagation() would match xterm.
  • docs/terminal.md says the Ctrl-arrow mapping applies on Linux, but the code applies it on every non-Apple platform, Windows included (same as 5.5). "on Linux and Windows" would be more accurate.

@kalvinnchau
kalvinnchau merged commit 91aa196 into main Oct 16, 2026
35 checks passed
@kalvinnchau
kalvinnchau deleted the am/xterm6 branch October 16, 2026 17:30
tellaho added a commit that referenced this pull request Oct 16, 2026
…ui-polish

* buzz-app/main:
  test: delete styling, markup and call-count trivia tests (#1255)
  fix(hooks): preserve recovery ownership on lefthook 2.2.2 (#1174)
  fix(deps): upgrade vulnerable tls and editor dependencies (#1267)
  chore(terminal): upgrade xterm with compatible navigation (#1268)
  feat(goose): show goose and provider marks on agent cards (#1260)

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
johnmatthewtennant added a commit that referenced this pull request Oct 16, 2026
…lation

* origin/main: (139 commits)
  feat(agents): let plugins read each agent's sessions (#1111)
  chore(deps): upgrade vitest to 5.0.4 (#1272)
  feat(plugins): reload folder plugins from the CLI (#1265)
  add channel shared sessions discovery and retrieval (#1254)
  polish Solo activity layout and fold previous steps (#1257)
  fix(agents): clarify model defaults and provider actions (#1177)
  fix(messages): stop the channel timeline jumping back when agents or search read old messages (#1256)
  Add Close other tabs to the tab menu (#1127)
  chore(deps): upgrade virtua to 0.53.5 and port its scroll patch (#1269)
  Auto-tag Berd drafts with a chosen default agent (#1139)
  test: delete styling, markup and call-count trivia tests (#1255)
  fix(hooks): preserve recovery ownership on lefthook 2.2.2 (#1174)
  fix(deps): upgrade vulnerable tls and editor dependencies (#1267)
  chore(terminal): upgrade xterm with compatible navigation (#1268)
  feat(goose): show goose and provider marks on agent cards (#1260)
  fix(agents): show native agent pictures in the Solo agent picker (#1258)
  test(agents): fix main typecheck — add effort to Goose fixture (#1262)
  fix(messages): reject unclaimed file and link drops app-wide (#1075)
  feat(channels): create and read system channels (#965)
  Refine message layout and bubble reading widths (#1218)
  ...
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