A directory subscribed by the stream but neither registered as a repo nor
remembered as a session directory was reconciled on subscribe but skipped on
resync, so a missed shell exit could leave the indicator stale. Pass the
stream's subscribed directories to onResync and reconcile their pending
actions and running shells alongside the tracked ones.
Subscribe responses that arrive after the connection was replaced or the
directory was unsubscribed could also apply snapshots to state the client no
longer owns. Ignore responses from a superseded connection and report only
directories still subscribed.
The stale-indicator e2e test now waits for the successful unsubscribe response
and asserts the subscribe responses succeeded instead of sleeping.
session.moved is published on the old directory and carries the new one in
data.location, so it reached the page. useSSE refreshed the cached session on
session.renamed but had no session.moved case, and the event context only
invalidated session lists, so the page kept using the old directory and never
subscribed the new one. Shells, prompts and other directory-scoped events in
the new directory were missed until a refocus, reconnect or reload.
Handle session.moved like session.renamed. The refetch flips the page's
sessionDirectory, it subscribes the new directory, and the stream's
onDirectoriesSubscribed reconciliation loads that directory's running shells
and pending prompts.
The background activity indicator went stale for sessions living in a
directory that is not a registered repo. Running shells were only synced
for repo directories derived from the repos query, so session directories
subscribed over the event stream were never reconciled, leaving the
indicator visible after the shell had exited.
Report the directories actually subscribed (mid-connection updates and
pending directories flushed after connect) from the event stream through
onDirectoriesSubscribed, and reconcile running shells and pending
permissions/forms for them in the event context.
Exercise the file browser preview, assistant markdown images served by a
local mock OpenAI-compatible provider, and composer image attachments
in a real browser against the isolated e2e instance.
- server.sh removes e2e/.tmp when the backend exits, forwarding SIGTERM so
Playwright's graceful shutdown still applies
- a cleanup reporter removes playwright-report and test-results after a
passing run; failed runs keep them for debugging and CI upload