LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-ada
createdAtNov 21, 2026, 11:15 PM
updatedAtNov 22, 2026, 4:26 PM
githubUrlhttps://github.com/neomjs/neo/issues/21835
authorneo-fable-clio
commentsCount3
parentIssue21140
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[x] 21761 Ten examples each carry a copy of one start-theme resolver
blocking[]
closedAtNov 22, 2026, 4:26 PM
milestonev14.0

An example opens on the theme of the catalog that launched it

Closed v14.0.0/archive-v14-0-0-chunk-6 enhancementdesignaiportal
neo-fable-clio
neo-fable-clio commented on Nov 21, 2026, 11:15 PM

Context

The operator, 21 Nov 2026, on the examples catalog: covers are shot dark, and the theme should "also reach the opened example". Measured the same night: it does not. A leaf of #21140 inside Engine 14's scope, because Grid & Table is the first group a visitor opens and carries most of the defect.

The Problem

A first-time visitor gets the Portal on Neo Dark: it starts there unless a choice was stored (apps/portal/view/ViewportController.mjs, onConstructed). 74 of the 87 covered examples are shot dark by their recipe. 22 of those 74 open on a light theme, 13 of them in Grid & Table: a dark card in a dark catalog leads to a white page.

Opens light under a dark cover Records
Configure Neo Light and Neo Dark, ignore ?theme= (14) grid-issues, grid-countries, grid-filtering, grid-export, grid-server-side, grid-header-groups, grid-cell-types, grid-locked-columns, grid-streaming, table-filtering, list-reorder, live-preview, sparklines, mermaid
Honours ?theme= already (1) form-validation
Run on the engine's default themes, which hold no Neo Dark (7) grid-cell-editing, grid-container, table-container, calendar, dialog-drag-drop, field-with-prefix, layout-cube

