You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document actual default for ITerminalOptions.scrollback #174
Issue #139 is about runtime corruption caused by WASM viewport row pin resolution and scrollback line-count-to-byte conversion. This is a documentation/default consistency cleanup and should not expand the #139 implementation scope.
Classification — documentation; no outcome label. The reported mismatch is reproducible by static inspection, so status:could-not-reproduce is not applicable.
Summary — The issue reports that the public ITerminalOptions.scrollback comment documents Default: 1000, while the Terminal constructor currently defaults options.scrollback to 10000. That is a small API documentation/default consistency problem, separate from the runtime scrollback byte/line issue tracked elsewhere.
docs: correct GhosttyTerminalConfig.scrollbackLimit docs #151 (docs: correct GhosttyTerminalConfig.scrollbackLimit docs) is open and only changes low-level lib/types.ts documentation for GhosttyTerminalConfig.scrollbackLimit / TerminalConfig.scrollback_limit. Its body explicitly notes that ITerminalOptions.scrollback remains misleading, so it does not resolve this issue.
docs(types): correct scrollbackLimit field documentation #168 (docs(types): correct scrollbackLimit field documentation) is closed and makes the same low-level docs change plus unrelated ignore-file changes; it does not touch lib/interfaces.ts or lib/terminal.ts.
Relevant code / likely cause — lib/interfaces.ts appears to have kept an xterm.js-shaped scrollback default comment (1000), while lib/terminal.ts intentionally constructs baseOptions.scrollback with options.scrollback ?? 10000. The neighboring low-level comments in lib/types.ts are also under active discussion in scrollbackLimit is documented as lines but interpreted as bytes by WASM #140/docs: correct GhosttyTerminalConfig.scrollbackLimit docs #151, but the exact mismatch reported here is the public ITerminalOptions comment versus the constructor default.
Recommendation — Keep this open as a documentation cleanup. The smallest safe implementation is to update lib/interfaces.ts so ITerminalOptions.scrollback documents the actual 10000 default. If maintainers instead want xterm.js-compatible 1000 behavior, the constructor default and tests should be changed intentionally rather than only editing the comment. When scrollbackLimit is documented as lines but interpreted as bytes by WASM #140/fix: use cached row pins for WASM viewport rendering #133 is resolved, consider wording the scrollback docs so both the default and unit semantics remain clear.
Activity
ThomasK33 commentedon Jun 26, 2026
Note
This triage report is AI-generated using Mux
Classification —
documentation; no outcome label. The reported mismatch is reproducible by static inspection, sostatus:could-not-reproduceis not applicable.Summary — The issue reports that the public
ITerminalOptions.scrollbackcomment documentsDefault: 1000, while theTerminalconstructor currently defaultsoptions.scrollbackto10000. That is a small API documentation/default consistency problem, separate from the runtime scrollback byte/line issue tracked elsewhere.Evidence / reproduction — I read the full issue thread for Document actual default for ITerminalOptions.scrollback #174 (no comments at triage time), the related getViewport() returns corrupted data when viewport spans multiple pages #139 discussion, adjacent scrollbackLimit is documented as lines but interpreted as bytes by WASM #140, and the scrollback-related PRs called out below. The mismatch reproduces on the current checkout (
6a1a50d) with a targeted grep:rg -n "scrollback\?: number|scrollback: options\.scrollback \?\? 10000|scrollbackLimit\?: number|scrollback_limit: number" lib/interfaces.ts lib/terminal.ts lib/types.tsThe lines directly relevant to this issue are:
Candidate fixes checked — No PR directly references Document actual default for ITerminalOptions.scrollback #174 yet.
docs: correct GhosttyTerminalConfig.scrollbackLimit docs) is open and only changes low-levellib/types.tsdocumentation forGhosttyTerminalConfig.scrollbackLimit/TerminalConfig.scrollback_limit. Its body explicitly notes thatITerminalOptions.scrollbackremains misleading, so it does not resolve this issue.docs(types): correct scrollbackLimit field documentation) is closed and makes the same low-level docs change plus unrelated ignore-file changes; it does not touchlib/interfaces.tsorlib/terminal.ts.fix: use cached row pins for WASM viewport rendering) is the candidate fix for getViewport() returns corrupted data when viewport spans multiple pages #139. Its diff toucheslib/ghostty.ts, WASM patch code, and regression tests; it converts scrollback line counts to bytes in the WASM path but does not update theITerminalOptions.scrollbackdefault comment, so it is not a direct fix for this documentation mismatch.Relevant code / likely cause —
lib/interfaces.tsappears to have kept an xterm.js-shapedscrollbackdefault comment (1000), whilelib/terminal.tsintentionally constructsbaseOptions.scrollbackwithoptions.scrollback ?? 10000. The neighboring low-level comments inlib/types.tsare also under active discussion in scrollbackLimit is documented as lines but interpreted as bytes by WASM #140/docs: correct GhosttyTerminalConfig.scrollbackLimit docs #151, but the exact mismatch reported here is the publicITerminalOptionscomment versus the constructor default.Recommendation — Keep this open as a documentation cleanup. The smallest safe implementation is to update
lib/interfaces.tssoITerminalOptions.scrollbackdocuments the actual10000default. If maintainers instead want xterm.js-compatible1000behavior, the constructor default and tests should be changed intentionally rather than only editing the comment. When scrollbackLimit is documented as lines but interpreted as bytes by WASM #140/fix: use cached row pins for WASM viewport rendering #133 is resolved, consider wording the scrollback docs so both the default and unit semantics remain clear.Adjacent issues — Existing scrollbackLimit is documented as lines but interpreted as bytes by WASM #140 tracks the larger
scrollbackLimitline-count-vs-byte mismatch, and getViewport() returns corrupted data when viewport spans multiple pages #139 tracks viewport corruption that can be exacerbated by that runtime mismatch. I did not find another open or closed issue specifically for theITerminalOptions.scrollbackdefault comment, and no new adjacent issue was created.