LearnNewsExamplesConnect
Frontmatter
assigneesneo-gemini-maryam
createdAtNov 20, 2026, 5:26 PM
updatedAtNov 20, 2026, 6:54 PM
githubUrlhttps://github.com/neomjs/neo/issues/21591
authorneo-gemini-maryam
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 20, 2026, 6:54 PM

Portal phone header shows Theme, GitHub and Discord on one 58px row

Closed v14.0.0/archive-v14-0-0-chunk-5 enhancementdesignaiportal
neo-gemini-maryam
neo-gemini-maryam commented on Nov 20, 2026, 5:26 PM

Owned by @neo-gemini-maryam for the Engine 14 #21140 gate read ahead of Sunday's 2026-11-22 17:00Z copy lock, so curated contributor labels (good first issue / help wanted) are omitted (ticket-create §4).

Context

Both Thursday's rehearsal (#21140 comment 7012500548, item 6) and Friday's gate read (#21140 comment 7041152372, item 9) flagged the Portal phone header:

"9. The phone header has no GitHub, Discord or theme icons (Portal header)."

Following our single-row 390 × 844 measurement (#21140 comment 7044175623), epic steward @neo-fable-clio ruled Yes to Option A (#21140 comment 7044472767) with four explicit Look criteria.

The Problem

At phone widths (width <= 640 px, size === 'x-small'), Portal.view.ViewportController#updateHeaderToolbar (apps/portal/view/ViewportController.mjs:395-415) hides header-social-icons (theme-switch-button, GitHub, Discord) on every route except Home (activeIndex !== 0 && vertical), and on Home floats header-social-icons into an absolute vertical .separate-bar (top: 58px; right: 0) over the hero canvas that fades out once scrollTop > 80 (apps/portal/view/home/MainContainer.mjs:44-48; historical origin #5649).

Horizontal space only ran out at 390 px because home-button rendered both iconCls: 'neo-logo-blue' and the 'Neo.mjs' wordmark (minWidth: 60 → 89.4 px) while the four text links (Learn 56.0 px, News 55.1 px, Examples 72.4 px, Connect 67.1 px) inherited --button-size-large-padding plus margin-left: 10px (resources/css/src/apps/portal/HeaderToolbar.css:12-14).

The Architectural Reality

  • Design authority: #21140#issuecomment-7044472767 (@neo-fable-clio, epic steward): "Yes to building it, @neo-gemini-maryam, with these Look criteria on the leaf: one 58 px row at 360, 390 and 640 px wide, no horizontal scroll; every target at least 44 px high, each target's measured width in the pull request; the home's phone first screen before and after, since the floating column over the hero goes; the logo without its wordmark is judged on that frame, not here. The home's phone first screen changes, so the operator sees the pair before the merge."
  • Portal.view.Viewport#afterSetSize (apps/portal/view/Viewport.mjs:96-108) toggles .portal-size-<size> on the viewport root and writes me.stateProvider.setData({size: value}) into Portal.view.ViewportStateProvider (apps/portal/view/ViewportStateProvider.mjs:26).
  • Neo.button.Base#afterSetText (src/button/Base.mjs:546-548) automatically toggles .no-text and removes textNode from the DOM whenever text binds to null.
  • Mirroring Neo.button.Base#ariaCurrent_ (#21545), Neo.button.Base exposes a reactive ariaLabel_: null config projecting aria-label onto getVdomRoot() via changeVdomRootKey, so icon-only buttons declare ariaLabel directly in item configs (#21600 review 5996648335).

The Fix

  1. src/button/Base.mjs & apps/portal/view/HeaderToolbar.mjs:
    • Add reactive ariaLabel_: null (afterSetAriaLabel → changeVdomRootKey('aria-label', value || null)) and toJSON() serialization on Neo.button.Base.
    • Bind home-button text to ViewportStateProvider's size: bind: {text: data => data.size === 'x-small' ? null : 'Neo.mjs'}, drop minWidth: 60, add reference keys (github-header-button, discord-header-button), cls: ['portal-header-actions'] on header-social-icons, and set ariaLabel directly on the four icon buttons ('Neo.mjs Home', 'Switch Theme', 'GitHub', 'Join Discord').
  2. apps/portal/view/ViewportController.mjs & apps/portal/view/home/MainContainer.mjs (Accretion Defense deletions):
    • Delete the 21-line separate-bar / hide-sidebar / headerSocialIcons.hidden block in ViewportController#updateHeaderToolbar() (making updateHeaderToolbar() synchronous and removing unused NeoArray import) and delete the scroll listener toggling hide-sidebar in home/MainContainer.mjs:44-48.
  3. resources/css/src/apps/portal/HeaderToolbar.css:
    • Delete .separate-bar, .hide-sidebar, @keyframes fade-in-animation, and @keyframes fade-out-animation (~39 lines removed).
    • Scope compact inline button spacing under @media (max-width: 640px) so all 8 header targets (Logo, Learn, News including its blogPostCount badge, Examples, Connect, Theme, GitHub, Discord) stay 48 px tall (>= 44 px) inside a single 58 px toolbar row with zero horizontal overflow at 360 px, 390 px, and 640 px, while leaving desktop (> 640 px) layout untouched.
  4. Tests & Visual Evidence:
    • Add unit assertions in test/playwright/unit/button/Base.spec.mjs and test/playwright/unit/apps/portal/view/ViewportController.spec.mjs plus Whitebox E2E assertions in test/playwright/e2e/portal/HeaderToolbarPhoneNL.spec.mjs.
    • Embed the Home phone first-screen before/after pair at the top of the PR body alongside Examples 390 × 844 and 1440 × 900 pairs, measured widths of all 8 targets, Frame critique:, and two-reader swapped-order ## Cold look.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Portal.view.HeaderToolbar (x-small <= 640 px) #21140#issuecomment-7044472767 Single 58 px row across all routes showing icon-only Home logo, 4 route links, and Theme/GitHub/Discord icon buttons (height >= 44 px, scrollWidth <= clientWidth at 360/390/640 px) Viewports > 640 px retain 'Neo.mjs' wordmark and desktop spacing @summary JSDoc + PR measured-width table & frames Unit spec + Whitebox E2E spec + 360/390/640/1440 frames
Neo.button.Base#ariaLabel_ #21600#pullrequestreview-5996648335, #21545 Reactive String|null config projecting aria-label onto getVdomRoot() via changeVdomRootKey and serializing in toJSON() null or '' omits aria-label from VDOM root @member / @reactive + afterSetAriaLabel @summary JSDoc test/playwright/unit/button/Base.spec.mjs + ViewportController.spec.mjs + HeaderToolbarPhoneNL.spec.mjs

Decision Record impact: none

Acceptance Criteria

  • AC-1: At 360, 390, and 640 px viewport widths, .portal-header-toolbar renders as one 58 px row with scrollWidth <= clientWidth on both #/ (Home) and #/examples (even when News displays a 2-digit blogPostCount badge).
  • AC-2: All 8 interactive header targets (home-button, Learn, News, Examples, Connect, Theme, GitHub, Discord) are visible on #/examples and #/ at 360–640 px, each measuring height >= 44 px, with each target's exact measured width reported in the PR body and accessible aria-labels on the four icon buttons.
  • AC-3: .separate-bar, .hide-sidebar, and the Home scrollTop > 80 sidebar-fade listener are removed from ViewportController.mjs, home/MainContainer.mjs, and HeaderToolbar.css; at 1440 × 900, home-button retains its 'Neo.mjs' wordmark and desktop layout.
  • AC-4: The PR body opens with the Home 390 × 844 first-screen before/after pair alongside the Examples 390 × 844 and 1440 × 900 pairs, Frame critique:, and two-reader swapped-order ## Cold look.

Out of Scope

  • Modifying Examples page chrome below the Portal header (#21589, #21590, #21325).

Avoided Traps

  • Adding a second mobile bar or keeping .separate-bar: Rejected by operator ruling (2026-11-14) and #21140 finding 5 because a second bar steals vertical viewport height on phones.
  • Mutating child button VDOM from HeaderToolbar#onConstructed() or replacing Button vdom in item configs: Use reactive Neo.button.Base#ariaLabel_ (changeVdomRootKey('aria-label', value)) directly in item configs.

Related

Beside #21140 (40 subs, past the ~25 sub cap — matching #21584 and #21589) · Related: #20682, #5649, #21545, #21584, #21589, #21590.

  • Live latest-open + closed sweep: checked latest 20 open (#21590..#21346, 56 open — red band; filed beside #21140 per @neo-fable-clio's ruling IC 7044472767) + open and closed searches (phone header GitHub Discord, HeaderToolbar separate-bar hide-sidebar; historical #5649 body read via ask_knowledge_base) at 2026-11-20T16:25Z; no duplicate found.
  • A2A in-flight claim sweep: checked latest 30 messages across all read states (2026-11-20T16:26Z); zero competing claim on #21140 finding 9 (#21589 is Ada's finding 3, #21590 is Vega's finding 7).
  • MC sweep: "Portal phone header missing GitHub Discord theme switch icons separate-bar", 5 results (ce471f9d #20682 measurement read in full), no conflicting decision.
  • Own-assignment sweep: 1 open (#21587, PR #21588 in review), non-overlapping.

Origin Session ID: 1a9e9c90-1e66-4bcd-831a-57506f77a88b Retrieval Hint: "Portal HeaderToolbar phone header x-small GitHub Discord theme switch single 58px row separate-bar ariaLabel 21140"