Skip to content

ui-react: remove theme duplication from connection-continuity recovery tests #1851

Closed

Description

@schlessera

Out of scope

Reducing the ten recovery cycles, replacing the real host/Chromium network transitions, dropping mobile/desktop coverage, creating local theme-parity smoke duplicates, changing reconnect backoff or product behavior.

Context

Part of #1849.

Prerequisite #1850 is delivered by #1861 (2f244e2c2e31b4ce9cc489601430a3dd94f9088b); use docs/process/theme-parity.md for the committed coverage map.

The maintainer selected separating recovery continuity from central Storybook theme parity. The implementation builds on the committed #1855 readiness candidate 4ed98f7798687e16d6a660bb7076ec8f415af881, preserving its native barriers and finite-animation control. At that source, cells (packages/ui-react/tests/connection-continuity-runtime.test.ts:250-255) multiplies two widths by both themes. for (const cell of cells) at670 repeats missed-progress replay, ten-disconnect stress and IME recovery. The final matrix retains 320px dark and 1280px light; only the alternate-theme copies are removed.

Viewport coverage is meaningful: function drawn (same file:272-275) selects the desktop sessions pane versus phone strip, and new-chat navigation also differs. function same (same file:525-541) holds DOM identity, composer/visible-message geometry, scroll, focus, selection, image object URLs and pending follow-ups. Theme is selected and verified, but those recovery assertions are identical. The original 5cf1d548 profile estimated about259 seconds of removable test-body work; this historical opportunity estimate is not the final measurement. Compare the exact readiness baseline and reduced candidate using identical combined continuity/HTML-preview commands, with per-test, setup/build and whole-command accounting.

Scope

After #1850 provides the central coverage map, retain one deterministic theme per meaningful viewport and remove redundant theme multiplication from every family in this file. Update names and comments to describe recovery/responsive coverage, with an explicit reference to central parity ownership. Preserve the three separately parameterized stale-history cases.

Acceptance criteria

  • Each of the missed-progress, ten-disconnect and IME scenarios runs once at320px and once at1280px, unless a concrete theme-sensitive recovery failure justifies a narrowly scoped exception.
  • Preserve all ten cycles and alternating caret/selection states, real offline/listener/socket transitions, delayed queue frames, upload interruption/retry/completion, zero unsolicited chat sends, retained drafts/attachments/follow-ups/trackers, missed-delta ordering, IME composition and actual user commit.
  • Preserve all three stale-history variants, cleanup and independent desktop/mobile navigation/DOM paths. Preserve ci: justify deliberate test waits and remove avoidable wall-clock delays #1855’s finite-animation readiness control unchanged. Expected default count is ten tests: three stale-history cases, three scenario families at two widths, and the independent readiness control (sixteen before the theme reduction).
  • An assertion mapping identifies removed parameter copies and their central Storybook coverage. Do not replace duplicated recovery runs with shorter theme checks in this file.
  • A real browser-visible recovery mutation fails the intended continuity assertion and passes after restoration.
  • Record before/after per-test and whole-file time on comparable runtime/resources; distinguish test-body savings from build/setup and CI critical-path effects.

Verification

bun run test packages/ui-react/tests/connection-continuity-runtime.test.ts with required real Chrome/offline guards, targeted mutation/restoration, bun run check:pr --base origin/main and complete selected current-head hosted proof. Keep all default discovery and proof gates. Binding context: docs/process/testing.md, docs/decisions/ci-utility.md, the central parity ruling and the existing offline-continuity product requirements.

Contract impact

None. Test parameterization only; production recovery and public interfaces are unchanged.

2026-10-14 prerequisite reconciliation: #1850 is closed after its matching-head merge and complete selected PR proof; the theme-matrix work is unblocked. Its own assertion mapping and verification remain required.

2026-10-14 source reconciliation: the scoped #1855 stack adds an independent readiness control, so the expected count is ten rather than the original nine. Updated source identity/citations and comparison requirements; the recovery scenario bodies, clock behavior and observation windows remain unchanged. #1855 must merge before this dependent reduction.

