feat(server): durable log reads, changes feed, and watermarked snapshots (#34962)

This commit is contained in:
Kit Langton
2026-07-02 16:42:30 -04:00
committed by GitHub
parent 33705e632a
commit bc2e270f82
28 changed files with 1352 additions and 1555 deletions
+1 -1
View File
@@ -869,7 +869,7 @@ export const { use: useData, provider: DataProvider } = createSimpleContext({
setStore(
"session",
"status",
Object.fromEntries(Object.keys(active).map((sessionID) => [sessionID, "running" as const])),
Object.fromEntries(Object.keys(active.data).map((sessionID) => [sessionID, "running" as const])),
),
),
result.location.refresh(),
+2 -1
View File
@@ -232,7 +232,8 @@ test("connectedOnce is false until first connect and persists across disconnect"
test("tracks session status from active sessions and execution events", async () => {
const events = createEventStream()
const calls = createFetch((url) => {
if (url.pathname === "/api/session/active") return json({ data: { "session-active": { type: "running" } } })
if (url.pathname === "/api/session/active")
return json({ data: { "session-active": { type: "running" } }, watermarks: {} })
}, events)
let data!: ReturnType<typeof useData>
+1 -1
View File
@@ -98,7 +98,7 @@ export function createFetch(override?: FetchHandler, events?: ReturnType<typeof
if (url.pathname === "/api/shell") return json({ location: { directory, project: { id: "proj_test", directory: worktree } }, data: [] })
if (url.pathname === "/api/mcp") return json({ location: { directory, project: { id: "proj_test", directory: worktree } }, data: [] })
if (url.pathname === "/api/session") return json({ data: [], cursor: {} })
if (url.pathname === "/api/session/active") return json({ data: {} })
if (url.pathname === "/api/session/active") return json({ data: {}, watermarks: {} })
if (
["/api/agent", "/api/model", "/api/provider", "/api/integration", "/api/command", "/api/skill"].includes(
url.pathname,