LearnNewsExamplesConnect
Frontmatter
assigneesneo-gpt-euclid
createdAtSep 2, 2026, 9:18 PM
updatedAtSep 5, 2026, 1:59 AM
githubUrlhttps://github.com/neomjs/neo/issues/18138
authorneo-opus-ada
commentsCount3
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 5, 2026, 1:59 AM

The reveal's UA-default cancellation lives in consumer stylesheets, not the engine

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

Context

Found by shipping the second consumer of the engine reveal and getting a black screen. #18136 / PR #18137 repairs apps/workstation; this is the reason it was breakable at all.

Live latest-open sweep: checked the latest 12 open issues at 2026-09-02T18:40Z; no equivalent. #17739 (closed) covered the reveal's geometry, never its layer compositing.

The Problem

The reveal's contract is split across two realms and only one half is in the engine:

  • The engine owns the animation. Neo.main.DomAccess#startViewTransition() runs document.startViewTransition() and animates ::view-transition-new(root) with a growing clip-path circle from DomUtils.createRevealAnimation().
  • A consumer stylesheet owns the cancellation that makes it visible. The browser cross-fades both snapshots by default; the old layer fades out over ~250ms while the reveal grows for 500ms. Unless the consumer declares animation: none (and mix-blend-mode: normal, against the UA's plus-lighter) on both pseudo-elements, the back half of every reveal paints bare backdrop.

Nothing on the call path says so. The census when the second consumer landed:

app calls startViewTransition ships the rule
apps/portal 1 1
apps/workstation 1 0

I matched the Portal's call byte-for-byte, verified the payload and the produced keyframes at the runtime boundary, and still shipped black — because the missing half is not a call-site property. Consumer #3 will hit it the same way.

The Architectural Reality

An engine capability that requires an undocumented CSS declaration from each consumer is a half-primitive. The visible behaviour is not a consumer style choice: nothing wants the UA cross-fade and the circular reveal at the same moment — they are two designs for one transition — so there is no configuration a consumer would reasonably vary.

The cancellation cannot simply be declared globally by the engine, because a caller with no reveal gets createRevealAnimation() === null and legitimately keeps the UA cross-fade. Whatever ships must apply only when a reveal is actually running.

The Fix — browser-verified JS direction

Preferred: keep it in JS, where the reveal already lives. Have createRevealAnimation() also return keyframes for the old layer, and have startViewTransition() register both — holding ::view-transition-old(root) at opacity: 1 for the reveal's duration and setting mix-blend-mode: normal on both. No global CSS, no new class, self-contained, and the reveal stops depending on anything the consumer must remember.

Measured premise (2026-09-04, Chrome 152, visible document): without consumer transition CSS, the old snapshot opacity decayed to 0.787618 and 0.141623 during a plain transition; a WAAPI old-layer opacity hold kept both samples at 1. This clears the precedence gate for the JS direction. The implementation must also prove normal compositing, zero-duration reveals and cleanup before a subsequent plain transition.

Fallback if further browser evidence invalidates it: the engine stamps a class on documentElement for the duration of a reveal transition and ships CSS scoped to it — more moving parts, same effect.

Either way, the consumer rules in apps/portal and apps/workstation become redundant and should be retired in the same change, so the duplication does not simply gain a third copy.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
DomUtils.createRevealAnimation(reveal, width, height) Current src/main/DomUtils.mjs; #17739 geometry; this issue AC-1/3 Preserve the new-layer clip-path descriptor and add a companion old-layer descriptor; generated effects hold both layers at opacity 1 with normal blending throughout the reveal. Missing origin or zero viewport still returns null. Preserve duration/easing defaults and explicit duration 0; no viewport geometry change. Update helper JSDoc. Existing geometry unit suite plus descriptor assertions; native browser old/new sampling and pixel evidence.
Neo.main.DomAccess.startViewTransition(data) built-in reveal Current src/main/DomAccess.mjs; this issue AC-1/2 Register both generated layer effects after ready; release owned effects when the transition settles, including skipped/rejected transitions. Registration/ready failures remain decorative and warn. A zero-duration reveal must not expose the UA fade; a subsequent plain transition must regain UA behavior. Update method JSDoc. Browser tests through the actual method: reveal, zero duration, completion/skip, subsequent plain transition.
startViewTransition caller contract #17739 / PR #17743; current method Continue resolving Boolean immediately after starting, preserving the caller's DOM-update window. data.animate retains precedence and its original single animation payload. Unsupported browser returns false; missing/invalid reveal applies no generated effects; preserve delay default 50 and explicit 0. Preserve existing JSDoc contract. Early-return, raw-animation and plain-transition controls.
Portal and Workstation transition styling Current resources/scss/src/apps/portal/Viewport.scss and resources/scss/src/apps/workstation/Workspace.scss; AC-4/5 Remove the two global old/new pseudo-element cancellation rules with the engine change. No replacement consumer workaround. Remove obsolete workaround comment. Stylesheet census plus visible-browser reads of both consumers.

Acceptance Criteria

  • AC-1 — a consumer that calls startViewTransition() with a reveal and ships no view-transition CSS shows the previous state outside the growing circle, with no black frame.
  • AC-2 — a caller with no reveal still gets the UA cross-fade; the cancellation must not leak to plain transitions.
  • AC-3 — the WAAPI-over-UA precedence premise is measured in a real browser and the result recorded, whichever way it falls; if it fails, the class-scoped alternative ships instead.
  • AC-4 — the now-redundant rules in apps/portal/Viewport.scss and apps/workstation/Workspace.scss are removed in the same change, and both apps still read correctly.
  • AC-5 (real browser) — read by eye in both apps. Use a visible real-browser transition as the compositing witness; previous harness attempts (pr-13430 and the comments below) could not run a transition. A stylesheet enumeration alone does not prove the pixels.

Out of Scope

  • The reveal's geometry, duration and easing — correct and unchanged.
  • Any change to what startViewTransition() returns or when it resolves; #17739 settled that and awaiting completion would break the capture window.

Avoided Traps

  • Declaring the cancellation globally in an engine stylesheet. It would silently kill the UA cross-fade for callers who never asked for a reveal — the same class of defect as this ticket, pointed the other way.
  • Leaving the consumer rules in place "just in case" after the engine fix. Three copies of a workaround for a fixed bug is how the next reader concludes it is still required.

Related

  • #18136 / PR #18137 — the consumer-side repair this generalises.
  • #18125 / PR #18127 — the change that made the gap visible.
  • #17739 / PR #17743 — the reveal's geometry contract and what startViewTransition() can and cannot observe.

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

Retrieval Hint: view-transition-old root UA cross-fade cancellation engine vs consumer stylesheet half-primitive reveal black backdrop WAAPI precedence

tobiu closed this issue on Sep 5, 2026, 1:59 AM
tobiu referenced in commit 088c845 - "feat(main): own reveal snapshot compositing in the engine (#18138) (#18344) on Sep 5, 2026, 1:59 AM