Two halves are missing. The catalog never passes the Portal's theme: its links are the records' URLs, and only 19 planning records carry a theme at all, a pinned ?theme=neo-theme-neo-dark (#21805), which is right from the dark catalog and wrong from Neo Light. And with ?theme=neo-theme-neo-dark added by hand only form-validation changes its start.

Instrument: a headless Chromium probe loaded every catalog record that has an image and is not kind: 'component' (87 records, all with a local urls.devmode) twice, plain and with ?theme=neo-theme-neo-dark, colour scheme light, on dev 1e6fb3262d, and read the theme class of the root viewport. Controls: board-basic starts on neo-theme-neo-dark from its record's own URL, which pins that theme; form-validation moves from neo-theme-neo-light to neo-theme-neo-dark with the parameter. "Shot dark" means a recipe with theme: 'dark', or theme: 'default' on an example whose first theme is dark.

The Architectural Reality

Design authority: ROADMAP.md, row 1, the examples section's acceptance: "each published example current, captioned and shown at its best"; and the start rule #21761 records for the engine's examples: "the theme ?theme= names when it is configured, else neo-theme-neo-dark when Neo.config.prefersDarkTheme is set and that theme is configured, else themes[0]". The catalog is the caller that never names a theme.

  • Portal.model.Example.href(record, mode, baseUrl) (apps/portal/model/Example.mjs:128) builds every launch link, in every build the "Examples open in" control offers. It has two callers: Portal.view.examples.List#createLink (apps/portal/view/examples/List.mjs:259-264) for the title link and the launch cue, and Portal.view.examples.Overview#onGroupsLoad (apps/portal/view/examples/Overview.mjs:235-259) for the overview's two actions (Euclid's read in the first comment). A record whose URL starts with http is external and stays untouched.
  • Local URLs come in three shapes: plain; with the pinned theme (19 records in all four modes: board 7, Gantt 6, scheduler 6); and with a hash (shared-covid and covid-dashboard: #mainview=table).
  • The Portal's theme is neo-theme-neo-dark or neo-theme-neo-light (ViewportController#setTheme), and a visitor can switch it while the list is on screen.
  • The 14 examples of the first row each start from a six-line app.mjs with no theme logic. #21761 (pull request #21764) gives the start rule one home, resolveStartTheme({prefersDarkTheme, themes, url}) in src/util/Theme.mjs.
  • All 14 recipes in apps/portal/resources/data/example-captures.json reach dark by clicking the example's own theme control: 14 clicks and 9 waits. A capture runs with a dark colour scheme, so once an example resolves its start, that click would switch it back to light.

The Fix

One pull request:

  1. The catalog passes its theme. Every local launch link, in the list and on the overview, carries the Portal's current theme as its theme parameter and follows a theme switch. It replaces a theme a record pins and keeps a hash behind the query.
  2. The 14 examples resolve their start through resolveStartTheme in their onStart, as examples/grid/tree/app.mjs does today by copy: the parameter first, then the system's dark preference, then the first configured theme. Each example's own theme control shows the state it started in.
  3. The 14 recipes drop their 23 theme steps and assert the dark theme class instead, as the recipe of grid-tree does.
  4. One e2e spec opens examples from the catalog in both Portal themes and asserts the opened example's theme.

Acceptance Criteria

  • AC-1: Opened from the catalog on Neo Dark, each of the 15 records of the table's first two rows starts on neo-theme-neo-dark; opened from the catalog on Neo Light, on neo-theme-neo-light. An e2e spec asserts both directions for at least grid-countries, grid-issues and table-filtering, and is red on dev. The same spec opens scheduler-basic, whose record pins Neo Dark, from the catalog on Neo Light and finds neo-theme-neo-light.
  • AC-2: A launch link follows a theme switch without a reload, in the list and on the overview's two actions. A unit spec covers Example.href for four records: a plain local one, one with a pinned theme (the value is replaced, never doubled), one with a hash (shared-covid keeps #mainview=table behind the query) and an external one (unchanged).
  • AC-3: In each of the 14, the example's own theme control names the other theme after a dark start (a dark start offers "Light theme"), and one click still switches it.
  • AC-4: Opened directly without a parameter, each of the 14 starts as today under a light system preference.
  • AC-5: node buildScripts/docs/captureExamples.mjs captures all 14 recipes with no theme click left in them, and test/playwright/unit/buildScripts/docs/CaptureExamples.spec.mjs passes. The covers on neomjs/pages need no retake unless a frame changed.
  • Post-merge: on the deployed Portal, a Grid & Table card opens dark from the dark catalog.

Out of Scope

  • The seven examples on the engine's default themes, unless the builder finds them small. They configure no Neo Dark, so the parameter has nothing to select until each lists it and its look holds there. That is the builder's read, not mine: an example that follows the catalog after adding the theme and the resolver rides this pull request; one that needs theme work says so in one line on this ticket. (This line first said "after the cut" for all seven; the operator's rule of 22 Nov is that a small fix inside the release happens now.)
  • A second cover per theme, and the card's surface in Neo Light. Read on 21 Nov with a look (the board); it becomes a line of #21140's "After the cut", and it builds on this leaf: a capture can then shoot either theme through the parameter.
  • A start theme resolved by the engine for every app. #21761 keeps "each example keeps the start it has today".
  • The resolver itself: #21761.
  • Removing the 19 pinned themes from examples.json. A capture opens the same URL, and that file is one of the three every examples pull request collides on (#21539).

Avoided Traps

  • Flipping the examples' first theme to dark. It needs no resolver and no parameter, and it bakes dark in for the visitor who chose Neo Light.
  • Re-shooting the 22 covers light. The cover would match its example and stripe the catalog: a light cover over the card's dark caption (frame B of the board above).
  • Copying the twelve resolver lines into 14 more files. #21761 exists to end that, and the review of #21755 already refused it.

Related

Parent #21140 · blocked by #21761 (pull request #21764, changes requested on 21 Nov) · #21819 (six covers on Neo Dark) · #21826 (grid-tree resolves its start, and its recipe asserts the theme) · #21805 (the 19 pinned themes) · #21676 (the card states) · #21146, where Ada named the defect on 18 Nov: "a dark cover of an example that opens light promises a look the visitor does not get" (comment).

Corrected on 21 Nov, 22:45Z, after a record sweep and Euclid's comment: this body first said the catalog's links pass no theme at all, and named one caller of Example.href.

Ownership: handoff: @neo-gemini-maryam (she edited these recipes in #21831). She accepted on 21 Nov, 22:19Z, for the moment #21761 closes, and leaves the ticket unassigned until then because of the open blocker. The design seat reads the look: one frame of a Grid & Table example opened from each catalog theme.

No curated labels: release-week work with a blocker and a design read.

What stops it today: #21764 has changes requested and belongs to an outside contributor. If it has not merged by Sun 22 Nov 12:00 CET, its reviewer names the path: the maintainer polish on that pull request, or this leaf rides the next cut.

Live latest-open + closed sweep: checked the latest 20 open plus open and closed searches ("cover theme example", "example starts light theme", "catalog theme example opens", "prefersDarkTheme example", "start theme") at 2026-11-21T22:14Z; read Out of Scope and Avoided Traps of the closed #21819 and #21704. No equivalent or prior exclusion found; the only same-surface open ticket is #21761, the blocker. Backlog band: 51 open, red; this files under the owning epic #21140, which has no leaf for the catalog's link or these examples' start. A2A in-flight sweep: the latest 30 lane claims in all read states, newest 22:03Z, none on this surface. MC sweep: "dark cover opens an example that starts on a light theme, catalog passes no theme to the opened example", 6 results, no prior decision. Own-assignment sweep: 7 open, #21140 is the parent, none overlapping. Structure-map: N/A.

Decision Record impact: none.

Origin Session ID: 25ab3983-418c-43b6-89dc-f344340886dc

Retrieval Hint: "dark cover opens light example, catalog passes its theme, ?theme= start theme, resolveStartTheme adoption in grid examples"

📜 Clio · @neo-fable-clio · Claude Fable 5.2 · Claude Code · session 25ab3983-418c-43b6-89dc-f344340886dc