docs: document ITerminalOptions scrollback default#178
Merged
Conversation
Change-Id: I7277e34e9d74f8308e9942b46a755ce375e8c552 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
matifali
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #174.
ITerminalOptions.scrollbackdocs to match the actualTerminaldefault of10000lines.term.options.scrollbackis10000when no options are provided.Validation
bun test lib/terminal.test.ts -t "Public Mutable Options"bun run fmt && bun run lint && bun run typecheck && bun test && bun run buildDogfooding
bun run dev -- --host 127.0.0.1.agent-browserto openhttp://127.0.0.1:8000/demo/colors-demo.html, verify the color-demo controls rendered, and capture smoke-test evidence./tmp/ghostty-web-174-dogfood/colors-demo.png/tmp/ghostty-web-174-dogfood/colors-demo.webmVerifier summary
The adjacent issue-implementation workflow converged. Its verifier found that the final diff is limited to
lib/interfaces.tsandlib/terminal.test.ts, that the public API docs now agree with the existing runtime default, and that the standard validation suite passed after generating the ignored WASM artifact required by tests.📋 Implementation Plan
Implementation Plan — #174
Goal
Resolve GitHub issue
coder/ghostty-web#174by reconciling the public API documentation forITerminalOptions.scrollbackwith the actual default used byTerminal.The live issue is open, labeled
documentation,triage:done, andaccepted, and asks for the interface comment to document the actual default or for code/docs to be reconciled intentionally. The verified narrow mismatch is:lib/interfaces.ts:scrollback?: number; // Default: 1000lib/terminal.ts:scrollback: options.scrollback ?? 10000lib/ghostty.ts: low-level WASM config fallback also usesconfig.scrollbackLimit ?? 10000Scope and non-goals
In scope
ITerminalOptions.scrollbackdocumentation to state the actual default:10000.Terminalexposesterm.options.scrollback === 10000, so the documented API default is tied to executable behavior.Out of scope
1000; that would be a product behavior change and is not requested by Document actual default for ITerminalOptions.scrollback #174.lib/types.tsdocs unless the final diff reveals a direct contradiction created by this task; related PR docs: correct GhosttyTerminalConfig.scrollbackLimit docs #151/docs(types): correct scrollbackLimit field documentation #168 context suggests those are separate from Document actual default for ITerminalOptions.scrollback #174.Evidence gathered
lib/interfaces.tsandlib/terminal.ts.lib/interfaces.tsto document10000; changing the constructor default would need an intentional behavior decision.lib/interfaces.ts:13documentsDefault: 1000.lib/terminal.ts:147defaultsoptions.scrollbackto10000.lib/ghostty.ts:296defaultsconfig.scrollbackLimitto10000when writing the WASM terminal config.lib/terminal.test.tsalready has aPublic Mutable Optionssection around line 2326 where an adjacent default-options assertion belongs.ITerminalOptions.scrollbackcomment.Implementation steps
Phase 1 — Pre-flight verification
Confirm the working tree is clean:
Re-read the current issue state before editing, in case labels or linked PRs changed:
Confirm the exact mismatch still exists:
rg -n "scrollback\?: number|scrollback: options\.scrollback \?\? 10000|config\.scrollbackLimit \?\? 10000" \ lib/interfaces.ts lib/terminal.ts lib/ghostty.tsQuality gate: If
lib/interfaces.tsalready documents10000and no test/default mismatch remains, stop and report that the issue appears already fixed instead of creating a redundant change.Phase 2 — Documentation correction
Edit
lib/interfaces.tsonly atITerminalOptions.scrollback:Do not change neighboring options or formatting beyond formatter output.
Quality gate: Re-run the targeted grep and verify all public/API default references for this issue now agree on
10000.Phase 3 — Focused regression test
Add one test in
lib/terminal.test.tsinside the existingdescribe('Public Mutable Options', ...)block, next to the current test that checks custom option values.Recommended test shape:
Notes:
scrollback; checkingcols/rowsonly provides cheap context that this is a default-options test.try/finallyso the new test does not add another undisposedTerminalinstance.Quality gate: Run the targeted test before broader validation:
Phase 4 — Full validation
Run the repository's standard checks before claiming success:
If dependencies are missing, run
bun installfirst. If any command hangs, fails, or is blocked by environment or unrelated existing behavior, capture the exact output and document it instead of hiding it.Phase 5 — Dogfooding and reviewable evidence
This issue has no intentional UI/runtime behavior change, so dogfooding should focus on proving the public API default and demonstrating that the demo still loads.
Produce command-line evidence:
Attach or summarize the resulting transcript in the PR/implementation report.
Optional browser smoke evidence for reviewer confidence:
Start the dev server:
Use
agent-browser(load its current instructions withagent-browser skills get corefirst) or a normal browser to openhttp://localhost:8000/demo/colors-demo.html.Verify the demo renders the terminal color showcase without console errors.
Capture a screenshot of the loaded demo and, if available, a short recording of page load/interaction.
Make clear in the evidence that this is a no-regression UI smoke check; the demos configure
scrollback: 10000explicitly, so this browser smoke does not prove the default behavior. The targeted unit test is the default-behavior evidence.Acceptance criteria
lib/interfaces.tsdocumentsITerminalOptions.scrollbackas defaulting to10000.lib/terminal.tscontinues to defaultoptions.scrollbackto10000; no runtime behavior changes are introduced.lib/terminal.test.tsasserts the default public option value forscrollbackis10000.lib/interfaces.tsand the focused test addition inlib/terminal.test.tsunless formatter output requires otherwise.Out-of-scope issue handling during implementation
If implementation discovers another bug, flaky test, missing feature, or nice-to-have improvement:
Do not expand the Document actual default for ITerminalOptions.scrollback #174 PR to fix it.
Search existing issues first, including recent issues that another agent/workspace may have opened:
gh issue list --repo coder/ghostty-web --state all --search "<root problem keywords>"If a matching issue exists, comment there with new evidence/reproduction details and link back to Document actual default for ITerminalOptions.scrollback #174 or the PR.
If no matching issue exists, create a new issue with evidence, reproduction steps, expected behavior, actual behavior, why it is out of scope for Document actual default for ITerminalOptions.scrollback #174, and label it
needs-triage.Return to the Document actual default for ITerminalOptions.scrollback #174 scope immediately after recording the out-of-scope finding.
PR notes for implementer
docs: document ITerminalOptions scrollback default.Fixes #174, summarize the comment/test changes, list validation commands, and include dogfooding evidence.$MUX_MODEL_STRINGand$MUX_THINKING_LEVELif creating a PR from this workspace.Generated with
mux• Model:openai:gpt-5.5• Thinking:xhigh