Skip to content

feat(app): delete a bot or a crew from its menu - #56

Merged
httpsphl merged 7 commits into
mainfrom
feat/delete-in-app
Sep 30, 2026
Merged

httpsphl merged 7 commits into
mainfrom
feat/delete-in-app

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

Stacked on #54 (the daemon's bots.delete and crews.delete) and #55 (the bot's menu in one place, and the right-click menu). Merge those two first, with merge commits; this PR's diff then shrinks to its own commit, feat(app): delete a bot or a crew from its menu.

What

Delete in the app, for bots and crews.

  • Bot: "Delete bot" is the last action of the bot's menu, in red, after Archive. It is in the header's menu and in the sidebar's right-click menu at once, since both come from useBotActions.
  • Crew: "Delete crew" is the last action of the crew's menu.
  • The confirmation names the bot or crew in its title and says plainly what goes and what stays:
    • Delete Scout? "Scout stops now and leaves Botloft for good, with its conversation, its routines and the tasks it was part of. This can't be undone." If Scout is the chief: "Ops will be left without a chief."
    • In a box of its own: "Scout's folder stays on your computer, with everything in it:" and the path, which can be selected and copied.
    • Delete Ops? "Ops and its 3 bots stop now and leave Botloft for good, with their conversations, routines and tasks. This can't be undone." and "The folders stay on your computer, with everything in them: each bot's own folder and the crew's work folder:" with the work folder's path.
  • Confirmed, the bot or crew leaves the screen without waiting for the daemon's notification. A failure shows a notice and changes nothing.
  • A message from a bot that left now reads as from "a bot no longer in the crew" in the chat and in the timeline. It said "an archived bot", which is not true of a deleted one, and the app cannot tell the two apart there.
  • Texts in English, Portuguese and Spanish. Spec 5, 7.6 and 15.1.

Tests

  • features/bots/delete.test.tsx (new), with FakeBotloft: the bot's confirmation and what it says, the bot gone from the sidebar and the crew page back; cancel; from the right-click menu on a bot that is not open; the chief warning; a failed delete keeps the bot and says so; the sender label in the timeline; the crew's confirmation for 0, 1 and more bots, the crew gone with its bots while another crew stays; the last crew deleted goes back to the welcome screen.
  • features/crews/botMenu.test.tsx: the right-click menu and the header's menu still offer the same list, now with Delete.
  • pnpm check passes (206 tests). Rust is unchanged from feat: delete bots and crews (daemon and protocol) #54.

Checked in the preview (pnpm dev, FakeBotloft, Portuguese): Delete in the right-click menu and in the crew's menu, the bot's confirmation, the bot leaving the sidebar, and its message in another bot's chat reading "Um bot que não está mais na equipe".

Still to see with real Claude Code

With the dev daemon (BOTLOFT_HOME) and a real bot:

  • Delete a bot that is in the middle of a turn: it leaves the app at once, claude.exe is gone from Task Manager and does not come back, and its folder is where the confirmation said.
  • Delete a crew with two running bots: both processes end, and the crew's folders are still in %USERPROFILE%\Botloft\<crew>.

Archiving keeps the rows. Deleting removes the bot with its chat, approvals, the messages it received, its routines, browser sites and tasks, in one transaction; what it sent to other bots stays without a sender.
The methods, the bot.deleted and crew.deleted notifications, the fake daemon and the app store, which drops a deleted bot with its routines, tasks and deliveries.
bots.delete and crews.delete work on active and archived items (spec 7.6). The process is killed at once and the supervisor forgets the bot; the database loses the bot and what was its own; folders stay on disk (spec 5). Other bots are told about the unfinished tasks a deleted bot leaves, and a message of its that still waited arrives as from a deleted bot.

The spec row that said archiving deletes the workspace was never true and now says what happens.
useBotActions holds the items of the bot's menu and the dialogs they open, so another menu can offer exactly the same.
The menu opens at the pointer (or from the keyboard's menu key), without opening the bot, with the same actions as the header's menu. ContextMenu reuses the rows of Menu, stays inside the window and walks with the arrow keys; Menu gets the arrow keys too.
Delete is the last action of the bot's menu (header and right-click) and of the crew's menu. The confirmation names the bot or crew and says what goes (the conversation, routines and tasks, for good) and what stays (the folder, with its path). A message from a bot that left, archived or deleted, reads as from a bot no longer in the crew.
@httpsphl
httpsphl merged commit d11497f into main Sep 30, 2026
5 of 6 checks passed
@httpsphl httpsphl mentioned this pull request Sep 30, 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