Skip to content

feat(queen): phone portrait layout for the shell and the shared comb - #981

Open
gHashTag wants to merge 1 commit into
mainfrom
feat/queen-phone-portrait
Open

feat(queen): phone portrait layout for the shell and the shared comb#981
gHashTag wants to merge 1 commit into
mainfrom
feat/queen-phone-portrait

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 9, 2026

Copy link
Copy Markdown
Owner

What

Phone-portrait layout for the queen shell and the shared comb (t27.ai/#/queen), driven by the owner's screenshot of the page on a phone (2026-09-10, 390×844).

Measured before → after (390×844, production build)

Element Before After
.queen27-hud-vp-head height 166px (two tool rows) 110px (one row, horizontal scroll)
.queen27-hud-vp-body padding-top 124px 8px
Field top (.queen27-comb-field) y=378 (fixed to window) y=206, 358×494 inside the layer
Law strip + «Find cells» across the middle of the map under the field, y=700 (h56)
Region labels 90×50, three lines, overlapping ~85×40, two lines, no overlap
Footer tabs 84px 64px, command tiles 56px
Comb width in a 358px field ~180px (label allowance 160×110) ~250px (allowance 80×64 when host < 641px)

Search-open state: field shrinks to 395px, map stays visible.

How

  • New src/pages/queen-phone.css, one media block (max-width: 640px) and (min-height: 501px): no desktop or landscape rule changes.
  • Imported after Queen.css in Queen.tsx and after the Queen.css import in QueenCatalogHive.css, so at equal specificity it wins. Root cause documented in the file header: the desktop padding rule at Queen.css ~4454 beat the ≤900px phone rule at ~4347.
  • Field and labels layer are absolute inside the embedded comb: the fixed full-window field centred the scene on the window (under the head); the labels layer must share the canvas origin because projections are canvas-relative.
  • QueenCombBabylon.fit(): label allowance 160×110 → 80×64 when the host is narrower than 641px (comment in code).

Checks

  • node scripts/typecheck-ratchet.mjs: 179 errors / 26 files, baseline 179 / 26, no file gained errors
  • eslint on touched files: clean
  • qa/queen-responsive.mjs: PASS
  • vite build: OK; verified visually on the built bundle at 390×844 (comb, search-open, kanban, specs, mission)

Not in this PR

  • Specs explorer overlap inside its own iframe on phones: pre-existing, untouched.
  • wasm/trinity-canvas.js untouched.

Related: gHashTag/999-multibots-telegraf#2324 (the Mini App «Улей» tab embeds this page whole).

Measured on a 390x844 viewport from the owner's screenshot of t27.ai/#/queen
(2026-09-10): the head took 166px in two rows, the body padding pushed the
field to y=378, the law strip cut the map in the middle, five 90x50 region
labels covered each other's portals and the footer tabs stood 84px tall.

queen-phone.css (one media block, max-width 640 and min-height 501, so no
desktop or landscape rule changes):
- head 166 -> 110px: one-row tools with horizontal scroll, no wrap
- body padding-top 124 -> 8px: the desktop rule at Queen.css ~4454 beat the
  phone rule at ~4347 in the cascade; this file loads after Queen.css
- law strip + Find cells move under the field (layer rows 1fr auto)
- field and labels layer are absolute inside the embedded comb: the fixed
  full-window field centred the scene under the head; labels share the
  canvas origin because projections are canvas-relative
- region labels 90x50 -> ~85x40 (two lines, 0.68rem, no 44px floor)
- footer 84 -> 64px, command tiles 56px

QueenCombBabylon fit(): label allowance 160x110 -> 80x64 when the host is
narrower than 641px; on a 358px field the old allowance left ~180px for the
comb, now ~250px.

Verified on a production build served at 390x844: head 110, field 358x494,
toolbar at y=700 (h56), footer 64, labels 40px tall, search-open state
shrinks the field to 395px and keeps the map visible. Kanban, Specs and
Mission views checked for regressions; the Specs explorer overlap inside
its own iframe is pre-existing and untouched.

Checks: typecheck ratchet 179/179 baseline, eslint clean on touched files,
qa/queen-responsive.mjs PASS, vite build OK.
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