Skip to content

fix(web-ui): keep welcome brand and tagline from overlapping - #3854

Merged
bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fix-welcome-text-overlap
Nov 10, 2026
Merged

bobleer merged 1 commit into
openBitFun:mainfrom
bobleer:bob/fix-welcome-text-overlap

Conversation

@bobleer

@bobleer bobleer commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

The welcome scene's brand line ("OpenBitFun,") and the typed tagline could intermittently overlap: the brand glyphs were painted at full size over the first characters of the tagline.

The scene's type scale is now selected by a data-density attribute driven by a ResizeObserver, instead of CSS container queries. Breakpoints (560px / 400px) and per-tier font sizes, logo sizes and padding are unchanged.

Type and Areas

Type: Bug fix

Areas: web UI (welcome scene)

Motivation / Impact

In the reported screenshot the space laid out for "OpenBitFun" is about half of the painted width, matching the 16px (font-size-xl, @container (max-width: 400px)) to 32px (font-size-5xl) ratio. The scene can first lay out narrow (behind the startup overlay, or mid window resize) and then widen. WebKit resolves container queries inside layout and kept the inline run positions from the 16px tier while painting the white-space: pre brand text at 32px, so the tagline starts where the small text ended. It is timing dependent, hence intermittent.

An attribute change goes through ordinary style invalidation before layout, so the brand and tagline are re-measured on every tier change. A zero width (hidden scene) keeps the last tier.

Verification

  • pnpm --dir src/web-ui run test:run src/app/scenes/welcome/WelcomeScene.test.tsx src/app/startup/startupOverlay.test.ts: 24 passed, including a new test for narrow -> wide tier switching, zero-width retention and observer disconnect
  • pnpm run type-check:web: passed
  • Web UI dev preview (Chromium): same page resized 124px (tiny, 16px) -> 1100px (regular, 32px); brand text right edge and tagline left edge both at 868px, no overlap

Not reproduced or rechecked in the macOS WKWebView desktop app. Layout-only change; no remote scenario behavior is affected.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

The welcome scene switched its type scale with CSS container queries.
When the scene first lays out narrow (behind the startup overlay or
during a window resize) and then widens, WebKit resolves the container
query inside layout and keeps the inline positions measured at the
16px tier while painting the brand at 32px, so "OpenBitFun" is drawn
over the tagline.

Derive the width tier from a ResizeObserver and expose it as a
data-density attribute. The attribute change goes through ordinary
style invalidation before layout, so the text is re-measured. Tier
thresholds and per-tier sizes are unchanged.
@bobleer
bobleer merged commit afffb9c into openBitFun:main Nov 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant