Skip to content

ui-react: pair the remaining Cartesian theme cells in answer-delivery and journal runtime tests #3329

Open

Description

@schlessera

Context

#2763's acceptance audit of #1849 found two runtime families that still run the full 320/1280 × dark/light Cartesian matrix. The same files, and docs/process/theme-parity.md, reduce other families to the paired cells 320 dark and 1280 light. #1849's definition of done says "Runtime suites preserve independent failure-mode coverage without an automatic Cartesian theme multiplier", and "Remaining genuine theme-specific checks state a concrete reason". Neither family states a theme-specific reason, and both were added after the theme reduction:

  • packages/ui-react/tests/answer-delivery-runtime.test.ts:337-340: for (const theme of ["dark", "light"]) × for (const width of [320, 1280]) around 1887: Other has explicit current-text Submit at ${width}px in ${theme}. It came in through CONTRACT: fix(ui-react): keep explicit Submit for Other answers #1896 (2026-10-15). The only theme-dependent assertion is OTHER_LAYOUT_USES_REAL_THEME (computed color-scheme). Submit count/disable, keyboard reach, the ≥44px touch height, no overflow, the tap/Space path and single settlement do not vary by theme in the source.
  • packages/ui-react/tests/turn-journal-runtime.test.ts:101: for (const width of [320, 1280]) for (const theme of ["dark", "light"]) around journal configuration coverage keeps small changes first and preserves inspection. It came in through CONTRACT: keep retained journal changes ahead of coverage gaps #2214 (2026-10-16). The same file already defines journalRuntimeCells = [[320, "dark"], [1280, "light"]] (line 100), and the comment at lines 97-99 says JournalTheme stories cover both themes.

Hosted cost at exhaustive scheduled run 41382713082 (source 8e9855e706ab43dc1bb5b822296f171431e2546d): eight cases, 22.33 s summed case time. Removing the two off-diagonal copies of each family saves about 11 s. The cost is small; the finding is a definition-of-done gap.

Scope

For each of the two families, choose one, with an assertion map in the PR:

  1. Run only the paired cells (320 dark, 1280 light), as the other families in these files do. Name the central Storybook/consumer story assertions (docs/process/theme-parity.md, packages/ui-kit/stories/conversation/JournalTheme.stories.tsx and the answer/Other consumer stories, if any) that cover the removed copies' theme-only assertions.
  2. Keep the Cartesian copies, with a source comment and a docs/process/theme-parity.md entry that state the concrete theme-specific failure mode each removed copy would miss.

If no central story covers the Other answer card's theme-only layout in both themes, add the minimal consumer story assertion rather than keeping a runtime copy. Otherwise state why option 2 applies.

Out of scope

  • Theme loops in browser/layout/pointer/visual projects (packages/ui-react/tests/browser/**, packages/ui-kit/tests/visual/**). Whether those are in Epic: tests give faster feedback with less redundant work #1849's scope is a maintainer question recorded on Epic: tests give faster feedback with less redundant work #1849.
  • Accessibility and contrast cases that are inherently theme-specific (tests/prose-links-render.test.tsx, tests/answer-suggestions-targets.test.tsx, packages/ui-kit/tests/contrast.test.ts).
  • Any new lint/guard against theme multipliers.
  • Any change to the delivered assertions themselves beyond removing redundant copies.

Acceptance criteria

  • Each family runs the paired cells, or carries a stated concrete theme-specific reason in source and in docs/process/theme-parity.md.
  • For a reduction, the PR maps every assertion of the removed copies to a retained runtime cell or a named central story assertion. A mutation is recorded: break a theme-only style in the covered component, show the central story assertion fail, restore.
  • All other unique runtime assertions (settlement, frames, Revert/Undo effects, download bytes, keyboard and touch paths) still run at both widths.

Verification

bun run test packages/ui-react/tests/answer-delivery-runtime.test.ts packages/ui-react/tests/turn-journal-runtime.test.ts and the affected Storybook projects (node scripts/visual.mjs --project=storybook --project=storybook-light) under the pinned offline harness, then hosted ready-candidate proof. Record before/after case counts.

Contract impact

None. Test structure only.

Blocked by #3291

Activity

  1. added
    type: testCoverage, harness or proof work with no behaviour change.
    area: ui-reactReact chat/files/voice components, stores, WebSocket transport.
    priority: p2Wanted, not scheduled. Pulled in when a milestone has room.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 2, 2026
  2. self-assigned this
    on Nov 2, 2026
  3. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Claiming this issue (claim token claim-3329-45000). Branch: test/3329-pair-theme-cells from epic/1849-test-cost. Same-file collision report: drafts #3056 and #3059 (evaluation only, do not merge) and #3116 also touch both runtime test files; I will keep the edit narrow to the two loops.

  4. added this to the 0.45.0 milestone on Nov 2, 2026
  5. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Implementation is up as #3345, against epic/1849-test-cost at 3bee06dce265, head e3df429bf5d5. Both families now run 320px dark and 1280px light. A new Conversation/Answer theme consumer story and the extended Conversation/Journal theme story own the theme paint in both Storybook projects. The assertion map is in the PR and in docs/process/theme-parity.md. Each mutation fails only in storybook-light, on contrast; the receipts are in the PR. The PR is marked ready and its hosted candidate proof is pending (run 41507059001). The answer-delivery runtime file has no local receipt in this environment; hosted runtime proof covers it. This stays assigned while the PR is live. It closes when the epic batch lands on main.

  6. added
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 2, 2026
  7. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #3291 is closed, so scripts/sync-project.ts is removing the blocked label.

  8. removed
    blockedWaiting on another issue or an upstream dependency. Say which in the body.
    on Nov 3, 2026
  9. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Blocker #3291 is closed; its fix, #3385, merged to main as 730391d90. #3291 was this issue's only blocker, so blocked is removed. PR #3345 is refreshed onto epic/1849-test-cost (dfc528d80) and origin/main (559fe7b41), now at head 7ff87a9a9. Typecheck, build, lint and check:pr --base origin/epic/1849-test-cost pass (1346 pass, 0 fail), and a fresh ready proof is requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: ui-reactReact chat/files/voice components, stores, WebSocket transport.priority: p2Wanted, not scheduled. Pulled in when a milestone has room.type: testCoverage, harness or proof work with no behaviour change.

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions