- Add paginated thread history with bounded snapshots and replay limits - Trim oversized wire payloads and support progressive mobile history loading
Showing the changes to packages/client-runtime/src/state/shellReducer.test.ts (1 of 43 files). Show all
Unified · Split
| @@ -214,6 +214,30 @@ describe("applyShellStreamEvent", () => { · 213 unmodified lines | ||
| 214 | 214 | expect(next.projects[0]?.repositoryIdentity).toEqual(repositoryIdentity); |
| 215 | 215 | }); |
| 216 | 216 | |
| 217 | + it("treats higher-sequence compact enrichment as metadata-only", () => { | |
| 218 | + const previous = { | |
| 219 | + ...v2ShellSnapshot, | |
| 220 | + snapshotSequence: 5, | |
| 221 | + projects: [{ ...v2Project, repositoryIdentity: null }], | |
| 222 | + threads: [{ ...v2ThreadShell, title: "Newest title" }], | |
| 223 | + }; | |
| 224 | + const next = mergeShellSnapshotProjects( | |
| 225 | + previous, | |
| 226 | + { | |
| 227 | + ...v2ShellSnapshot, | |
| 228 | + snapshotSequence: 8, | |
| 229 | + projects: [{ ...v2Project, repositoryIdentity }], | |
| 230 | + threads: [], | |
| 231 | + archivedThreads: [], | |
| 232 | + }, | |
| 233 | + { resolvedRepositoryIdentityRoots: [v2Project.workspaceRoot] }, | |
| 234 | + ); | |
| 235 | + | |
| 236 | + expect(next.snapshotSequence).toBe(5); | |
| 237 | + expect(next.threads[0]?.title).toBe("Newest title"); | |
| 238 | + expect(next.projects[0]?.repositoryIdentity).toEqual(repositoryIdentity); | |
| 239 | + }); | |
| 240 | + | |
| 217 | 241 | it("lower-sequence enrichment cannot resurrect empty structural state", () => { |
| 218 | 242 | const previous = { |
| 219 | 243 | ...v2ShellSnapshot, |