Repository navigation
feat: archived bots and crews in Settings, each with Delete - #58
Merged
Merged
Conversation
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.
The other lists leave archived crews and bots out, so nothing showed them. archive.list returns both, the latest archived first, for the app to list and delete.
Settings gets an Archived part: the crews and the bots the owner archived, which the rest of the app does not show, with the same delete confirmation as the menus. The confirmation is now a component of its own (DeleteBot, DeleteCrew) and says "leaves" instead of "stops now" for what was already stopped.
Merged
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.
What
Archived bots and crews were shown nowhere in the app, so what was archived before Delete existed could not be deleted. Settings gets an Archived part that lists them, each with Delete.
archive.listanswers{crews, bots}: what is archived, whichcrews.listandbots.listleave out, the latest archived first.botshas every archived bot, those of archived crews too, so the app can count them.DeleteBotandDeleteCrew, used by the menus and by this list.Not here: restoring something archived. There is no such method in the daemon, and it was not asked for; the spec says so.
Tests
crates/botloftd/tests/archive.rs: the archive is empty, then has an archived bot and an archived crew with its bot, with their folders, and is empty again after both are deleted; active bots are untouched.features/account/archived.test.tsx, withFakeBotloft: the list and its lines; deleting an archived bot (wording, folder, row gone); deleting an archived crew with its bot, then "Nothing is archived."; the empty list; a list that cannot be read.cargo fmt,clippy -D warnings, the daemon's tests andpnpm check(210 tests) pass.Checked in the preview (
pnpm dev, FakeBotloft, Portuguese): a bot archived from the right-click menu shows up in Configurações > Arquivados.Nothing here depends on the real Claude Code.