Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/web/src/connection/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ const StoredShellSnapshotJson = Schema.fromJsonString(StoredShellSnapshot);
// v4 invalidates snapshots cached before the wire projection retained tool
// output fields (result/aggregatedOutput); a warm cache resumes via
// `afterSequence` and would otherwise show stripped payloads forever.
// v5 invalidates snapshots cached before server migration 044 deleted
// orphaned retracted messages out-of-band: the deletion emits no events, so
// a warm cache resuming via `afterSequence` would render the ghost messages
// forever. Any server-side row surgery needs a bump here to reach clients.
const StoredThreadSnapshot = Schema.Struct({
schemaVersion: Schema.Literal(4),
schemaVersion: Schema.Literal(5),
environmentId: EnvironmentId,
threadId: ThreadId,
snapshot: OrchestrationThreadDetailSnapshot,
Expand Down Expand Up @@ -567,7 +571,7 @@ export const connectionStorageLayer = Layer.effectContext(
saveThread: (environmentId, snapshot) =>
Effect.gen(function* () {
const encoded = yield* encodeStoredThreadSnapshot({
schemaVersion: 4,
schemaVersion: 5,
environmentId,
threadId: snapshot.thread.id,
snapshot,
Expand Down
Loading