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
commit a8c78fc005
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 234 additions and 24 deletions

View file

@ -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,