Repository navigation
chat: a chat can be deleted from its row's menu - #8
Merged
Merged
Conversation
A chat row's right-click menu has Open and Delete, as a file row's does. Delete works as the file tree's: at once and for good, with no question first. Its tab closes first, which ends its client's session (an agent's process with it) and saves it a last time; then its transcript and its images folder go. A tab that will not close (something holds it, `sdk.Claim`) keeps its chat. The delete runs as the next frame begins, not inside the sidebar's draw. `chat.delete` does the same for a chat in the list, by path (empty: the chat in front); it refuses any path the list does not hold.
foxnne
marked this pull request as ready for review
October 16, 2026 14:44
foxnne
added this pull request to stack #12
October 16, 2026 14:53
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.
Stacked on #7 (then #6, #5).
What changes
A chat row in the Chats sidebar now has a right-click menu, drawn as a file row's is
(
core.widgets.context+contextMenu+menuRow): Open and, below a separator,Delete.
Delete does what the workbench file tree's Delete does, which I read in
files.zig(rowMenu)and fizzy's files service (
FilesService.delete): at once, for good, no confirmation, andwhatever was open on it closes. For a chat:
Host.closeDocById). That runs the chat'snormal close: its client is told (
chat_closed; the agent client ends the session and itsagent process) and the transcript is saved a last time. If the tab does not close (something
holds the document,
sdk.Claim), the chat stays and a warning is logged, so nothing isdeleted out from under a working tab.
.chattranscript and its<name>.imagesfolder are deleted, and the list readsthe folder again.
The delete is queued and runs from the plugin's
beginFrame, never in the middle of thesidebar's draw (which may be the frame that is drawing the tab).
chat.delete(internal,.{ .path = "…" }, empty for the chat in front) does the same. It onlydeletes a path the list holds, so it cannot be pointed at other files. It is how the change was
driven from a demo tape (below), and it is the seam for a palette or keyboard delete later.
What I did not add, and why:
menu), so this matches it.
chat.deleteis what a key binding would call.chat,trash) because the chat plugin does not dependon the
iconspackage the workbench draws lucide'strash-2from.Chat.imagesDirbecame a free function of the transcript's path so the list can find a closedchat's images.
How it was seen
macOS, Debug fizzy from
main, sandbox profile, seededagentchats (one with an.imagesfolder), driven by demo tapes:
file tree's (captured).
chat.deleteon the chat open in a tab, then on a closed one with images, then onsettings.zon: the tab closed, both rows left the tree, both.chatfiles and the.imagesfolder were gone from disk, and the third call was refused ("no chat … is in thelist"),
settings.zonuntouched.sleep 600, a chat made by the folder's + startedits agent (a
sleepchild of fizzy, seen withpgrep -P), andchat.deleteon it closed thetab, removed the row and the file, and the child process was gone 4s later. No warnings in the
log.
A demo tape could not click the menu's Delete row: in fizzy's tape player any op after a right
click closes the context menu, and the workbench file tree's menu does the same, so the menu row
was checked by capture and code, and the delete itself through
chat.delete, which runs thesame function.
zig fmt --checkandzig build testclean.🤖 Generated with Claude Code