Commit Graph
11 Commits
Author SHA1 Message Date
Chris Scott a7b961fe30 Merge pull request #431 from chriswritescode-dev/fix/stale-background-activity
fix(session): stop the background activity indicator going stale
2026-10-15 10:54:08 -04:00
Chris Scott 1b2665bd2b fix(background-activity): address review on resync scope and stale subscribe responses
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.
2026-10-15 10:18:06 -04:00
Chris Scott 74a2f6fb6e fix(session): follow a moved session's new directory without a reload
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.
2026-10-15 13:25:01 +00:00
Chris Scott 37b4ab89f0 fix(background-activity): reconcile shells for directories subscribed by the stream
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.
2026-10-15 13:00:08 +00:00
Chris Scott cc0e136f3c test(e2e): wait for TTS synthesis to settle before asserting exclusions 2026-10-13 22:57:29 -04:00
Chris Scott 8a893d0d2a refactor(tts): read visible replies when floating button is tapped while scrolled up 2026-10-13 21:31:03 -04:00
Chris Scott 458f26134b test(e2e): cover inline markdown images and image attachments
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.
2026-10-13 01:38:55 +00:00
Chris Scott 0b42f7de97 test(e2e): clean up run artifacts after the suite
- 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
2026-10-12 09:31:13 -04:00
Chris Scott 901bcd092e test(e2e): fail background activity cleanup when a shell removal is rejected 2026-10-12 00:11:45 -04:00
Chris Scott 964c6c2f6e test(e2e): cover session background activity indicator 2026-10-11 23:58:49 -04:00
Chris Scott 2580cdf863 test(e2e): add Playwright suite covering every app route 2026-10-11 22:30:55 -04:00