LearnNewsExamplesServices
Frontmatter
id18125
titleThe Workstation theme toggle flips instantly, with no reveal
stateClosed
labels
enhancementdesignai
assigneesneo-opus-ada
createdAtSep 2, 2026, 6:45 PM
updatedAtSep 2, 2026, 7:49 PM
githubUrlhttps://github.com/neomjs/neo/issues/18125
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 2, 2026, 7:49 PM

The Workstation theme toggle flips instantly, with no reveal

Closed v13.2.0/archive-v13-2-0-chunk-18 enhancementdesignai
neo-opus-ada
neo-opus-ada commented on Sep 2, 2026, 6:45 PM

Context

The operator, exploring the Workstation before tomorrow's rehearsal: the Portal's theme button plays a growing-circle reveal from the pointer, and the Workstation's flips instantly. The reveal is not Portal-bespoke — it is an engine primitive with exactly one caller today.

Live latest-open sweep: checked the latest 20 open issues at 2026-09-02T15:50Z; no equivalent found. #18036 (document DockLayouts styling/themes) is documentation of a different surface; #18107 is theme sheet weight, not the switch. A2A in-flight sweep: 14 most recent messages, all read-states — @neo-fable holds rail motion (#18116 exit, #18117 retarget, #18122 maximize); none is the theme switch. Own-assignment sweep: six open, none on this surface. Grep: resources/content/issues/ matches only issue-17739.md, the engine ticket that hardened the primitive — prior art, not a duplicate.

The Problem

Neo.main.DomAccess.startViewTransition() already exists, is registered as a remote method, and is app-neutral. The Portal calls it in five lines and passes the click's raw coordinates so the engine owns the unit decision. The Workstation never calls it, so its one theme control is the only piece of chrome in the app that changes state without motion — next to a dock whose rails now slide in and out (#18074, #18116, #18117).

Verified before filing rather than assumed: grep startViewTransition apps/workstation/ returns nothing, and the toggle's handler is handler: () => me.toggleWorkspaceTheme() — an arrow taking no arguments, calling a method taking none.

The Architectural Reality

surface file:line today
the engine primitive src/main/DomAccess.mjs:1082 startViewTransition({animate, delay, reveal, windowId}); returns false with no View Transition API
the only caller apps/portal/view/ViewportController.mjs:285 awaits the call, then me.setTheme(newTheme) inside the delay window
the Workstation button apps/workstation/view/Workspace.mjs:688 handler: () => me.toggleWorkspaceTheme() — discards the event
the Workstation flip apps/workstation/view/Workspace.mjs:2618 toggleWorkspaceTheme() → setWorkspaceTheme(theme), no arguments

The scope asymmetry, stated because it is the reason this ticket is main-window-only. setWorkspaceTheme deliberately fans across Neo.appsByName[me.appName] rather than the window-keyed registry, with a standing comment that iterating the latter "would let a Workstation toggle retheme an unrelated co-hosted app" — and it notes "one window today, one per open vessel tomorrow". But document.startViewTransition() captures the whole document and runs in one document. So:

  • A co-hosted app would be swept by the reveal circle while its own colours do not change. Latent today — the Workstation is a single name: 'Workstation' app owning its document — but real if that changes.
  • Once vessels are open, the main window reveals and the pop-outs flip instantly.

Neither is a defect introduced here; both are consequences of animating a document while theming an app. This ticket takes the main window because that is where the click happens, and records the vessel question rather than discovering it during a demo.

The Fix

  1. Workspace.mjs:688 — handler: data => me.toggleWorkspaceTheme(data), so the click survives.
  2. toggleWorkspaceTheme(data) — await Neo.main.DomAccess.startViewTransition({delay: 100, reveal: {x: data.clientX, y: data.clientY}, windowId: me.windowId}), then apply the flip, matching the Portal's ordering exactly: the flip must land inside the delay window or the transition captures the unchanged DOM as both states.
  3. No engine change. No new file. No SCSS.

Contract Ledger Matrix

N/A — this ticket introduces no consumed surface. It adds a second caller to Neo.main.DomAccess#startViewTransition(), whose contract is already ledgered on #17739: resolves true once the transition has started (never once it has finished), false when the browser lacks the API, and reveal failure is reported asynchronously via console.warn. toggleWorkspaceTheme()'s return value changes from String to Promise<String>; its only caller is the button handler, and the tour/spec callers are checked in AC-5.

Acceptance Criteria

  • AC-1 — clicking the Workstation theme button plays the circular reveal from the pointer, in both directions, on the served app.
  • AC-2 — the flip is applied after the awaited call, inside the delay window, so both captured states differ. A reversed order silently degrades to a no-op reveal and must not ship.
  • AC-3 — with no View Transition API the theme still flips. The engine returns false and the flip runs regardless; today's behaviour is the floor, so the change cannot regress a browser that lacks the feature.
  • AC-4 — the reveal originates at the pointer, not at a fixed point. A missing clientX/clientY must not throw; DomUtils.createRevealAnimation() owns that fallback and is not reimplemented here.
  • AC-5 — every existing caller of toggleWorkspaceTheme() still works with the now-async signature: the tour screenplay and any spec that toggles the theme. Enumerated and checked, not assumed.
  • AC-6 (post-merge, real browser) — read by eye. startViewTransition is unsupported in headless (recorded on pr-13430), so no headless arm can witness AC-1. Unit coverage asserts the call shape and ordering; the reveal itself is an operator/author read.

Out of Scope

  • Vessel fan-out. Pop-out windows keep flipping instantly. Revealing per vessel means fanning the engine call across windows, which is a separate decision with its own timing question (simultaneous or staggered), not a quick win.
  • The Portal's call site. Untouched.
  • Any engine change to DomAccess or DomUtils. If one turns out to be needed, that is a finding and a new ticket, not scope drift.
  • The co-hosted-document case, which is latent and has no reproducer today.

Avoided Traps

  • Reimplementing the reveal geometry in the app. The Portal's comment says why: the App worker knows where the pointer was, not how a pseudo-element resolves a length. Passing raw coordinates keeps the unit decision in one engine place instead of one copy per app. A second copy here would be the "N sites, one idiom" anti-pattern.
  • Awaiting the transition to completion. #17739 establishes this is unsatisfiable without breaking the feature — transition.ready resolves only after both snapshots are taken, so awaiting it would apply the theme after capture and the transition would capture the unchanged DOM twice.
  • Writing a headless arm for the reveal. It would pass while witnessing nothing, because the API is absent in that environment. AC-6 names the bound instead.

Related

  • #17739 / PR #17743 — hardened startViewTransition(); the contract this consumes.
  • #13158 — the QT-parity docking polish epic this sits beside.
  • #18116 / #18117 — the rail motion work that makes the instant theme flip conspicuous.
  • PR #13430 — the archived note recording that the animated switch cannot be verified headless.

Origin Session ID: 7596538d-5324-419a-b043-95c585d833ea

Retrieval Hint: workstation theme toggle view transition reveal circle startViewTransition delay window capture · apps/workstation/view/Workspace.mjs toggleWorkspaceTheme setWorkspaceTheme appsByName fan-out

tobiu referenced in commit 998abbf - "feat(workstation): the theme toggle reveals from the pointer (#18127) on Sep 2, 2026, 7:49 PM
tobiu closed this issue on Sep 2, 2026, 7:49 PM