Skip to content

Pick each bot's permission mode in its chat - #17

Merged
httpsphl merged 5 commits into
mainfrom
feat/permission-modes
Sep 29, 2026
Merged

httpsphl merged 5 commits into
mainfrom
feat/permission-modes

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

Each bot gets a permission mode, picked below its chat like Claude Code's mode picker. Stacked on #16; once that merges with a merge commit, this diff shrinks to its own commit.

What changes

  • Mode picker in the composer, next to the attach button: Auto, Manual, Accept edits and Plan, each described by what the bot does, with the bot's name ("Scout decides what needs your OK"). Bots start in Manual, as before.
  • Bypass permissions sits apart, behind a confirmation that says plainly the bot is then not held to its folder: on native Windows there is no sandbox, and deny rules only cover Claude Code's file tools and a few shell commands. A bot in this mode is marked in red in the picker and in its header ("Asks nothing").
  • Restart without losing the turn. Claude Code reads --permission-mode only at start, so a new mode restarts the process with --resume once nothing is in progress: at once when idle, or when the running turn and its approvals end. The composer says so while the bot is busy.
  • Plans. A bot in plan mode asks to go ahead with ExitPlanMode. The chat shows the whole plan (its input is kept up to 32 KB) with Approve plan and Keep planning, which sends back what should change. When an approved plan moves the bot out of plan mode, the system/init of the next turn says so and the stored mode follows.
  • Storage: migration 0004 (bots.permission_mode); protocol: bots.setPermissionMode and Bot.permissionMode.

Spec: 7.4, 10.1, 11.2, 12, 13 (what bypassing means on Windows), 15.1, 15.3 and section 19.

Tested

  • cargo fmt, clippy -D warnings, cargo test (new permission_modes tests with FakeRuntime: the flag at start, restarting idle and busy bots, leaving plan mode, an old process not undoing the owner's choice) and pnpm check (mode picker, bypass confirmation, busy note, plan approve and keep planning).
  • Browser preview in both themes.
  • Seen with Claude Code 2.1.284: every turn's system/init carries permissionMode.

Manual test with the real Claude Code

  1. Put a bot in Plan, ask for a change, and check that the plan arrives as a card through the approval tool in -p, and which mode the bot is in after approving (spec 19, "ExitPlanMode em -p").
  2. Pick Auto on an account or model without it, and see what --permission-mode auto does (spec 19, "Modos de permissão em -p").

A bot's avatar is now just the mascot in its color, with a thin edge
(dark on the light theme, light on the dark one) so light colors such as
the palette's beige keep their shape. Botloft's own white mascot, in the
title bar and on the daemon's messages, keeps the black square of the
app icon: without it, it would vanish on the light theme.
The whole window is now drawn at 125% (the webview's zoom), so text,
spacing, icons and avatars grow together; at 100% the app looked tiny on
a monitor without Windows scaling. A Size menu in the title bar picks
100%, 110%, 125% or 150%, Ctrl+= and Ctrl+- step through them and Ctrl+0
goes back to the default. The choice is remembered and applied before
the first paint, so the window never flashes small.
Like the account corner of a chat app: the owner's name (the Windows
account's display name), their Claude plan and a menu with Usage,
Settings, Language, What's new and Help. Usage shows each window of the
plan the bots have used and when it resets; Settings holds the theme,
size and language, and the versions. Theme, size and language leave the
title bar, which keeps only the language on the setup screens that have
no sidebar. The sidebar now shows from the welcome screen on.

The daemon reads the owner's display name once (GetUserNameExW) and the
email, plan and organization from `claude auth status`, and sends them
in `system.status.account`.
Buttons, fields and menu rows get 8 px corners, cards and menus 12 px,
the chat's bubbles, cards and dialogs 16 px. Menus and dialogs float on
a light themed shadow. The chat is a centered column with the day as a
pill, and the open conversation in the sidebar is an inset rounded
block instead of a full-width bar. Menus share one popover look and one
hook that closes them.
Like Claude Code's mode picker, below the chat: Auto, Manual, Accept
edits and Plan, each described by what the bot does ("Scout decides
what needs your OK"), and Bypass permissions behind a confirmation that
says the bot is then not held to its folder. A bot that asks nothing is
marked in red in the picker and its header.

The daemon stores the mode (migration 0004) and starts the bot with it.
Claude Code reads --permission-mode only at start, so a new mode
restarts the process with --resume once nothing is in progress, and
never cuts a turn short. When an approved plan moves the bot out of plan
mode, the system/init of the next turn says so and the stored mode
follows.

A bot in plan mode asks to go ahead with ExitPlanMode: the chat shows
the whole plan (kept up to 32 KB) with Approve plan and Keep planning,
which sends back what should change.

Spec: 7.4, 10.1, 11.2, 12, 13 (what bypassing means on Windows), 15.1,
15.3 and two rows in section 19 to check with the real Claude Code.
@httpsphl
httpsphl changed the base branch from feat/look to main September 29, 2026 04:25
@httpsphl
httpsphl enabled auto-merge September 29, 2026 04:25
@httpsphl
httpsphl merged commit 6a8340d into main Sep 29, 2026
3 checks passed
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