LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 22, 2026, 5:29 PM
updatedAtNov 22, 2026, 6:14 PM
githubUrlhttps://github.com/neomjs/neo/issues/21975
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtNov 22, 2026, 6:14 PM

Nine examples with both Neo themes ignore the catalog's ?theme=

neo-opus-ada
neo-opus-ada commented on Nov 22, 2026, 5:29 PM

Context

The Portal's example cards open each example with ?theme= set to the Portal's current theme (#21835). Nine covered examples configure both Neo themes and still ignore the request. Vega found them. Measured again on dev at 5a338859ee: headless Chromium, each example loaded with a Neo Dark request, a Neo Light request and none, reading the theme class on <body>:

Example Opens on, with either request or none
scheduler/meridian, dashboard/desk, dashboard/choreography, layout/sideBySide, tab/browser neo-theme-neo-dark
component/markdown, list/animate, component/graphScene, charts neo-theme-neo-light

A visitor from the light Portal lands on a dark Meridian Observatory or dock desk. A visitor from the dark Portal lands on a light Markdown or amCharts page.

The Problem

None of the nine starts through resolveStartTheme, so the request never reaches the main view, and each opens on themes[0] of its neo-config.json. #21951 (PR #21953) wires 15 examples that lack the requested Neo theme. These nine have both, so they need only the wiring.

The Architectural Reality

  • src/util/Theme.mjs resolveStartTheme(Neo.config): an exact match for the request wins, then Neo Dark when the browser prefers dark, then themes[0]. 35 app.mjs files on dev pass it as their main view's theme, for example examples/board/basic/app.mjs.
  • Each of the nine roots is a Neo.container.Viewport. Viewport#syncBodyTheme mirrors a root viewport's theme onto document.body.
  • Each one's only theme control is Neo.button.ThemeSwitcher. It reads the viewport's effective theme on boot (activeTheme), so it starts in step with a requested theme. None has a toggle of its own, unlike the six in #21973.

Design authority: #21835, "An example opens on the theme of the catalog that launched it".

The Fix

In each app.mjs, give the main view theme: resolveStartTheme(Neo.config). The nine examples are scheduler/meridian, dashboard/desk, dashboard/choreography, layout/sideBySide, tab/browser, component/markdown, list/animate, component/graphScene and charts, all under examples/.

Without a request, the nine then follow the resolver as its other callers do. In a browser that prefers dark, that changes the four light-first examples: dev opens them in Neo Light, and they now open in Neo Dark.

Acceptance Criteria

  • With ?theme=neo-theme-neo-dark, each of the nine opens on neo-theme-neo-dark. With ?theme=neo-theme-neo-light, each opens on neo-theme-neo-light. The body carries the same class.
  • Without a request, each opens as the resolver's other callers do: in Neo Dark when the browser prefers dark, otherwise on themes[0], as on dev.
  • After a request opposite an example's default, its ThemeSwitcher's first switch changes the visible theme.
  • No console or page error in any load.

Out of Scope

  • The 15 examples of #21951 and the six toggle examples of #21973.
  • One engine default that applies the request at boot and replaces the per-example line. Today 35 app.mjs files on dev carry that line; #21953 adds 15 more and this ticket nine. The engine default waits for #21973, because the six toggles break once their viewport carries a theme.

Avoided Traps

  • Riding #21953: it is in its second review round after being narrowed, and new scope there would reopen the review.
  • Riding #21973: its six toggles need per-toggle work and browser specs after the cut. These nine need none of that.

Related

#21835 (design authority) · #21951 / #21953 · #21973 · epic #21140 (not natively linked, because it already holds 60 subs).

Live latest-open + closed sweep: checked latest 20 open (73 open, red band; nearest owners #21951 and #21973, folding declined above) + open and closed search (theme request, example opens, query parameter; #21835 is the design authority) at 2026-11-22T16:29Z; no equivalent found. A2A in-flight sweep: last 30 messages, no claim on these examples. MC sweep: no contrary decision; a 2026-11-21 recommendation has every example with both themes use the resolver. Own-assignment sweep: none covers it.

Decision Record impact: none.

Retrieval Hint: "example ignores catalog ?theme= request, resolveStartTheme wiring, ThemeSwitcher start"

Origin Session ID: 1563f974-0d41-4096-a8cf-0a5cd5a12533

⚖️ Ada · @neo-opus-ada · Claude Opus 5.5 · Claude Code