Terminal predicate: Every published non-workbench Neo example exposes an interactive theme switcher — a circular-reveal light/dark toggle when two themes are configured and a circular-reveal theme dropdown when three or more themes are configured — backed by one reusable Neo.button.ThemeSwitcher engine component, with zero published standalone examples locked to a URL-only ?theme= parameter.
Problem Scope
Engine 14 ships multi-theme support across its component families (neo-theme-neo-light, neo-theme-neo-dark, neo-theme-light, neo-theme-dark, neo-theme-cyberpunk), and recent example PRs (#21677, #21678, #21680, #21681, #21687, etc.) attach multi-theme verification screenshots — yet a visitor opening those standalone examples in the browser has no UI control to switch themes without manually editing ?theme= in the URL.
Why this missed until @tobiu's release-blocker audit on 2026-11-21:
- Earlier theme tickets
#20879 and #20932 explicitly placed "Adding a UI theme switcher to the examples" in Out of Scope while the 5 theme stylesheets were being authored, and no follow-up epic or leaf was ever filed once the stylesheets landed.
- Live transitive census on
dev (6952886dce, 176 top-level example apps excluding childapp secondary windows):
76 workbench examples extend Neo.examples.ConfigurationViewport (directly or via examples/form/field/MainContainer.mjs), which already provides theme controls in its inspector panel.
100 standalone non-workbench examples do not use ConfigurationViewport: only 19 currently expose a theme toggle (calendar/basic, code/livePreview, component/video, dialog, table/nestedRecordFields, tableFiltering, and 13 grid/* examples hand-rolling onThemeButtonClick + Neo.main.DomAccess.startViewTransition), while 81 standalone examples (including 65 entries in the Portal catalog and every 5-theme board/*, scheduler/*, gantt/*, and timeline/* example) have zero theme switcher UI.
Why an Epic (multi-sub coordination) rather than a single ticket:
- Delivering a clean engine-grade
Neo.button.ThemeSwitcher primitive first (src/button/ThemeSwitcher.mjs) and then mounting it across ~80+ standalone examples (plus expanding single-theme neo-config.json manifests where needed) spans multiple example families (board / scheduler / gantt / timeline, grid / table / dashboard / desktop / toolbar / menu, and form / component / charts / stateProvider) that are actively being edited in parallel by the swarm ahead of the 2026-11-23 Engine 14 cut. Splitting into one prerequisite engine component leaf + disjoint family rollout leaves lets multiple peers execute in parallel with zero merge collisions (#21140 already holds 42 subs and #20874 holds 26 subs, both past epic-create Procedure 1's ~25-sub threshold).
Intended Solution Shape
- One reusable Engine primitive (
Neo.button.ThemeSwitcher, ntype: 'theme-switcher' in src/button/ThemeSwitcher.mjs):
- Reads configured themes from
this.themes || Neo.config.themes (falling back to ['neo-theme-neo-light', 'neo-theme-neo-dark'] when Neo.config.themes has < 2 entries and themes is explicitly supplied, or hiding/disabling only if < 2 themes are loaded).
- Resolves its target theme host via
this.target || this.up('viewport') (getTheme() / set({theme}), propagating across open child windows where multi-window apps register secondary viewports or state providers).
- 2-theme mode (
themes.length === 2): Acts as a single-click light/dark toggle button (matching apps/portal/view/ViewportController.mjs:302 and apps/workstation/view/Workspace.mjs:882), calling Neo.main.DomAccess.startViewTransition({delay: 100, reveal: {x: data?.clientX, y: data?.clientY}, windowId: this.windowId}).catch(() => {}) before flipping theme and updating its sun/moon icon + accessible label.
- Multi-theme mode (
themes.length > 2, e.g. 4 or 5 themes): Renders a compact theme dropdown (menu list via Neo.button.Base / Neo.menu.List with human-readable labels — Neo Light, Neo Dark, Light, Dark, Cyberpunk — and active-theme indicator), running Neo.main.DomAccess.startViewTransition from the selection click coordinates before applying the chosen theme.
- Family-sharded rollout across all non-workbench examples:
- Every non-
ConfigurationViewport standalone example mounts {module: ThemeSwitcher} (or 'theme-switcher') in its header toolbar (adding a minimal header bar only onchromeless standalone examples where needed, and upgrading single-theme neo-config.json manifests to at least ["neo-theme-neo-dark", "neo-theme-neo-light"] wherever the underlying component family supports both themes).
- Existing bespoke
onThemeButtonClick / syncThemeButton boilerplate in standalone examples may migrate onto Neo.button.ThemeSwitcher opportunistically within each family slice without breaking existing E2E selectors.
Decision Record impact: none.
Structure-map gate: N/A in neomjs/neo (ai:structure-map is Brain-hosted; src/button/ThemeSwitcher.mjs follows structural-pre-flight Stage 1 fast-path beside src/button/{Base,Split,Menu,Effect}.mjs).
Out of Scope
- Examples extending
Neo.examples.ConfigurationViewport (76 component-workbench examples, which already expose theme selection inside the workbench configuration panel).
- Changing theme color palettes themselves (owned by family theme tickets).
Avoided Traps
- Copy-pasting 30 lines of
onThemeButtonClick + startViewTransition into 80+ examples: violates AGENTS.md §self_evolving_systems Accretion Defense and fails to handle 5-theme examples (board, scheduler, gantt, timeline) that need a dropdown rather than a binary toggle.
- Hardcoding a two-theme toggle on 5-theme examples: hides
neo-theme-light, neo-theme-dark, and neo-theme-cyberpunk that those examples ship in neo-config.json.
- Breaking E2E tests that assert toolbar button counts or
.theme-switch selectors: preserve semantic cls hooks and scope toolbar queries cleanly.
Related
unowned-rationale: Engine 14 release-blocker umbrella epic open for parallel swarm execution across leaf sub-tickets.
Live latest-open + closed sweep: checked latest 25 open (79 open total, red band — successor epic required because #21140 has 42 subs and #20874 has 26 subs, both above epic-create Procedure 1's ~25 cap) + open and closed search (theme switcher examples, TimeAxisHeader hover, headerGroups theme, Out of Scope read on #20879, #20932, #20635) at 2026-11-21T01:44Z; no equivalent epic found.
Epic sweep: 15 open predicates (#21367, #21358, #21346, #21329, #21213, #21198, #21175, #21140, #21032, #20892, #20874, #20682, #20671, #20667, #20498) + closed search (theme switcher OR examples theme, 10 hits) read, no shared terminal predicate.
A2A in-flight sweep: scanned latest 30 messages across all read states (00:58Z–01:44Z); zero competing claim on example theme switchers.
MC sweep: query_raw_memories + ask_knowledge_base (standalone examples theme switcher dropdown startViewTransition, 5 refs); no conflicting decision.
Own-assignment sweep: 1 open (#21621, PR #21694), disjoint.
Origin Session ID: 59ca0d8c-dfdf-4d07-aefe-8ec5c658a398
Retrieval Hint: "standalone non-workbench examples theme switcher dropdown startViewTransition expanding wave Neo.button.ThemeSwitcher"
Terminal predicate: Every published non-workbench Neo example exposes an interactive theme switcher — a circular-reveal light/dark toggle when two themes are configured and a circular-reveal theme dropdown when three or more themes are configured — backed by one reusable
Neo.button.ThemeSwitcherengine component, with zero published standalone examples locked to a URL-only?theme=parameter.Problem Scope
Engine 14 ships multi-theme support across its component families (
neo-theme-neo-light,neo-theme-neo-dark,neo-theme-light,neo-theme-dark,neo-theme-cyberpunk), and recent example PRs (#21677,#21678,#21680,#21681,#21687, etc.) attach multi-theme verification screenshots — yet a visitor opening those standalone examples in the browser has no UI control to switch themes without manually editing?theme=in the URL.Why this missed until
@tobiu's release-blocker audit on2026-11-21:#20879and#20932explicitly placed "Adding a UI theme switcher to the examples" inOut of Scopewhile the 5 theme stylesheets were being authored, and no follow-up epic or leaf was ever filed once the stylesheets landed.dev(6952886dce,176top-level example apps excludingchildappsecondary windows):76workbench examples extendNeo.examples.ConfigurationViewport(directly or viaexamples/form/field/MainContainer.mjs), which already provides theme controls in its inspector panel.100standalone non-workbench examples do not useConfigurationViewport: only19currently expose a theme toggle (calendar/basic,code/livePreview,component/video,dialog,table/nestedRecordFields,tableFiltering, and13grid/*examples hand-rollingonThemeButtonClick+Neo.main.DomAccess.startViewTransition), while81standalone examples (including65entries in the Portal catalog and every5-themeboard/*,scheduler/*,gantt/*, andtimeline/*example) have zero theme switcher UI.Why an Epic (multi-sub coordination) rather than a single ticket:
Neo.button.ThemeSwitcherprimitive first (src/button/ThemeSwitcher.mjs) and then mounting it across ~80+ standalone examples (plus expanding single-themeneo-config.jsonmanifests where needed) spans multiple example families (board/scheduler/gantt/timeline,grid/table/dashboard/desktop/toolbar/menu, andform/component/charts/stateProvider) that are actively being edited in parallel by the swarm ahead of the2026-11-23Engine 14 cut. Splitting into one prerequisite engine component leaf + disjoint family rollout leaves lets multiple peers execute in parallel with zero merge collisions (#21140already holds42subs and#20874holds26subs, both pastepic-createProcedure 1's~25-sub threshold).Intended Solution Shape
Neo.button.ThemeSwitcher,ntype: 'theme-switcher'insrc/button/ThemeSwitcher.mjs):this.themes || Neo.config.themes(falling back to['neo-theme-neo-light', 'neo-theme-neo-dark']whenNeo.config.themeshas< 2entries andthemesis explicitly supplied, or hiding/disabling only if< 2themes are loaded).this.target || this.up('viewport')(getTheme()/set({theme}), propagating across open child windows where multi-window apps register secondary viewports or state providers).themes.length === 2): Acts as a single-click light/dark toggle button (matchingapps/portal/view/ViewportController.mjs:302andapps/workstation/view/Workspace.mjs:882), callingNeo.main.DomAccess.startViewTransition({delay: 100, reveal: {x: data?.clientX, y: data?.clientY}, windowId: this.windowId}).catch(() => {})before flippingthemeand updating its sun/moon icon + accessible label.themes.length > 2, e.g. 4 or 5 themes): Renders a compact theme dropdown (menulist viaNeo.button.Base/Neo.menu.Listwith human-readable labels —Neo Light,Neo Dark,Light,Dark,Cyberpunk— and active-theme indicator), runningNeo.main.DomAccess.startViewTransitionfrom the selection click coordinates before applying the chosentheme.ConfigurationViewportstandalone example mounts{module: ThemeSwitcher}(or'theme-switcher') in its header toolbar (adding a minimal header bar only onchromeless standalone examples where needed, and upgrading single-themeneo-config.jsonmanifests to at least["neo-theme-neo-dark", "neo-theme-neo-light"]wherever the underlying component family supports both themes).onThemeButtonClick/syncThemeButtonboilerplate in standalone examples may migrate ontoNeo.button.ThemeSwitcheropportunistically within each family slice without breaking existing E2E selectors.Decision Record impact: none. Structure-map gate: N/A in
neomjs/neo(ai:structure-mapis Brain-hosted;src/button/ThemeSwitcher.mjsfollowsstructural-pre-flightStage 1 fast-path besidesrc/button/{Base,Split,Menu,Effect}.mjs).Out of Scope
Neo.examples.ConfigurationViewport(76component-workbench examples, which already expose theme selection inside the workbench configuration panel).Avoided Traps
onThemeButtonClick+startViewTransitioninto 80+ examples: violatesAGENTS.md §self_evolving_systemsAccretion Defense and fails to handle5-theme examples (board,scheduler,gantt,timeline) that need a dropdown rather than a binary toggle.neo-theme-light,neo-theme-dark, andneo-theme-cyberpunkthat those examples ship inneo-config.json..theme-switchselectors: preserve semanticclshooks and scope toolbar queries cleanly.Related
Out of Scopedeferred this work: #20879 · #20932 · #20635unowned-rationale: Engine 14 release-blocker umbrella epic open for parallel swarm execution across leaf sub-tickets.
Live latest-open + closed sweep: checked latest 25 open (
79open total, red band — successor epic required because#21140has42subs and#20874has26subs, both aboveepic-createProcedure 1's~25cap) + open and closed search (theme switcher examples,TimeAxisHeader hover,headerGroups theme, Out of Scope read on#20879,#20932,#20635) at2026-11-21T01:44Z; no equivalent epic found. Epic sweep:15open predicates (#21367,#21358,#21346,#21329,#21213,#21198,#21175,#21140,#21032,#20892,#20874,#20682,#20671,#20667,#20498) + closed search (theme switcher OR examples theme,10hits) read, no shared terminal predicate. A2A in-flight sweep: scanned latest 30 messages across all read states (00:58Z–01:44Z); zero competing claim on example theme switchers. MC sweep:query_raw_memories+ask_knowledge_base(standalone examples theme switcher dropdown startViewTransition, 5 refs); no conflicting decision. Own-assignment sweep: 1 open (#21621, PR#21694), disjoint.Origin Session ID: 59ca0d8c-dfdf-4d07-aefe-8ec5c658a398
Retrieval Hint: "standalone non-workbench examples theme switcher dropdown startViewTransition expanding wave Neo.button.ThemeSwitcher"