fix(app): separate provider lifetimes and reactive ownership (#33739)

This commit is contained in:
Luke Parker
2026-06-25 04:42:06 +00:00
committed by GitHub
parent dc569b5a5f
commit cfd75d62fe
37 changed files with 837 additions and 273 deletions
@@ -0,0 +1,14 @@
import { expect, test } from "bun:test"
import { ServerConnection } from "@/context/server"
import { selectPromptTab } from "@/context/prompt"
import type { Tab } from "@/context/tabs"
test("selects the explicitly scoped session tab instead of the active tab", () => {
const server = ServerConnection.Key.make("local")
const tabs: Tab[] = [
{ type: "session", server, sessionId: "A" },
{ type: "session", server, sessionId: "B" },
]
expect(selectPromptTab(tabs, { dir: "repo", id: "B" }, server)).toBe(tabs[1])
})