Skip to content

Prevent terminal loading flash - #5432

Merged
juliusmarminge merged 1 commit into
mainfrom
smooth-terminal-loading-state
Aug 5, 2026
Merged

Prevent terminal loading flash#5432
juliusmarminge merged 1 commit into
mainfrom
smooth-terminal-loading-state

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Aug 5, 2026

Copy link
Copy Markdown
Member

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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

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 with options.theme.background so 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.

- Paint the themed canvas background before font and WASM initialization
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e359dba7-f352-4ba9-918f-cc7134a8a773

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 5, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@juliusmarminge
juliusmarminge merged commit 7251f1a into main Aug 5, 2026
17 checks passed
@juliusmarminge
juliusmarminge deleted the smooth-terminal-loading-state branch August 5, 2026 21:09
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant