Skip to content

test(terminal): read the history scroll check off the rows libghostty draws on herdr-core - #2985

Merged
devswha merged 1 commit into
mainfrom
fix/main-history-scroll
Nov 5, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/main-history-scroll

Conversation

@devswha

@devswha devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

scripts/core-history-scroll-demo-regression.ts (Integration and browser) fails on main since #2976: on a herdr-core server libghostty now draws the pane by default, so xterm's own .xterm-rows are hidden under its layer, and the script's waitFor() on a visible .xterm-rows with HIST-300 times out.

Scrolling the history itself works with libghostty: the overlay follows xterm's view (term.onScroll -> vt.scrollFromBottom). The fix is test-only:

  • wait for HIST-300 on the rows the user sees: libghostty's .ghostty-row when the pane has data-renderer="ghostty", else xterm's rows;
  • after the wheel scrolls xterm's view back, also wait until the drawn rows show an older line than before, so a libghostty layer that stops following the scroll fails here instead of passing on xterm's buffer alone.

Validation

  • On origin/main a8a155c the script fails (waitFor ... resolved to hidden <div class="xterm-rows">); the unchanged script passes with ovis:terminal-ghostty set to false, which pins the cause to the default change.
  • With this change: bun scripts/core-history-scroll-demo-regression.ts -> PASS core and PASS herdr.
  • With vt.scrollFromBottom(...) in src/lib/ghostty/overlay.ts temporarily replaced by vt.scrollFromBottom(0), the new check fails: "the wheel moved xterm's view but the rows drawn still start at HIST-257".
  • bun run check fast: pass (workflow syntax, generated types/themes, typecheck, build, unit 12076 pass / 0 fail, actionlint).

@coderabbitai

coderabbitai Bot commented Nov 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 55b2d39 and 34af980.

Files selected for processing: 1

  • scripts/core-history-scroll-demo-regression.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Local merge gate (owner-approved): test-only; the script now reads the layer libghostty draws (default in hc mode since #2976) and asserts older lines show after the wheel. Passes in core and herdr mode; check fast green; omo CLEAR. Merged without waiting for GitHub CI to unblock main's browser lane.

@devswha
devswha merged commit 1c90bad into main Nov 5, 2026
9 of 11 checks passed
@devswha
devswha deleted the fix/main-history-scroll branch November 5, 2026 13:04
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.

1 participant