Archived
fix(sessions): guard, gate, and test session reload
Build on the original Reload action with the fixes raised in review: - Server reload() now refuses to run on archived (read-only) sessions and when the session has work in progress, mirroring archive(), so a reload can no longer silently abort an in-flight agent run. - Add a sessions.reload runtime capability; the client gates both the reloadSession call and the Reload menu entry on it so the action only appears for machines whose Pi-Web runtime supports it. - reloadSession ignores cached-new and archived sessions. - Add server (PiSessionService + routes) and client (SessionController) tests covering reload success, the active-work guard, archived rejection, route forwarding, capability gating, and error mapping. - Restore alphabetical parser import ordering in clients.ts. - Add a changeset documenting the feature and the sessiond restart note. Note: touches a session daemon code path, so pi-web-sessiond.service must be restarted manually for the server side to take effect.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
"@jmfederico/pi-web": minor
|
||||
---
|
||||
|
||||
Add a **Reload** action to the session three-dot menu that re-reads the session from disk. The session daemon keeps an in-memory `SessionManager` per session and never re-reads the session file, so when the same session is also driven by another process (for example the `pi` CLI), new on-disk entries were invisible to the web UI and the tail of the conversation appeared truncated. Reloading closes the active session, re-opens it from disk, discards the cached transcript, and re-fetches the history.
|
||||
|
||||
Reload refuses to run while the session has work in progress and on archived (read-only) sessions, and is gated behind a new `sessions.reload` runtime capability so it only appears for machines whose Pi-Web runtime supports it.
|
||||
|
||||
Note: this changes a session daemon code path, so `pi-web-sessiond.service` must be restarted manually for the server side of this change to take effect.
|
||||
Reference in New Issue
Block a user