Repository navigation
feat(app): right-click a bot in the sidebar for its menu - #55
Merged
Merged
Conversation
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.
This was referenced Sep 30, 2026
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
A right-click on a bot in the sidebar opens that bot's menu where the pointer is, without opening the bot: Edit, Make crew chief / Stop being chief, Restart with a new conversation, Open folder and Archive bot. It is the menu of the header's "more" button, and both now come from one place, so they cannot diverge.
useBotActions(bot, crew)(features/bots/botActions.tsx) returns the menu's items and the dialogs they open (edit, the new-conversation confirmation, the archive confirmation).BotHeaderlost that code and uses the hook;Sidebaruses the same hook for each conversation.ContextMenu(ui/ContextMenu.tsx) reuses the rows ofMenu(MenuItems), opens at the pointer, stays inside the window, and closes on a pick, Escape, a click elsewhere, a scroll, a resize or when the window loses focus. It is drawn in the body, so the sidebar's scrolling list cannot clip it, and its dialogs are too, so they are not part of the navigation.Menugets the arrow keys too.Delete joins this menu in the PR that adds it to the app, after #54.
Tests
features/crews/botMenu.test.tsx(new), withFakeBotloft: the menu offers exactly what the header's menu offers and does not open the bot; it acts on the bot that was clicked while another one is open (open folder, chief, archive with its confirmation outside the navigation); a paused bot cannot restart; it opens from the keyboard, walks with the arrows and gives the focus back; a click elsewhere closes it and only one is open at a time.App.test.tsx,chief.test.tsx).pnpm checkpasses (195 tests).Checked in the preview (
pnpm dev, FakeBotloft, 125% size, Portuguese): the menu opens at the pointer, moves up when it would leave the window at the bottom, and its archive confirmation names the right bot.Nothing here depends on the real Claude Code. In the installed app, one thing to see by hand: a right-click on a conversation shows this menu and not the webview's own.