Prevent terminal loading flash - #5432
Conversation
- Paint the themed canvas background before font and WASM initialization
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Approved 4dc2b90 Simple visual fix that paints the terminal canvas with the theme background color to prevent a black flash during initialization. Uses existing theme configuration and standard canvas APIs with no runtime behavior changes beyond the cosmetic improvement. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * fix(web): preserve terminal font size when splitting by @t3-code[bot] in pingdotgg/t3code#5444 * Prevent terminal loading flash by @juliusmarminge in pingdotgg/t3code#5432 **Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260805.1008...v0.0.32-nightly.20260805.1009 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260805.1009
What Changed
Paint the terminal canvas with the configured theme background immediately after creating its 2D context, before font and WASM initialization completes.
Why
Opaque canvas backing stores start black, causing a visible black box during terminal setup. Initializing the canvas with the theme background prevents the loading flash while the terminal finishes mounting.
UI Changes
The terminal no longer flashes black during initialization. Before/after screenshots are not included.
Checklist
Note
Low Risk
Single early paint in terminal mount path; no auth, data, or behavioral logic changes.
Overview
Fixes a black flash while the Ghostty terminal canvas is still setting up (fonts, WASM, first render).
Right after creating the opaque 2D context in
GhosttyTerminalSurface.create, the canvas is filled once withoptions.theme.backgroundso the mount shows the theme color instead of the default black backing store until initialization finishes.Reviewed by Cursor Bugbot for commit 4dc2b90. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Prevent black canvas flash during terminal initialization
Fills the canvas with the theme background color immediately after the 2D context is created in
GhosttyTerminalSurface, before async font loading begins. This eliminates a transient black frame visible during terminal startup.Macroscope summarized 4dc2b90.