feat(web): delete a session from the sidebar
A session could be created from the sidebar but never removed, so the chat surface accumulated every experiment anyone ever named. Each row now carries a small delete affordance that only names the key: the confirmation is the shell's, and it says the turn history goes with the session before calling the new route. On confirm the chat moves to the first remaining session — the stream's watcher follows the key — so nothing keeps streaming a session that no longer exists. The row had to stop being a single button, since a nested button is invalid HTML: the select button and the delete button now sit in a container that owns the hover and active surface.
This commit is contained in:
1 parent
8db1e2aa11
commit
994df09c8f
5 files changed
+160
-22
No files matched your search
@@ -122,6 +122,14 @@ Two consequences worth knowing before changing this code:
|
||||
lets 400/409 land in the error banner. The phone client's status
|
||||
keys (`phone:…`) stay out of the inventory; the full list stays on
|
||||
the wire.
|
||||
- **Deleting a session is a decision, not a click.** The row's delete
|
||||
button only names the key; the shell's dialog spells out that the
|
||||
turn history goes with it, and `DELETE /v1/sessions/{key}` runs on
|
||||
confirm — so a key created again under the same name starts empty.
|
||||
A 409 (a turn holds the key) and a 404 (already gone) land in the
|
||||
error banner like every other refusal, and the chat moves to the
|
||||
first remaining session, the stream's watcher following the key so
|
||||
nothing keeps streaming a session that no longer exists.
|
||||
|
||||
## Layout
|
||||
|
||||
|
||||
Reference in new issue
Block a user