A route handler that calls `route.fetch()` can still be running when its test returns. Closing the browser context disposes the fetched response, the handler throws `Response has been disposed`, and Playwright reports that against a test whose assertions had all passed. With `failOnFlakyTests` on, that fails the shard.
Specs that answer requests through `route.fetch()` now take `test` from `e2e/specs/mock/fixtures.ts`. Its `context` fixture detaches the routes on the context and its pages with `unrouteAll({ behavior: 'ignoreErrors' })` before Playwright closes it; contexts a spec opens itself close through `closeContext`.
`ignoreErrors` rather than `wait`: a wait never ends for a handler parked on a promise the test leaves unsettled, and with two handlers in flight Playwright stops intercepting when the first finishes and continues the other request itself, so the second handler's `route.fulfill()` throws `Route is already handled!`.
* 🏷️ feat: Add getEphemeralSender and Cover the Ephemeral-Id Format
* ♻️ refactor: Consolidate the Ephemeral Sender Chains
* 🏷️ fix: Decode the Ephemeral Sender for Persisted Messages
* 🏷️ fix: Mirror the Persisted Sender Chain in useGetSender
* ✅ test: Widen the Custom-Endpoint Fixture Type
* ✅ test: Expect the Spec Label in the Composer Placeholder
* 🏷️ fix: Resolve the Sender from Exact Labels, Not the Lossy Id
* 🪶 fix: Yield Soft Default Model Spec to Agent Picks in Picker-Only Deployments
The `hasEphemeralModelOptions` gate makes the soft default canonical whenever
the selector offers no ephemeral endpoint → model options, so lingering
endpoint/model residue never strands a new chat on an unselectable endpoint.
That gate swept in agent and assistant selections too: under an agents-only
allow-list (`addedEndpoints: [agents]`), every New Chat re-armed the soft spec
and discarded the agent the user had just selected, with no way to make the
choice stick.
An agent pick is the one real selection a picker-only deployment offers, so it
now yields like any other selection, while endpoint/model residue keeps falling
to the soft default.
- Add `hasSelectableEntitySelection`: the stored setup yields when it names a
non-ephemeral agent_id (or an assistant_id) on an endpoint the allow-list and
endpoints config still expose. Ephemeral ids, and picks whose endpoint has
since left the allow-list, stay residue so a stale entity cannot strand a new
chat.
- Invert the three unit cases that asserted the soft default outranking a stored
agent under an agents-only allow-list; add coverage for assistants, prioritized
configs, ephemeral agent ids, endpoint/model residue, an endpoints config
without agents, and the pre-load allow-list path (35 cases, was 29).
- Add an e2e regression test: under an intercepted agents-only allow-list, a
selected agent survives New Chat and a cold load, while a cleared instance
still lands on the soft default.
* 🧹 chore: Type the Intercepted Startup Config in the Soft Default E2E
The agents-only allow-list interception cast the `/api/config` response to
`{ modelSpecs?: Record<string, unknown> }`, discarding the startup-config schema
at the exact point the test rewrites an API response — so a future config shape
change would go unchecked here. Reuse `TStartupConfig` instead, and only rewrite
`modelSpecs` when the response actually carries it rather than fabricating it.
Resolve the new-chat default spec from the most recent conversation setup
(LAST_CONVO_SETUP_0) instead of reconstructing intent from accumulated
cross-endpoint history. Removes hasStoredModelValue, hasStoredPrefixValue,
hasStoredModelSelection, the sticky LAST_SPEC read, the nested
resolveSoftDefault closure, and the duplicated prioritize/modelSelect branches.
Fixes the soft default being dropped on New Chat ("Select a model") when its
preset endpoint sits outside modelSpecs.addedEndpoints alongside a custom
endpoint: a model lingering in LAST_MODEL for that endpoint no longer
suppresses the soft default.
Clear All Chats now also clears LAST_SPEC/LAST_MODEL/LAST_TOOLS so a new chat
afterward cleanly returns to the soft default. Adds the cross-endpoint unit
case, a clearAllConversationStorage test, and a cold-load e2e regression test.