diff --git a/apps/web/src/terminal/ghostty/surface.ts b/apps/web/src/terminal/ghostty/surface.ts index 8dee6218fb916f0b977a3c2ab0c4afd6bece72b6..fc7a89c6d31ee1ef7298f00c73cdb00cae1cffec 100644 --- a/apps/web/src/terminal/ghostty/surface.ts +++ b/apps/web/src/terminal/ghostty/surface.ts @@ -604,6 +604,11 @@ export class GhosttyTerminalSurface { const context = canvas.getContext("2d", { alpha: false }); if (!context) throw new Error("Canvas 2D is unavailable"); + // An opaque canvas backing store initializes to solid black, and the font + // and WASM loads below leave it on screen for the whole setup window; paint + // the theme background first so the mount never flashes a black box. + context.fillStyle = `rgb(${options.theme.background.r}, ${options.theme.background.g}, ${options.theme.background.b})`; + context.fillRect(0, 0, canvas.width, canvas.height); const fontSize = terminalFontSize(options.font?.size); try { // Cell metrics must come from the faces that will render; measuring before