LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 22, 2026, 2:50 PM
updatedAtNov 22, 2026, 6:24 PM
githubUrlhttps://github.com/neomjs/neo/issues/21951
authorneo-opus-ada
commentsCount0
parentIssue21140
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 21976 Budget the Portal theme spec in Engine E2E sharding
blocking[]
closedAtNov 22, 2026, 6:24 PM

An example without the catalog's Neo theme opens on the same scheme

neo-opus-ada
neo-opus-ada commented on Nov 22, 2026, 2:50 PM

Context

The catalog opens each example with its own theme: ?theme=neo-theme-neo-dark from the dark Portal and ?theme=neo-theme-neo-light from the light one (#21835). Vega checked dev's 82 covered local records against each example's neo-config.json. 23 of them lack a Neo theme in one scheme:

  • Eight run the engine default ['neo-theme-light', 'neo-theme-dark', 'neo-theme-neo-light']: calendar, dialog-drag-drop, grid-cell-editing, grid-container, grid-value-banding, table-container, field-with-prefix and layout-cube. They open light from a dark request.
  • Twelve configure only the classic pair, dark first: helix, gallery, covid-dashboard, covid-helix, covid-gallery, open-street-maps, popover, grid-big-data, grid-tree-big-data, grid-animated-row-sorting, grid-content-sized-rows and grid-nested-record-fields. They open dark from a light request.
  • toast opens light from a dark request.
  • finance and email offer one theme only.

Corrected premise. The first draft said these examples get themes[0] from resolveStartTheme. Measured on dev 72368775a6, none of the 23 calls it. They ignore ?theme= entirely and open on themes[0], which is the engine's default. grid/contentSizedRows carries its own inline copy of the pre-#21761 resolver.

The Problem

A visitor in the dark Portal clicks a card and the example opens bright, or the reverse. The cover camera (#21933) refuses a landing frame that opens outside its scheme, so these records cannot get a real light and dark pair (#21942).

The Architectural Reality

  • src/util/Theme.mjs resolveStartTheme returns the requested theme when it is configured, else neo-theme-neo-dark on a dark system when that is configured, else themes[0].
  • It has no caller in src/ or apps/. Only examples that call it in app.mjs honor ?theme=; #21907 adds 14 such callers.
  • Without it, the start theme is themes[0]. component.Base#getTheme() falls back to it, and main.addon.Stylesheet#addGlobalCss stamps it on the body at boot.
  • Design authority: #21835, "An example opens on the theme of the catalog that launched it". For an example without that exact theme, the part a visitor sees is the scheme.

The Fix

  1. In resolveStartTheme, after the exact match, a requested Neo theme the app lacks resolves to the classic theme of the same scheme when that one is configured: neo-theme-neo-dark → neo-theme-dark, neo-theme-neo-light → neo-theme-light. An explicit request still outranks the system preference. The JSDoc states the new order.
  2. The 15 examples with two themes and no theme toggle of their own start through it: mainView: {module: X, theme: resolveStartTheme(Neo.config)}, the wiring the board, form and Gantt examples already use. grid/contentSizedRows drops its own copy of the old resolver.

Acceptance Criteria

  • ?theme=neo-theme-neo-dark with the engine's default themes resolves to neo-theme-dark. ?theme=neo-theme-neo-light with a dark-first classic pair resolves to neo-theme-light. Unit arms assert both: red on dev, green at the head.
  • An exact match, an unknown theme and the dark-system path keep their current results, and the existing arms stay green.
  • Each of the 15 examples opens on the requested scheme for both catalog requests. Without a request, each opens on its themes[0], as today. A headless sweep on the pull request shows this.
  • Existing specs that load these examples with a classic ?theme= stay green.

The scope was corrected on 22 Nov after #21953's review. Six of the 21 examples with two themes switch themes through their own toggles, which assume the first theme: Calendar, Dialog, COVID, Big Data, Tree Big Data and Nested Record Fields. Wiring them without their toggles regresses the toggles, so #21973 carries them.

Out of Scope

  • A classic request mapped to a Neo theme: the catalog sends only Neo themes.
  • The system-preference path for apps without neo-theme-neo-dark.
  • finance and email, which offer one theme each.
  • The six toggle examples, which are #21973.
  • New covers: once this merges, the wired records rejoin the #21942 backfill.

Related

Parent #21140. #21835 and #21907, the catalog's theme link and its first 14 callers. #21933, the camera's scheme check. #21942, the backfill. #21761, which made resolveStartTheme the one resolver. #21973, the six toggle examples.

Live latest-open + closed sweep: checked latest 20 open (87 open, red band; parent #21140 owns the examples work) + open and closed search (resolveStartTheme, start theme, scheme fallback; hits #21835 and #21890 are open, and closed #21761 is the resolver's consolidation) at 2026-11-22T13:52Z; no equivalent found. A2A in-flight sweep: the only claim is Vega's offer in this fork (13:49Z), which leaves the leaf to #21835's owner. MC sweep: covered by Vega's measurement, the source of this ticket. Own-assignment sweep: 8 open, none covers it.

Ownership: self-assigned, as the owner of #21835's path, before the Engine 14 cut on Mon 23 Nov.

Decision Record impact: none.

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

Retrieval Hint: "resolveStartTheme same-scheme fallback, catalog theme link opens wrong scheme, examples not calling resolveStartTheme"

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