Activity

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

    @schlessera
    OwnerAuthor

    Claiming the continuity matrix reduction under #1849. Claim token e1849-1851-f4e75e84; branch test/1851-continuity-matrix-e1849-f4e75e84. The dedicated Astra worker will build on #1855's committed timer/readiness candidate, retain its added control and every original recovery guarantee, and coordinate merge order and measurements with the epic coordinator. Theme parity is already delivered by #1850; this changes only redundant parameter copies.

  5. schlessera commented on Oct 14, 2026

    @schlessera
    OwnerAuthor

    2026-10-14 readiness reconciliation: verified the exact #1855 candidate source and updated the body’s citations and expected count from nine to ten. The extra case is the existing finite-animation readiness control, which remains unchanged. The matrix retains 320px dark and 1280px light for each recovery family, with all scenario/helper bodies unchanged. The central assertion map names consumer composer and session-row theme coverage; native recovery, identity, scrolling, saves, uploads, queue/history ordering and IME proof remain at both widths. #1855 merges first; measurements will compare its exact committed candidate against this reduction.

  6. added this to the 0.44.0 milestone on Oct 14, 2026
  7. schlessera commented on Oct 14, 2026

    @schlessera
    OwnerAuthor

    Implementation is ready in #1905 at 4fe2e1216f9b68c8aa52aa5871c4d53791f295be; #1893 must merge first. Both this issue and the PR retain verified milestone 0.44.0.

    The source-matched standalone continuity pair passed 16/16 baseline cases and 10/10 candidate cases. Whole-command wall fell from 636.23s to 379.81s; test bodies fell from 569.19905s to 307.21521s. The six removed theme copies account for 265.77416s of baseline body time. CPU and peak memory were essentially unchanged; no CI critical-path gain is claimed. The PR records exact source/runtime identities, each test duration and the combined imports/build/setup/teardown remainder.

    A native offline-event geometry mutation failed the original retained phone assertion with Expected <=1px, Received 12px; the fixture was restored, then all ten candidate cases passed with 1,592 assertions. Every helper/scenario after the parameter list remains unchanged. Final local preflight passed 571 tests and 3,532 assertions with no failure. The added readiness control, three stale-history cases, all ten recovery cycles at both widths and actual native IME commits remain.

    Claim e1849-1851-f4e75e84 stays active under the epic coordinator for current-head hosted verification, ordered merge, actual squash/main verification and closure. This is a completed implementation/local-proof handoff, not a claim that hosted proof or merge has completed.

  8. schlessera commented on Oct 14, 2026

    @schlessera
    OwnerAuthor

    Continuity matrix delivery #1905 merged as 52f85a1721910ca560fce38cf47eb3096ae97562; #1851 is closed, and both issue/PR milestones read back as 0.44.0 (58).

    Automatic ready CI 38608482042, attempt 1, passed all 13 selected jobs including aggregate; packaging was intentionally unselected and contract passed. Every executed checkout log identifies 0ac88a6555ad89c6f417fe012ea1504cbaa8ae27, parents tested main 04a659593379a0c8da9c049fa649124d6fd54f70 and head f75afb9a32038eeb5646ed21e411c92738818b85, tree c727956aba7f379e10ac3f1be7121a140552eb38. Runtime, tests, workflow, scripts and lockfile remain identical in the prospective merge after the sole later documentation/evidence commit.

    Matching-head squash has actual parent 5fd5c24810dd5fdecea1bc378bfed7155b9cd911 and computed combined tree 0f16ff81f7391ff84615cae6d543e8348a8d8d3c, verified by immutable API/local Git/main ancestry. The older PR run retains its original tested tree; it is not relabelled as proof on the later docs combination. Automatic main proof is pending separately.

    Local measured full command: 636.23→379.81 seconds (256.42 seconds / 40.3% lower), 16→10 cases. All retained bodies and ten-cycle scenarios remain, with original negative windows unchanged; central parity owns removed theme copies. CPU 161.56→160.26 seconds is effectively flat. Ready CI consumed 7296 summed job seconds and 2463 event-to-completion seconds including queues; this is not a matched CI gain. Superseded conflict/type-repair runs and cancelled-running costs remain separately recorded.

  9. schlessera commented on Oct 14, 2026

    @schlessera
    OwnerAuthor

    Automatic main-push CI 38614521487, attempt 1, passed all 13 selected jobs for #1905 / #1851. Every executed job checkout log identifies squash 52f85a1721910ca560fce38cf47eb3096ae97562; packaging was intentionally unselected. PR and closed issue retain milestone 0.44.0 (58).

    Main execution cost: 7637 summed job seconds; event-to-completion 1653 seconds including queues. This is separate from the local 636.23→379.81-second paired command measurement, which retained native continuity, IME, identity, geometry and history-race assertions. No matched CI speedup is claimed. The clean merged worktree is removed; branch and evidence remain available.

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