Skip to content

feat(app): an effort slider and the conversation's space below the chat - #64

Merged
httpsphl merged 18 commits into
mainfrom
feat/effort-context-app
Sep 30, 2026
Merged

httpsphl merged 18 commits into
mainfrom
feat/effort-context-app

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

The app half of effort and context per bot, on top of #63 (merge #63 first, with a merge commit; until then this PR also shows its commit).

What the owner sees

Below the chat, between the keys hint and the model:

  • Effort. A button with the level in use ("Medium") opens a slider with five stops, from "Faster" to "Smarter". The stop the bot's model uses by itself is marked "Recommended". Under it, the level's name and a line about what it means for the bot, by the bot's name. Off the recommended stop, "Use recommended" goes back.
  • Conversation space. A ring that fills with the part of the window in use. It opens "556k / 1M (56%)", a bar with the mark where the conversation compacts by itself, how much is left until then, and Compact now.
  • In the chat, a compaction reads as a notice in the owner's language: asked for, done by itself because the conversation was full, or why it could not be done.

Details

  • The words follow the slider at once, but the bot is only told when the slider rests on a stop for 400 ms or the menu closes, so it does not restart on every step.
  • Resting on the recommended stop saves default, so the bot keeps following its model's own level after a model change.
  • Until Claude Code said the model's level, nothing is marked and the button says "Effort". On a model without levels (Haiku) the menu says so and has no slider.
  • With the bot busy, the line above the composer says the change, or the compaction, happens when it finishes. With the bot stopped, "Compact now" is off and says why.
  • The ring turns to the warning color from 80% of the way to compacting by itself, and is not shown while the size is not known.
  • In a narrow chat the controls on the right (space, effort, model, send) move to a line of their own, the effort shows only its icon and the model's name is cut. Before, the model already ran out of the box there.
  • The store follows bot.context. FakeBotloft leaves compaction notices out of the conversation-list line, like the daemon.
  • Texts in en, pt-BR and es. Spec 15.1.

Tests

pnpm check passes (203 tests). New: effort.test.tsx and context.test.tsx, on FakeBotloft.

Seen in the browser preview (dark and light, wide and narrow), and with ?live against a dev daemon running the real Claude Code 2.1.284:

Still to see

  • The slider and the ring inside the desktop app's WebView2 (pnpm tauri dev): the slider's look uses ::-webkit-slider-thumb, which the preview's Chromium and WebView2 share, but it was only seen in the preview.
  • Dragging the slider with a real mouse: in the preview it was moved by clicking a stop.
  • A long conversation near the limit with the real Claude Code (the warning color and "full enough to compact by itself" were seen with seeded numbers only).

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.
…or good

With the shell's IFileOperation on a thread of its own (it needs a single-threaded apartment). A progress sink aborts any item the shell would destroy instead of recycling, so what the bin cannot take stays where it is. The tests use the real Recycle Bin, check the folder is in it and take it out again.
…n when asked

bots.delete and crews.delete take recycleFolder. The method answers at once; the folder moves afterwards, off the server's workers, tried again while the process that was just killed still holds its files, and folder.recycled tells the apps how it ended. Only a folder under the workspaces goes, and never one that holds a work folder the owner chose.
… Recycle Bin

Unchecked by default: the folder stays. Checked, the confirmation says the folder goes to the Recycle Bin, where it can still be got back, and a notice tells the owner if it could not go.
The bin records the long path, and the temporary folder of the CI runner comes in the short one (RUNNER~1), so the tests did not find the folder they had just moved.
Claude Code's Bash and PowerShell tools take an optional `description`
next to `command`, written by the model, and it reaches the permission
tool unchanged (checked with 2.1.284, spec 19). The daemon now passes it
along as `explanation` on the tool and approval chat items, so the app
can put plain words before the command. `summary` is the command itself
again, as the spec says.

The bot writes the explanation, so it never replaces the command: a
command's input is kept up to 32 KB instead of 4 KB, for the owner to
read all of what they allow, and Claude Code still gets back the input
it asked about.

The generated rules ask each bot to describe every command for an owner
who may not be technical, in the language the owner writes in. Without
the rule the text was terse and, on Sonnet, in English. The field stays
optional: real Sonnet bots were seen leaving it out.
The card for a request to run a command used to show the raw command,
which an owner who does not read commands allowed without knowing what
it did. It now shows what the bot says the command is for as its main
text, says the bot wrote it and that what runs is the command, and keeps
the whole command behind "See the command". With no explanation the card
says so and opens the command.

The tool line above the card shows the same words, and opens to the
command itself instead of its JSON. Other tools keep their summary, with
the input under "Details".

The preview's seed has a long heredoc command with an explanation and a
plain one without.
…onversation

Spec 7.4, 8.6, 9.2, 11.2, 11.3, 12 and the findings in section 19.
bots.setEffort restarts the bot with --effort when nothing is in progress;
the daemon asks Claude Code what the session applies and how full the
conversation is (control requests on stdin), follows each model request,
and bots.compact writes /compact. The fake daemon of the app knows the
new fields and methods; the UI comes next.
Spec 15.1. Next to the model, a slider from faster to smarter sets the
bot's effort, with the level its model uses by itself marked as the
recommended one; a model without levels says so. A ring shows how full
the conversation is, how far it is from compacting by itself, and
compacts it now. Compactions read as notices in the owner's language.
In a narrow chat the controls on the right move to their own line.
Brings in main (#52, #53, #54, #55, #59, #62, #67) and feat/delete-recycle (#56, #58, #60), so this PR merges in any order with them.

- app/src/lib/fakeBots.ts, crates/botloftd/src/state.rs, docs/spec.md: both sides kept (bot.context next to bot.deleted, crew.deleted and folder.recycled; the context store next to the trash).
- crates/botloftd/src/supervisor/spawn.rs: both sides kept, without recording the session at launch (#67 records it from the first turn).
- tests/bot_effort.rs and tests/compaction.rs: the bot has a turn before its conversation is resumed, as #67 described.
…mmand-explanation

Brings in feat/bot-effort-context (#63) with main and the delete stack, so this PR merges in any order with them.

- crates/botloft-core/src/chat.rs: a command's line in the list shows the bot's explanation, and a compaction notice still leaves the list alone.
- docs/spec.md: both sides kept (settings.json and rules\botloft.md in the bot's folder, the fields of Bot, the date of the section 19 check).
- crates/botloft-store/src/delete/tests.rs: the approval item the delete tests build has the new explanation field.
Brings in feat/command-explanation (#61), which carries feat/bot-effort-context (#63), main and the delete stack with their conflicts resolved, so this PR merges in any order with them. No conflict of its own.
@httpsphl
httpsphl enabled auto-merge September 30, 2026 17:23
@httpsphl
httpsphl merged commit 1eb401d into main Sep 30, 2026
3 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