Skip to content

fix(client): retain live messages during transcript hydration - #2

Draft
replicas-connector[bot] wants to merge 1 commit into
devfrom
transcript-hydration
Draft

replicas-connector[bot] wants to merge 1 commit into
devfrom
transcript-hydration

Conversation

@replicas-connector

@replicas-connector replicas-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Issue for this PR

Fixes anomalyco#56725

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A delayed transcript response can erase a live assistant or replace its streamed text with an older version. Reconcile rows changed during the read over the snapshot, preserving removals, optimistic admissions, the message index, and pagination.

Implemented and tested with AI assistance.

How did you verify your code works?

  • From packages/client: bun test --conditions=browser test/solid-transcript-race.test.ts. 4 regressions pass: absent/stale assistant snapshots, cancellation, and ordinary snapshot replacement. Regression assertions fail against the parent implementation.
  • bun typecheck passes in packages/client.
  • bun run check passes from the repository root (34 packages). The first attempt was killed by memory pressure while two full checks ran together; the isolated rerun passed.
  • The broader Solid tests have the same 13 pre-existing assertion failures on unchanged origin/dev and this branch; no additional existing-test failures were observed. The failures involve toMatchObject assertions on Solid store proxies.
  • Runtime: Bun 1.4.2, Linux x64.

Screenshots / recordings

Client projection logic; no visual change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Created by Bhupesh Cholake ([email protected]) with Replicas

Replicas Workspace

Co-Authored-By: Bhupesh Cholake [email protected]
Co-Authored-By: replicas-connector[bot] <replicas-connector[bot]@users.noreply.github.com>

Track rows changed while transcript reads are in flight and reconcile the
latest local rows over stale snapshots. Keep removals and optimistic
admissions consistent with the message index and pagination cursor.

Fixes anomalyco#56725

Co-Authored-By: Bhupesh Cholake <[email protected]>
Co-Authored-By: replicas-connector[bot] <replicas-connector[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client: delayed transcript hydration discards a live assistant message

0 participants