Repository navigation
Description
Out of scope
The expanded-card readiness work in #1948, production theme behavior, changing native observation windows, other fixture families, and broader browser-harness refactoring.
Context
Found while working #1948. At frozen source 11655e165, the suffix fixture saves document.documentElement.dataset.theme, then assigns that possibly absent value back during cleanup (ctx.onTestFinished, packages/ui-react/tests/browser/connection-replay.layout.tsx:29-35). Assigning undefined through DOMStringMap creates the literal attribute value "undefined" rather than restoring absence.
A native pinned Chromium diagnostic on the unchanged suffix body observed {before:null,after:"undefined"} after the first suffix case. The second case consequently begins with the literal value. Both suffix product tests pass, so their passing replay assertions do not prove exact global-state restoration. The separate #1948 expanded-card cleanup restores absence correctly; that issue explicitly preserves the suffix proof body.
Scope
Restore the suffix fixture's original theme attribute presence/value exactly, with failure-safe owned resource cleanup where needed for that restoration. Keep this correction scoped to the suffix fixture and its direct native proof. Related to #736's isolation outcome; discovery during #1849 does not make this a test-cost optimization child.
Acceptance criteria
- Starting without
data-theme, successful and assertion-failing suffix cleanup leaves the attribute absent, verified throughhasAttribute/getAttributein the native browser. - Starting with a theme value, cleanup restores that exact value. Verify viewport, network restoration and owned root/DOM/style disposal against their captured state.
- Preserve the two suffix cells, all MutationObserver/transient-removal, native painted-frame, geometry, scroll, focus and no-unsolicited-send assertions, plus the independent sixteen expanded-card cells.
- Show the absent-attribute restoration assertion failing on the original cleanup with the literal
"undefined", then passing after correction. Retain the original observation windows and production animation policy.
Verification
Use the existing pinned offline ui-react-layout runner for focused failure/restoration and the complete replay file; run normal preflight and selected hosted proof. Source-navigation pointers above describe the frozen source before #1948 inserts its helper; resolve current anchors before implementation.
Contract impact
None. Test isolation only; no product, package dependency or public interface change.
Triage — 2026-10-16
Source inspection at main 65ed23dc942ecaccbe86ae1beb4af6eeb3ad3eb5 confirms the same cleanup at (ctx.onTestFinished, packages/ui-react/tests/browser/connection-replay.layout.tsx:29-35): the saved optional dataset value is assigned back directly. The existing native diagnostic above is the runtime evidence; this pass did not repeat a browser suite. The brief is complete and requires no product/design ruling. Classify as wanted but unscheduled priority: p2, retain test-only scope, and add agent-ready.
Epic membership: part of #2753, the browser-verification epic nested under #736; not part of the test-cost outcome #1849.
2026-10-24: attached natively to #2753 (nested browser-verification epic under #736) after #736's browser children moved to the new nested epic and freed capacity; replaced the earlier standalone-by-reference wording.
Activity