Conversation
added 7 commits
March 31, 2026 13:07
There was a problem hiding this comment.
Pull request overview
Adds a client-side, in-session font-size zoom feature (Ctrl/Cmd + = / - / 0) to adjust the Ghostty terminal’s fontSize at runtime, while preventing those keystrokes from being forwarded to the PTY. Includes an ADR documenting the approach and tradeoffs.
Changes:
- Add a capture-phase
windowkeydownhandler to implement zoom-in / zoom-out / reset and callfit()after each step. - Stop zoom shortcut keystrokes from leaking to the PTY via
stopPropagation(). - Add ADR 023 documenting the decision and rationale.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/client/index.ts | Implements runtime font zoom via term.options.fontSize and global key interception. |
| docs/adrs/023.client.font-size-zoom.md | Documents the decision, constraints, and rationale for the chosen implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Ctrl/Cmd+=/-/0, matching VS Code and native terminal conventionsterm.options.fontSize(xterm.js options-proxy pattern) to trigger ghostty-web's internal renderer updatestopPropagation()so zoom keys are not forwarded to the PTY as literal charactersChanges
src/client/index.ts— attachwindowcapture-phasekeydownhandler for zoom;preventDefault()stops browser page-zoom,stopPropagation()stops ghostty-web from forwarding the key to the PTYdocs/adrs/023.client.font-size-zoom.md— ADR documenting the decisionRelated ADRs
fit()is called after each zoom step to recentre the canvas