fix(app): register new home projects (#41018)

This commit is contained in:
Brendan Allan
2026-08-07 15:34:32 +08:00
committed by GitHub
parent b467518dae
commit 5347b5e009
2 changed files with 29 additions and 1 deletions
@@ -161,6 +161,21 @@ describe("HttpApi instance context middleware", () => {
}),
)
it.live("persists the routed project while loading instance context", () =>
Effect.gen(function* () {
const dir = yield* tmpdirScoped({ git: true })
const project = yield* Project.Service
yield* serveProbe()
const response = yield* HttpClient.get(`/probe?directory=${encodeURIComponent(dir)}`)
expect(response.status).toBe(200)
const saved = (yield* project.list()).find((item) => item.worktree === dir)
expect(saved).toBeDefined()
expect(saved?.id).not.toBe("global")
}),
)
it.live("falls back to the raw directory when URI decoding fails", () =>
Effect.gen(function* () {
yield* serveProbe()