Skip to content

fix: black-button text contrast + Tutorial viewport clamping#94

Merged
kh0ra merged 1 commit into
mainfrom
fix/ui-tutorial-buttons
May 11, 2026
Merged

fix: black-button text contrast + Tutorial viewport clamping#94
kh0ra merged 1 commit into
mainfrom
fix/ui-tutorial-buttons

Conversation

@kh0ra
Copy link
Copy Markdown
Contributor

@kh0ra kh0ra commented May 11, 2026

Summary

Two production UI bugs reported on the live domain:

1) Black buttons had invisible labels. Light theme defined --color-text-inverse: #1a1a1a (same near-black as --color-text). Any component using bg: var(--color-text) + color: var(--color-text-inverse) rendered as black-on-black. Affected: Tutorial Next/Done, PairQueue accept, ExecutionReplay primary, ProfileSetup save button + selected-avatar check stroke. Hard-coded white (#ffffff) on those 5 surfaces. Left the token alone so accent-pink consumers (MorphicTabs etc.) keep their black labels.

2) Tutorial card buttons disappeared at bottom step. The card naively used rect.bottom + 16 for placement, which pushed it past the viewport when the spotlighted target sat near the page bottom (the 'Built with' Step 4). Card now picks above/below based on available space, falls back to a viewport-bottom-pinned position, and clamps to viewport bounds. Also adds maxHeight + overflowY:auto so the action buttons stay reachable even if the body grows.

Verified

  • Step 1 → Step 4 in preview: card always inside viewport, all 3 action buttons visible
  • Next/Done buttons computed style: background: rgb(26,26,26) + color: rgb(255,255,255)
  • typecheck green, build 10.16s green

Two related polish bugs:

1) Light theme had --color-text-inverse: #1a1a1a (same near-black as
   --color-text). Components that built a 'primary' button with bg:
   --color-text + color: --color-text-inverse rendered as
   black-on-black, invisible label. Fixed by hard-coding white (#fff)
   on the affected 5 surfaces (Tutorial Next, PairQueue accept,
   ExecutionReplay primary, ProfileSetup save + selected-thumb check
   stroke). Left the token alone so accent-bg consumers
   (MorphicTabs etc.) aren't affected.

2) Tutorial card popped below the viewport on steps whose target
   sat near the page bottom (and the 'Built with' last step in
   particular). Card position now clamps to viewport bounds — picks
   above/below based on available space, falls back to a bottom-pinned
   position when neither fits. Also adds maxHeight + overflowY:auto
   on the card so a future longer body can scroll without pushing
   the action buttons off-screen.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
liminal Building Building Preview, Comment May 11, 2026 2:39pm

@kh0ra kh0ra merged commit 8ce03d5 into main May 11, 2026
2 of 3 checks passed
kh0ra added a commit that referenced this pull request May 11, 2026
Three production fixes:

1. Service worker: disabled registration and added an active cleanup
   pass that unregisters any previously-installed SW and clears its
   CacheStorage entries on every page load. Stops the 'old bundle
   served from SW cache' footgun that was hiding new deploys
   (including the routing + button-text fixes from PR #93 + #94).
   Trade-off: no offline shell. Acceptable through the hackathon
   submission window; can be re-enabled with a versioned SW after.

2. Uppercase eyebrows / stat labels: stripped 30 'textTransform:
   uppercase' rules across 15 components (pages, panels, replay,
   tutorial, pair queue, etc.). Stat labels and eyebrows now render
   in the case authored in the source string ('Analytics' instead of
   'ANALYTICS', 'Routed volume' instead of 'ROUTED VOLUME', etc.),
   per the polish ask.

3. MEV popover layer status: 'ACTIVE' / 'READY' -> 'Active' / 'Ready'.
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