fix(app): hydrate v1 session progress (#38606)

This commit is contained in:
Brendan Allan 2026-07-24 11:39:40 +08:00 committed by GitHub
commit db88c42335
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -64,7 +64,7 @@ describe("MCP queries", () => {
})
describe("active session query", () => {
test("loads active sessions once per server cache", async () => {
test("loads active sessions immediately and once per server cache", async () => {
let calls = 0
const queryClient = new QueryClient()
const options = loadActiveSessionsQuery(ServerScope.local, {
@ -77,6 +77,7 @@ describe("active session query", () => {
expect(await queryClient.fetchQuery(options)).toEqual({ ses_running: { type: "running" } })
expect(await queryClient.fetchQuery(options)).toEqual({ ses_running: { type: "running" } })
expect(calls).toBe(1)
expect(options.enabled).toBe(true)
expect([...options.queryKey]).toEqual([ServerScope.local, "activeSessions"])
})