Render a blank bootstrap state until first output after open/reset#154
Open
aliceisjustplaying wants to merge 1 commit into
Open
Render a blank bootstrap state until first output after open/reset#154aliceisjustplaying wants to merge 1 commit into
aliceisjustplaying wants to merge 1 commit into
Conversation
diegosouzapw
added a commit
to diegosouzapw/ghostty-web
that referenced
this pull request
May 24, 2026
Before the first call to write() (or after reset()), render a blank canvas filled with the theme background colour instead of showing a transparent/black frame. This eliminates the flash of unstyled content on open(). - Add parseCssColorToRgb() for hex and rgb() CSS colour parsing - Add createBlankBootstrapCells() to build a dummy blank frame - Add bootstrapBuffer proxy IRenderable that delegates to WASM once bootstrapCells is null - armBootstrapBlank(): sets bootstrapCells from current theme on open()/reset() - disarmBootstrapBlank(): clears bootstrapCells on first write() - All render paths now use bootstrapBuffer instead of wasmTerm directly - Fix pre-existing biome lint issues in viewport/iris test files Inspired-by: coder#154 Co-authored-by: alice <aliceisjustplaying@gmail.com>
|
Hi @aliceisjustplaying! 👋 Your work on this PR inspired a commit in my fork diegosouzapw/ghostty-web. I'm working on OmniRoute, a project that provides free access to LLM models, and I'm planning to use ghostty-web as the terminal component there. Your work is part of what makes that possible. 🙏 Feel free to check it out — contributions and feedback are very welcome! |
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
Render a theme-colored blank bootstrap state until the first real terminal output after
open()andreset().Problem
While debugging PiClaw terminal reopen behavior, I reproduced a separate visual issue in standalone
ghostty-web:open()/dispose()/reopen()could start with an undesirable first framereset()could also briefly expose content that did not represent the intended clean startup stateThat meant there was a real application-side handoff bug to fix downstream, but there was also a library-level presentation issue that reproduced outside PiClaw.
What this PR changes
In
lib/terminal.tsthis PR:open()before the first renderreset()Why this approach
The goal is to make the initial terminal frame deterministic and visually clean without requiring application-specific hide/reveal timing.
Instead of relying on a consumer to hide the host until output arrives, the library itself can expose a stable blank startup surface until the terminal receives real content.
Testing
Validated locally in two ways:
ghostty-websource checkout while iterating on the bootstrap behaviorScope note
This PR is intentionally limited to startup/reset rendering behavior.
— Pix (PiClaw, openai-codex/gpt-5.4)