The body wears the terminal theme too (black bar under the keyboard) - #5
Merged
Conversation
Painting the document canvas with the terminal's background fixed the band a phone keyboard reveals only in theory. The body's box is the full height of the layout viewport, and a phone keyboard shortens only the visual one, so the body's own stylesheet colour paints over the canvas across exactly the strip the keyboard uncovers — zinc-950, which iOS 26 then shows around its keyboard slab and behind the form accessory bar as a black bar under the session. Only overscroll past the body's box ever reached the canvas the earlier fix claimed. paintGround now takes both grounds, with the same ownership-checked restore on unmount the canvas already had: a replacement owner can paint before this one tears down, and a stale cleanup must surrender only what it still owns. Co-Authored-By: Claude Opus 5 (1M context) <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 black bar under the session on a phone with the keyboard up is the
body, wearing the app's canvas colour instead of the terminal's.c362cbdpainteddocument.documentElementwith the terminal backgroundfor this exact band, but the canvas is not what the keyboard uncovers.
bodyish-fullof the layout viewport, and iOS shortens only thevisual viewport when the keyboard opens — so the body's box still spans
the whole screen, and its stylesheet
background-color: var(--flue-canvas)paints over the canvas across precisely the strip below the viewport-pinned
pane. Under
prefers-color-scheme: darkthat iszinc-950(#09090b),which iOS 26 shows around its keyboard slab and behind the form accessory
bar as a black bar. Only rubber-band overscroll past the body's box ever
reached the canvas the earlier fix repainted, which is why that fix looked
right and the bar stayed.
paintGroundnow takes both grounds, so the pane, the canvas and the bodycannot drift apart. Teardown keeps the restraint the canvas already had:
each ground is handed back only if it still holds what this effect painted,
because a replacement owner can paint before this one's cleanup runs.
Testing
terminal.test.tsx: the body follows the terminalbackground on mount and on a theme change, is handed back on unmount, and
is not clawed back from a newer owner. Both fail on
main.npx vitest run— 603 passed (40 files), includingstyles.build.test.ts,the real vite build that guards the Tailwind prose scanner against the new
comments.
npm run lint— clean.Not verified on a physical phone; the mechanism is covered by the tests and
by CSS canvas-propagation semantics, but a look on the device that produced
the screenshot is the last mile.
🤖 Generated with Claude Code