fix(core): add historical sync on workspace connect (#23121)

This commit is contained in:
James Long
2026-04-17 13:30:09 -04:00
committed by GitHub
parent fcb473ff64
commit a8c78fc005
8 changed files with 234 additions and 24 deletions
@@ -141,9 +141,12 @@ describe("Workspace.sessionRestore", () => {
Object.assign(
async (input: URL | RequestInfo, init?: BunFetchRequestInit | RequestInit) => {
const url = new URL(typeof input === "string" || input instanceof URL ? input : input.url)
if (url.pathname !== "/base/sync/replay") {
if (url.pathname === "/base/global/event") {
return eventStreamResponse()
}
if (url.pathname === "/base/sync/history") {
return Response.json([])
}
const body = JSON.parse(String(init?.body))
posts.push({
path: url.pathname,