feat: session delete + touch-friendly message controls
Session delete:
- DELETE /sessions/{session_id} endpoint (chat.py + session_store.py)
- × button on each session item in the panel (hover-reveal on desktop)
- Clears UI if the active session is deleted
Touch accessibility:
- @media (hover: none) rule makes msg-actions always visible on touch devices
- msg-act-btn tap targets enlarged to 36px min-height, readable font size
- session-delete-btn also always visible and finger-sized on touch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,15 @@ def save(session_id: str, messages: list[dict]) -> None:
|
||||
}, indent=2))
|
||||
|
||||
|
||||
def delete(session_id: str) -> bool:
|
||||
"""Delete a session file. Returns True if it existed and was deleted."""
|
||||
path = _path(session_id)
|
||||
if not path.exists():
|
||||
return False
|
||||
path.unlink()
|
||||
return True
|
||||
|
||||
|
||||
def list_all() -> list[dict]:
|
||||
d = settings.sessions_path()
|
||||
if not d.exists():
|
||||
|
||||
Reference in New Issue
Block a user