Skip to content

🐛 fix(showcase): keep the labs off a phone's Search, and say so when one is reached - #120

Merged
JadRizk merged 2 commits into
mainfrom
fix/phone-labs-palette-notice
Oct 11, 2026
Merged

JadRizk merged 2 commits into
mainfrom
fix/phone-labs-palette-notice

Conversation

@JadRizk

@JadRizk JadRizk commented Oct 10, 2026

Copy link
Copy Markdown
Owner

What

Follow-up to #117, which stopped offering Graph and Glitch Lab on a phone (under 640px) from the header and Home, because both are docked desktop consoles with no phone layout. Two ways in were left open:

  1. Search (⌘K) still listed both labs at any width. The palette now leaves them out below 640px, followed live as the window resizes.
  2. A lab reached on a phone anyway, for example from a shared link, mounted a console that does not fit. It now shows a short notice instead: "Graph is built for a desktop", with links to the docs and Home and an Open it anyway button. Each lab is keyed, so opening one anyway does not open the other.

phone.ts holds the 640px breakpoint for script (PHONE_QUERY, useIsPhone over useSyncExternalStore), cross-referenced from the CSS rule that hides the labs.

Checklist

  • npm run lint: not run locally (eslint-plugin-sonarjs is missing from this checkout); CI is the check.
  • npm run typecheck
  • npm run test / test:coverage: local Node 20.20 is below the repo's ≥22.12 floor; CI is the check. No unit-tested code changes.
  • Changeset: none needed; nothing under packages/*/src changes.
  • One concern: the labs on a phone.
  • Browser suite passed locally (242); no baselines change, since desktop is untouched.
  • Native elements kept: links for navigation, a <button> for "Open it anyway".

Notes for the reviewer

  • The palette test checks both directions: no Glitch Lab result at 375px, then the same query finds it once the window is widened to 1280px. Without that control, a query that matched nothing would pass too.
  • The notice decides before mounting, so a phone does not start the WebGL console it is about to explain away.

🤖 Generated with Claude Code

JadRizk and others added 2 commits October 10, 2026 21:14
…one is reached

Follow-up to #117, which stopped offering Graph and Glitch Lab on a phone
from the header and Home but left two ways in.

Search (⌘K) still listed both labs at any width. The palette now leaves
them out below 640px, read live from the new phone.ts (PHONE_QUERY,
useIsPhone), which holds the CSS breakpoint for script.

A lab reached on a phone anyway, from a shared link, mounted a desktop
console that does not fit. It now says it is built for a desktop, with
links to the docs and Home and an "Open it anyway" button. Each lab is
keyed, so opening one anyway does not open the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JadRizk
JadRizk merged commit 82ced71 into main Oct 11, 2026
4 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