Skip to content

feat(core,webapp): version 2 transcript snapshot and a dual-version dashboard reader - #4892

Open
ericallam wants to merge 1 commit into
feat/chat-bound-streamtextfrom
feat/transcript-snapshot-v2-tri-13667
Open

feat(core,webapp): version 2 transcript snapshot and a dual-version dashboard reader#4892
ericallam wants to merge 1 commit into
feat/chat-bound-streamtextfrom
feat/transcript-snapshot-v2-tri-13667

Conversation

@ericallam

Copy link
Copy Markdown
Member

Summary

Adds version 2 of the persisted chat.agent snapshot and a reader for both versions, and moves the dashboard's Sessions view onto that reader.

Version 2 stores each message as { id, final, message } and adds a state slot for what the runtime cannot rebuild from the messages (a compaction summary, for example). parseTranscriptSnapshot() in @trigger.dev/core reads a version 1 or version 2 blob into the version 2 shape, so the SDK and the webapp share one reader. Nothing writes version 2 yet; the SDK still writes version 1 in this change.

The dashboard part matters for the deploy order: the webapp must be able to read version 2 before an SDK that writes it is released, or the Sessions view stops showing history for sessions on the new SDK.

@changeset-bot

changeset-bot Bot commented Sep 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d37c018

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: fd3cadb1-9762-49cc-ae6c-78727cad8cec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds version 2 transcript snapshot types, validation, and parsing. Version 1 snapshots are upgraded in memory and invalid inputs return undefined. Adds a helper that converts normalized snapshots into ordered UI messages with snapshot timestamps and preserves the latest output event ID. Updates agent snapshot loading to use the helper and record timestamps before flushing messages. Adds tests for parsing, normalization, timestamp ordering, envelope unwrapping, missing IDs, and invalid inputs.

Merge Risk: 🟡 Moderate · up to 035e4

Transcript snapshots now support both persisted versions, but a replayed message can retain its earlier arrival timestamp after snapshot replacement and display out of order. Update timestamps when applying snapshot messages before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description clearly explains the snapshot format changes, dual-version reader, dashboard impact, and deploy-order requirement. It does not follow the repository template because it omits the issue… Add the required template sections. Include the issue reference, complete the checklist, document the test commands and results, add a short changelog entry, and state whether screenshots are applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main changes: version 2 transcript snapshots and a dual-version dashboard reader. It is specific and concise enough for the change set.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains the snapshot format changes, dual-version reader, dashboard impact, and deploy-order requirement. It does not follow the repository template because it omits the issue reference, checklist, Testing, Changelog, and Screenshots sections.

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/transcript-snapshot-v2-tri-13667

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ericallam
ericallam marked this pull request as ready for review September 5, 2026 20:23
devin-ai-integration[bot]

This comment was marked as resolved.

@ericallam
ericallam force-pushed the feat/transcript-snapshot-v2-tri-13667 branch from 035e432 to d7b18a9 Compare September 5, 2026 20:29
devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented Sep 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@d37c018

trigger.dev

npm i https://pkg.pr.new/trigger.dev@d37c018

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@d37c018

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@d37c018

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@d37c018

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@d37c018

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@d37c018

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@d37c018

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@d37c018

commit: d37c018

coderabbitai[bot]

This comment was marked as resolved.

…ashboard reader

Adds TranscriptSnapshotV2 (entries of {id, final, message} plus an opaque state record) and parseTranscriptSnapshot(), which reads a version 1 or version 2 blob into the version 2 shape. The Sessions dashboard seeds its transcript through that reader, so it keeps rendering history once the SDK starts writing version 2. The SDK still writes version 1 in this change.
@ericallam
ericallam force-pushed the feat/transcript-snapshot-v2-tri-13667 branch from d7b18a9 to d37c018 Compare September 5, 2026 20:38
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.

1 participant