Terminal canvas wears the terminal theme (black keyboard flash) - #2
Merged
Conversation
The pane stops at the visual viewport while a phone keyboard is up, and rubber-band overscroll runs past the page; both bands showed the document canvas, which followed the app scheme rather than the terminal theme — a dark OS under a light terminal put a black flash behind every keyboard open. The canvas now takes the terminal palette's background at every site that paints the pane, and hands its colour back on unmount so the rest of the app keeps the stylesheet's. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The review pointed at viewport.ts, which litigated this exact teardown question two commits ago and answered with a guarded release; the canvas restore now gives the same answer. A cleanup that unconditionally wrote its saved colour back could claw the canvas from a replacement owner that painted first. Also pinned in test: the pane half of paintGround, and an afterEach reset so a canvas leak fails locally. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CLAUDE.md records the workflow for agent sessions: branch always, PR always, and the test surface to run before pushing — including the Tailwind prose-scanner guard that makes comment-writing in web/ a build concern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same signature to the byte as 2026-08-07 — subscriber closed over an empty ring at 0.00s, ubuntu only, on a PR touching neither session nor any Go file. The follow-up note said instrument if it recurs; recurred, so the note now says what to log. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
karngyan
added a commit
that referenced
this pull request
Aug 8, 2026
PR #2 recorded the second sighting and asked for instrumentation; this branch is the diagnosis and the fix, so the merged note keeps the second sighting's forensics and retires the instrumentation ask. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The bug
Opening the phone keyboard pins the terminal pane to the visual viewport; the band below it — and rubber-band overscroll past the page — shows the document canvas. The canvas followed the app scheme (
--flue-canvas, prefers-color-scheme), not the terminal theme, so a dark OS under a light terminal theme flashed black on every keyboard open.The fix
While a terminal is mounted, the
htmlelement wears the terminal palette's background, painted through onepaintGroundhelper at every site that paints the pane — mount, OS scheme change, theme apply, cross-tab theme sync — and handed back on unmount. The restore is guarded (surrenders only what the effect still owns), matching the answerviewport.ts's disposer gave the same teardown question.Also in the branch:
CLAUDE.mdrecording the new workflow rule —mainis protected, everything lands by PR.Tests: canvas paint + theme-change + hand-back, the no-claw-back guard, pane half pinned,
afterEachcanvas reset. Web suite 601/601 incl. the Tailwind prose-scanner build guard;tscclean.🤖 Generated with Claude Code