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
(cherry picked from commit 7251f1a)
(cherry picked from commit 7251f1a)
(cherry picked from commit 7251f1a)
(cherry picked from commit 7251f1a)
(cherry picked from commit 7251f1a)
Imports the tree delta from the fork/candidates tree recorded in the fork-dev/2026-08-06.1 checkpoint to a rebuilt fork/candidates carrying upstream main a2ca89a. Five upstream commits enter the product: a2ca89a feat: native subagent & workflow observability (pingdotgg#5219) 990bb0b fix: reconnect faster after remote server updates (pingdotgg#5404) 7251f1a Prevent terminal loading flash (pingdotgg#5432) 30e4715 fix(web): preserve terminal font size when splitting (pingdotgg#5444) de592a0 Enrich terminal font previews (pingdotgg#5428) importedCandidatesCommit: 9655a9ba955197361044ef6f8f97e35841ff779e importedCandidatesTree: 50f9bfab717c30a8ea90d52060349e209502d116 importedUpstreamCommit: a2ca89a previousCandidatesTree: 9b4cd3e Seven files conflicted against the fork/dev product tree. Most are independent additions on both sides and resolve as unions: upstream's backgroundLiveness alongside identity's originSource/participantSummaries, upstream's agent-spawn CTA rows alongside the imported user-input Q&A timeline. Two needed more than a union. apps/mobile threadActivity.ts: upstream's isAgentInternalActivity skip guard must run before identity's resolved-user-input enrichment. Concatenating the sides in the other order would enrich and push agent-internal rows that upstream intends to drop. apps/web Sidebar.logic.ts: the 3-way merge welded upstream's hasPlanReadyPrompt condition onto the "Wake Required" return body, so a plan-ready thread would have rendered as Wake Required and no thread could ever reach Plan Ready. Both branches are restored with their own bodies. The status rank map is merged onto upstream's new scale with Wake Required kept at the Working/Connecting tier, matching its relative position before the import. Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
Imports the tree delta from the fork/candidates tree recorded in the fork-dev/2026-08-06.1 checkpoint to a rebuilt fork/candidates carrying upstream main a2ca89a. Five upstream commits enter the product: a2ca89a feat: native subagent & workflow observability (pingdotgg#5219) 990bb0b fix: reconnect faster after remote server updates (pingdotgg#5404) 7251f1a Prevent terminal loading flash (pingdotgg#5432) 30e4715 fix(web): preserve terminal font size when splitting (pingdotgg#5444) de592a0 Enrich terminal font previews (pingdotgg#5428) importedCandidatesCommit: 9655a9b importedCandidatesTree: 50f9bfa importedUpstreamCommit: a2ca89a previousCandidatesTree: 9b4cd3e Seven files conflicted against the fork/dev product tree. Most are independent additions on both sides and resolve as unions: upstream's backgroundLiveness alongside identity's originSource/participantSummaries, upstream's agent-spawn CTA rows alongside the imported user-input Q&A timeline. Two needed more than a union. apps/mobile threadActivity.ts: upstream's isAgentInternalActivity skip guard must run before identity's resolved-user-input enrichment. Concatenating the sides in the other order would enrich and push agent-internal rows that upstream intends to drop. apps/web Sidebar.logic.ts: the 3-way merge welded upstream's hasPlanReadyPrompt condition onto the "Wake Required" return body, so a plan-ready thread would have rendered as Wake Required and no thread could ever reach Plan Ready. Both branches are restored with their own bodies. The status rank map is merged onto upstream's new scale with Wake Required kept at the Working/Connecting tier, matching its relative position before the import. Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
Imports the tree delta from the fork/candidates tree recorded in the fork-dev/2026-08-06.1 checkpoint to a rebuilt fork/candidates carrying upstream main a2ca89a. Five upstream commits enter the product: a2ca89a feat: native subagent & workflow observability (pingdotgg#5219) 990bb0b fix: reconnect faster after remote server updates (pingdotgg#5404) 7251f1a Prevent terminal loading flash (pingdotgg#5432) 30e4715 fix(web): preserve terminal font size when splitting (pingdotgg#5444) de592a0 Enrich terminal font previews (pingdotgg#5428) importedCandidatesCommit: 9655a9b importedCandidatesTree: 50f9bfa importedUpstreamCommit: a2ca89a previousCandidatesTree: 9b4cd3e Seven files conflicted against the fork/dev product tree. Most are independent additions on both sides and resolve as unions: upstream's backgroundLiveness alongside identity's originSource/participantSummaries, upstream's agent-spawn CTA rows alongside the imported user-input Q&A timeline. Two needed more than a union. apps/mobile threadActivity.ts: upstream's isAgentInternalActivity skip guard must run before identity's resolved-user-input enrichment. Concatenating the sides in the other order would enrich and push agent-internal rows that upstream intends to drop. apps/web Sidebar.logic.ts: the 3-way merge welded upstream's hasPlanReadyPrompt condition onto the "Wake Required" return body, so a plan-ready thread would have rendered as Wake Required and no thread could ever reach Plan Ready. Both branches are restored with their own bodies. The status rank map is merged onto upstream's new scale with Wake Required kept at the Working/Connecting tier, matching its relative position before the import. Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
First run of the provenance synchronization from [#342](#342) — and the answer to "get the latest upstream onto `fork/dev`". Five upstream commits enter the product: | | | | --- | --- | | `a2ca89aa` | feat: native subagent & workflow observability (pingdotgg#5219) | | `990bb0b6` | fix: reconnect faster after remote server updates (pingdotgg#5404) | | `7251f1a1` | Prevent terminal loading flash (pingdotgg#5432) | | `30e47153` | fix(web): preserve terminal font size when splitting (pingdotgg#5444) | | `de592a00` | Enrich terminal font previews (pingdotgg#5428) | 54 files, +7,055 / −175. ## Checkpoint ```json { "importedCandidatesCommit": "9655a9ba955197361044ef6f8f97e35841ff779e", "importedCandidatesTree": "50f9bfab717c30a8ea90d52060349e209502d116", "importedUpstreamCommit": "a2ca89aa10f13a2222e08afd98c66285121d5ba2", "previousCandidatesTree": "9b4cd3e1c774c3c436e43305c151edf596b2936a" } ``` `previousCandidatesTree` is C1 from tag `fork-dev/2026-08-06.1`. Tag the merge commit `fork-dev/2026-08-06.2` with the values above once this lands. ## Two resolutions worth reviewing Most of the 7 conflicted files are independent additions on both sides and resolve as unions — upstream's `backgroundLiveness` beside identity's `originSource`/`participantSummaries`, upstream's agent-spawn CTA rows beside the imported user-input Q&A timeline. Two were not unions: **`apps/web/src/components/Sidebar.logic.ts`** — the 3-way merge welded upstream's `hasPlanReadyPrompt` condition onto the `"Wake Required"` return body. Left alone, a plan-ready thread would render as **Wake Required** and no thread could ever reach **Plan Ready**. Both branches are restored with their own bodies. The status rank map is merged onto upstream's new scale with `Wake Required` at the `Working`/`Connecting` tier — its relative position before the import. **That tier placement is a judgement call; say if you want it ranked differently.** **`apps/mobile/src/lib/threadActivity.ts`** — upstream's `isAgentInternalActivity` skip guard must run *before* identity's resolved-user-input enrichment. The other order enriches and pushes exactly the agent-internal rows upstream means to drop. ## Validation - All 12 `fork/candidates` commits replayed onto the rebuilt `fork/tim`; `a2ca89aa1` confirmed an ancestor of the new candidates tip. - No residual conflict markers; brace balance checked on the hand-edited files. - **Typecheck and tests have not run locally** — the rebase workspace has no `node_modules`. Fork CI on this PR is the first real verification. Do not merge on the strength of this description. ## Provenance branches not yet pushed `fork/base` → `4a73589` and `fork/tim` → `b1c5fa5` are rebased and `fork/candidates` → `9655a9ba` is rebuilt, but all three are **local only**. The ruleset *Protect fork/tim, candidates, integration* sets `non_fast_forward` with no bypass actor and the app token has no `administration` scope, so I cannot force-push them. Until they are pushed, `importedCandidatesCommit` refers to a commit that exists nowhere on the remote. The tree is what the delta depends on, but the checkpoint is not fully honest until that push happens. Co-authored by [@patroza](https://github.com/patroza) opened by [Patrick Roza](https://discord.com/users/95218063095377920) in chat thread **Discord** · [Discord](https://discord.com/channels/1083767712431480922/1534783738322485399/1534783738322485399) · [T3](https://t3vm/?thread=584a9ad3-243e-4308-8a13-49acdd758b17) Co-authored-by: omegent-app[bot] <306514130+omegent-app[bot]@users.noreply.github.com> Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>
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.