fix(desktop): session rename / delete / archive / search + usage - #812
Merged
Conversation
…round 4)
Session management operations from the sidebar had no serve handlers:
- PATCH /api/sessions/{id} (rename via name/title, archive, pin) — patches
the saved-session file so the sidebar row updates immediately.
- DELETE /api/sessions/{id} — removes the saved session.
- GET /api/sessions/search?q= — substring search over title/preview/id.
- WS session.title (rename control + file sync) and session.usage
(get_context_usage).
All id-taking paths reuse the strict charset guard, so a traversal id is
refused (router 404 or ok:false), never a write outside the sessions dir.
Verified live: renaming a real session returns ok and the sidebar list
shows the new title; search finds it; archive persists the flag.
6 new pytest cases (rename/archive/delete roundtrip, search + literal-route
precedence, traversal refusal at both the route and helper layers); 58
desktop tests green.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
agentforce314
enabled auto-merge (squash)
August 8, 2026 15:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Desktop QA round 4: the sidebar's session-management operations had no
clawcodex servehandlers, so rename/delete/archive/search all silently failed.Added:
/api/sessions/{id}— rename (name/title), archive, pin; patches the saved-session file so the sidebar row updates immediately./api/sessions/{id}— removes the saved session./api/sessions/search?q=— substring search over title/preview/id.session.title(rename control + file sync) andsession.usage(get_context_usage).All id-taking paths reuse the strict charset guard, so a traversal id is refused (router 404 or
ok:false), never a write outside the sessions dir.Verified live
Renaming a real session returns ok and the sidebar list shows the new title; search finds it; archive persists the flag. 6 new pytest cases; 58 desktop tests green.
🤖 Generated with Claude Code