Skip to content

fix(desktop): session rename / delete / archive / search + usage - #812

Merged
agentforce314 merged 1 commit into
mainfrom
fix/desktop-qa-round4
Aug 8, 2026
Merged

fix(desktop): session rename / delete / archive / search + usage#812
agentforce314 merged 1 commit into
mainfrom
fix/desktop-qa-round4

Conversation

@agentforce314

Copy link
Copy Markdown
Owner

Desktop QA round 4: the sidebar's session-management operations had no clawcodex serve handlers, so rename/delete/archive/search all silently failed.

Added:

  • PATCH /api/sessions/{id} — rename (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; 58 desktop tests green.

🤖 Generated with Claude Code

…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
agentforce314 enabled auto-merge (squash) August 8, 2026 15:51
@agentforce314
agentforce314 merged commit 5ae2a8a into main Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant