Skip to content

Agent: set the model's effort on a slider in the model chip - #1520

Merged
AnthonyRonning merged 28 commits into
masterfrom
ux/effort-slider
Nov 11, 2026
Merged

AnthonyRonning merged 28 commits into
masterfrom
ux/effort-slider

Conversation

@matthewrball

@matthewrball matthewrball commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Current review stack

Standalone on master; not part of a stack.

The effort slider in the model chip's panel. #1540 is stacked on this branch and adds the catalog's model groups.

Review changes from @AnthonyRonning's comment, as three commits on top of a merge of master ab27a666 (no commits were rewritten):

  • Flat model list. The app's group table, Popular list and badge are gone, with their strings and badge colors, since the unused-strings test has no exemption. Agent: list models in the catalog's groups #1540 adds the sections back from the catalog and needs to re-add those.
  • Catalog default effort. A new task, a model switch and Reset all go to the model's reasoning.default_effort; Medium (or the nearest accepted level) applies only when the catalog gives none. A paired computer on an older build doesn't send the default, so Reset is hidden there.
  • One remembered pair. Only the model and effort picked on New Task are remembered. A pick inside an existing task, and opening a task, change neither.
  • Quieter slider. Track 36 → 24 px, thumb 40 → 27 px, softer glow, bloom and top-level halo.

Local tests on this head: app suite 1,400 passed, 0 failed, 3 ignored; the runtime library's thinking, new-task, switch and config tests pass. Overlaps #1516 in composer.rs (4 hunks); whichever lands second gets an update from me. The screenshots and recording below predate these changes: they show the grouped list and the larger slider.

Current head: 98ed2861.

The original scope and validation are retained below.


Moved from #1511 so the branch lives in this repo. Same commits, plus a merge of master; earlier discussion is on #1511.

The model list's grouping is served by the catalog (#1538) and rendered by #1540; it is not part of this PR.

What changes

The composer's model chip and the separate brain (thinking) button become one control. The chip names the model and, in a quieter grey, its effort: "Kimi K3 High". Pressing it opens the model list with the selected model's effort slider docked under it:

  • Models first. The models a task can use, the selected one checked. A pick switches the model and closes the panel, as the plain list did, so changing models still takes two clicks. /model opens the same panel. Design review pointed out that Maple's users switch models more often than effort, unlike apps built around one frontier model, so the model leads and effort sits under it.
  • Effort. Under the models: the level, tinted by how hard the model thinks, over a thick track with one dot per level the selected model offers. Drag the thumb, click a stop, or use Left and Right; Up and Down move through the models and Enter picks one. The level under the thumb previews while you drag, and the pick saves on release.
  • Reset. ↺ returns to the level the catalog recommends for the model (reasoning.default_effort). It rests, dimmed, while that is the level. Every stop is the same plain dot.
  • No slider when there is nothing to slide. A model that does not think, levels still loading, or levels that failed to load show a status line where the track would be. When they failed, a Retry row above it reloads them; it's a row so the keyboard reaches it, and the panel stays open.
  • Long lists. Past 480 px the models scroll and the effort footer stays in view.

Adapting to each model's levels

Models offer different sets of levels: GLM 5.3, GLM-5.3 Flash and both Kimis offer Low / High / Max, DeepSeek V4.1 Flash offers Off / Low / High / Extra high / Max, and Gemma 4 offers Off through High. The slider spreads whatever the model offers evenly across the track, so it never shows a stop the model rejects. Each level also has a heat on one scale shared by every model, from Off to Max, and that heat drives the fill, its glow and the header colour. High is the same colour on every model even when it sits at a different stop. "Faster" and "Deeper" under the ends say which way is which.

Motion

The slider is built from a few springs, so it feels liquid:

  • Thumb. It follows the pointer through a stiff spring, so a drag is direct but smooth. It's drawn into each stop it passes, like a soft notch, and settles with a jelly overshoot on release. It stretches along its motion and squashes across it, lifts under the pointer, and glows in the level's colour while held. Off has no colour, so the thumb doesn't glow there, and the glow fades as it nears Off. The cursor is an open hand over the thumb and a closed hand while dragging.
  • Fill. Its edge is a spring close to critical damping, chasing the thumb. On a quick move right, a neck of fill thins between them. The fill never passes the thumb, so no orange shows beyond the white, whether sliding back or while the thumb settles in. Colour flows between the stops' heats instead of stepping.
  • Feedback. Dots swell as the fill flows over them. A drag ripples each stop it crosses and blooms once where it lets go; a click or reset ripples and blooms at the stop it picks. A key step only moves the thumb: no ripple, bloom, pulse, morph or spark. Hovering a stop shows a faint halo where a click would land.
  • Entrances. The panel fades in and the thumb settles from slightly large without a bounce, the fill already in place, since the panel opens on every model switch. The next opening glides the old dots to the new model's stops. When levels arrive or fail, the slider or the status line fades in, and the status line holds the slider's height so the panel doesn't jump.
  • Top level. When the thumb arrives at the model's top level (Max, or High on Gemma 4), the brain sparks: a warm flash behind it and a burst of rays. While the level stays at the top, the thumb keeps a warm halo and the chip's effort word turns from grey to the level's colour; the halo fades out, quicker than it came, when the thumb leaves. Opening the panel already at the top, or switching models onto it, shows the halo without the spark. Reduced motion and key steps keep the halo and the colour and skip the spark.

Changes of state morph instead of swapping, after torph:

  • A new MorphText element: letters both values share glide to their new places, leaving letters fade out, arriving ones rise in, and width and colour ease (400 ms, exponential ease-out).
  • It's used for the panel's level name and the chip's effort. "High" becomes "Extra high" by keeping its "igh", and the chip's width eases with it. During a drag or a key step the panel's name swaps at once, and it morphs on a click or reset.
  • The brain pulses once for a pick by pointer or reset, never for a key step, and doesn't replay when the panel reopens. Reset spins back one turn as it acts, once.

Everything asks for frames only while it moves; at rest the panel is idle. Reduced motion skips the springs and effects and jumps.

Saving

Picks stay optimistic, as before. A pick made while another is saving now waits instead of being dropped, and only the latest one goes out, for the task and model it was made on even if you switch away first. Sweeping the slider across stops saves at most one more time. The chip shows a waiting pick at once, as the panel does. When a save fails while a newer pick for the same model waits, only the newer one's result is reported. An effort pick keeps the panel open; a model pick closes it.

Implementation

  • ui/effort_slider.rs: the slider as a painted gpui element. Thumb, fill edge, lift and entrance are springs; notches, ripples, dot swells, bloom and the stop morph are timed effects. Its state is held by its owner, so a model switch still glides when the panel reopens.
  • ui/morph_text.rs: MorphText, a text element that morphs between values (a longest-common-subsequence match on letters, then glide, fade and rise).
  • ui/chat/effort.rs: the panel's effort footer and level heat. The recommended level comes from the runtime, which reads the catalog's default_effort.
  • ui/chat/composer.rs: model_menu docks the effort footer under the model rows and steps effort on Left and Right.
  • ui/popup.rs: Menu::on_adjust, so Left and Right step a control inside a menu where they would otherwise enter or leave a submenu; Menu::footer, content docked under the rows that stays in view while they scroll (the keyboard skips it); and MenuItem::keep_open, for a row like Retry whose result shows in the menu.
  • ui/chat/thinking.rs: thinking_menu is removed. pick_thinking no longer closes the popup. A pick made during a save waits behind it and goes out for its own task and model (save_thinking), and the save's result is handled in thinking_saved.
  • ChatPopup::Thinking and ComposerControl::Thinking are removed; ChatPopup::Model is the panel. Application Vim's row loses one stop.
  • New strings in English and Spanish: chat-effort, chat-effort-reset, chat-effort-faster, chat-effort-deeper, chat-model-effort-chip (the chip's accessible name, "Kimi K3, High effort"). Spanish revisions are recorded. New icons: rotate-ccw (Lucide) and effort-burst, the brain's ring of rays.
  • Chip row: the effort makes the chip wider than the old brain button. When the row runs out of room the chips wrap onto a second line beside Send, which with the context ring never shrinks. A chip only gives way when it is alone on its line, the model's name first, so the effort stays readable. On master a window about 760 px wide pushes Send out of the composer; a single shrinking row instead drew the effort word over Integrations.

Testing

  • cargo test -p maple-agent-app --bin maple-agent: 1361 passed, 3 ignored. Clippy is clean apart from two lint groups that already fail on master with the local toolchain (unexpected_cfgs in the macOS objc files, nonminimal_bool in five untouched files).

  • New tests:

    • Left and Right step through the selected model's own levels and stop at the ends, while Up, Down and Enter pick a model and close the panel.
    • The same point on the track is High on a Low / High / Max model and Low on an Off / Low / High / Extra high / Max model. A drag previews the level and its release picks it.
    • Reset goes to the recommended level and is inert at it.
    • The panel lists the models above the slider; a pick closes it, and /model opens the same panel.
    • A model that does not think shows no slider.
    • The recommended level is the catalog's default_effort; New Task remembers one model and level, and a pick inside a task leaves it.
    • The slider's spring settles with a small overshoot, and reduced motion jumps.
    • The top level's spark waits for the thumb to reach the end, plays once per arrival, and not for an opening already at the top; reduced motion shows the halo without it.
    • In a 760 px window the chips wrap: the model chip keeps its full size, no chip overlaps another, and none reaches under Send. The chat test fixture now follows the window's size so a test can narrow it.
    • A pick waiting behind a save still goes out for the model it was made on after another model is selected, and the failed save it replaces raises no notice.
    • Levels that failed to load offer Retry as a row the keyboard reaches; it keeps the panel open and loads them again.
  • The updated chip and application Vim tests cover the merged control. The composer-menu float test now lays the chat out in a column, as the app does: the taller panel needs the room above the composer that the app gives it.

  • Rendered in both themes with real fonts through gpui's headless Metal renderer, using the catalog's real model names and level sets (images below).

  • Live catalog. In a signed-in debug build (the local PR stack with this branch merged, before the top-level spark and the models-first panel), each model's levels came from the runtime: DeepSeek Uncensored and DeepSeek V4.1 Flash showed five stops, GLM 5.3 three, and Gemma 4 five (Off through High). To run this branch alone in its own profile, sign in once:

    cd apps/maple-agent && just build
    XDG_DATA_HOME="$HOME/Library/Caches/maple-effort/data" \
    XDG_CONFIG_HOME="$HOME/Library/Caches/maple-effort/config" \
    MAPLE_DISABLE_UPDATE_CHECK=1 ./target/debug/maple-agent

    The separate data root gives it its own store, sign-in and host, so it runs beside an installed or debug Maple Work.

Screenshots

Headless renders of this branch in a 900 px window, using the catalog's real model names and level sets.

Motion, recorded frame by frame at about 30 fps, so timing is approximate, before the models were grouped and before the motion fixes above. In order: the panel opens on DeepSeek's models and slider, a drag to Maximum (the brain sparks, the chip's effort turns coral) and down to Low, a one-click switch to GLM 5.3 that closes the panel, reopening on GLM's three stops, and the same to Gemma 4.

The model panel in motion: opening, effort drags, and one-click model switches

Stills, from the head of this branch:

Grouped, DeepSeek V4.1 Flash at High Grouped, light theme
The model panel with Most capable, Uncensored (Popular) and Fast and cheap groups above DeepSeek's slider The grouped model panel in the light theme, with the Popular badge in deep coral on a soft coral pill
GLM 5.3 at Maximum: three stops, warm halo, coral effort Light theme, Gemma 4 at Medium
The model panel on GLM 5.3 at Maximum, three stops The model panel on Gemma 4 at Medium in the light theme

Not in this PR

  • Gemma 4's slider shows Off / Minimal / Low / Medium / High, but Gemma only has a thinking switch: every level above Off means "on" on the server. That comes from the runtime's levels for models without effort tiers (Model::thinking_levels). Collapsing it to Off / On is a runtime change and belongs in its own PR.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The model chip and the separate thinking button become one control. The
chip names the model and, in a quieter grey, its effort ("Kimi K3 High"),
and pressing it opens an effort popover:

- The level in large type, tinted by how hard the model thinks, over the
  model's name. The name opens the model list, and a pick there returns
  to the popover on the new model's levels. Enter does the same from the
  keyboard. `/model` still opens the list on its own.
- A thick stepped slider with one stop per level the selected model
  offers: Low / High / Max on GLM and Kimi, Off through Max on DeepSeek,
  and so on. Drag it, click a stop, or press Left and Right. The level
  under the thumb previews while dragging and saves on release.
- Reset returns to the level the runtime uses when nobody picked one
  (Medium, or the nearest level the model accepts). That stop is drawn
  as a ring.
- A model that does not think, and levels that are loading, saving or
  unavailable (with Retry), show a status line in the slider's place.

Each level has a heat on one scale shared by every model. Heat drives
the fill, its glow and the label, so High is the same colour wherever
its stop sits. The thumb springs to its stop with a small overshoot,
lifts while held, and the dots glide to new stops after a model switch.
Frames are drawn only while something moves, and reduced motion jumps
instead of animating.

A pick made while another is saving now waits for it, and only the
latest waiting pick goes out. The popover stays open after a pick.

The level makes the chip wider than the old button. Send and the
context ring no longer shrink; when the row runs out of room, the
model's name truncates first and the level stays readable.

Menus get two hooks for content that is not rows: on_adjust, which Left
and Right call, and on_confirm, which Enter and Space call with no row
highlighted.
The reset is an icon button while it can act and a plain dimmed icon at the recommended level. Both arms now return an element of one type, so the popover still builds once icon buttons carry their own hover animation (#1509).
…state

Slider, as a few springs:

- The thumb follows the pointer through a stiff spring, so a drag is
  direct but smooth. It is drawn into each stop it passes as a soft notch,
  and on release it settles with a jelly overshoot. It stretches along
  its motion and squashes across it.
- The fill's edge is a softer spring chasing the thumb. When the thumb
  runs ahead, a neck of fill thins between them. When it runs back, the
  fill drains after it with a droplet at the tip.
- Dots swell as the fill flows over them. A ripple spreads from each stop
  a drag crosses and from each level that lands, and the thumb blooms in
  the level's colour.
- Colour flows between the stops' heats instead of stepping.
- Opening the popover, the content rises in, the thumb pops and the fill
  pours to it.
- The hand cursor opens over the thumb and closes while it is held.

Text and state, after torph's TextMorph: a new MorphText element. Letters
two values share glide to their new places, leaving letters fade out,
arriving ones rise in, and width and colour ease between them. The
popover's level name and the chip's effort use it, so "High" becomes
"Extra high" by keeping its "igh". The brain gives a small pulse as a
level lands, and reset spins back as it acts.

Everything asks for frames only while it moves, and reduced motion jumps
instead.
The fill's edge still trails a thumb that runs ahead, but it no longer
passes it. A thumb running back takes the edge with it, so the draining
tail and its droplet are gone. The edge's spring is now close to critical
damping (stiffness 220, damping ratio 0.9), so it doesn't slosh past the thumb on
the opening pour or when the thumb settles. The fill's rounded end stays
under the thumb, and the thumb's squash stops at the track's height. On
open the thumb now settles in from slightly large (112%) instead of
popping up from small, so it covers the track from the first frame.

Changes of state:

- The popover's level name swaps at once while a drag crosses stops, and
  morphs only on a pick, a key step or reset. A morph per stop garbled a
  fast sweep.
- Arriving letters start fading in at 10% of a morph rather than 25%, so
  the text is never blank between values.
- Reset's spin plays once, when it acts. It no longer replays every time
  the popover opens.
Arriving at the selected model's top level (Max, or High on Gemma 4) by drag, click or arrow key flashes a warm disc behind the popover's brain and bursts a ring of rays from it. While the level stays at the top, the thumb keeps a warm halo, the fill glows a little more, and the chip's effort word turns from grey to the level's colour. An opening already at the top, or a model switch onto it, shows the halo without the spark; reduced motion keeps the halo and skips the spark.
Design review: Maple's users switch models more often than effort, so the chip now opens the model list with the selected model's effort slider docked under it, instead of an effort popover whose model name led to the list. A model pick closes the panel, as the plain list did, so switching models takes two clicks again; Left and Right step the effort, Up, Down and Enter pick a model. /model opens the same panel. Menu gains a footer that stays in view while the rows scroll, and loses on_confirm, which only the old popover used. ChatPopup::Effort, effort_return and the chat-effort-change-model string go with it.
Most capable, Uncensored, then Fast & cheap, as the list was grouped before, with a Popular badge on DeepSeek Uncensored. The catalog carries no group yet, so the app keeps a table of the current model ids; a model deployed after it lists under More models, and a catalog the table knows none of shows no headers at all.
The slider and the status line cross-fade when levels arrive, and the status line holds the slider's height, so the panel no longer jumps. A key step moves the thumb but plays no ripple, bloom, pulse, morph or spark. A drag ripples the stops it crosses and blooms once where it lets go, instead of a landing ripple, bloom and brain pulse at every stop. The brain pulses for a pointer pick or reset only, and never replays when the panel reopens. The halo fades out when the thumb leaves the top. Opening the panel, which happens on every model switch, settles the thumb without a bounce and with the fill already in place.
The ring that marked the level reset returns to read as a different kind of stop. Reset still dims at that level.
The brand coral on a grey pill read at under 2:1 in the light theme. The badge now sets deep coral on the soft coral container, 5.1:1 in light and 7:1 in dark, from a new accent_text token the contrast test holds to 4.5:1.
Master moved the Web switch from the composer to Settings > Tools. The
chip keeps #1520's quieter detail value and loses the highlight state
that only the Web chip used; the keyboard walk test lands on Attachments
one step sooner, since the model chip and thinking button are one control.
@AnthonyRonning

Copy link
Copy Markdown
Contributor

Going to add the categories PR stack on top of this: #1538

The theme test keeps both new contrast checks: #1520's badge text on its
fill, and the default button's states from #1507.
@AnthonyRonning

AnthonyRonning commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

A few changes I would like before this merges, mostly so the panel is driven by the server instead of tables in the app.

1. Keep this PR to the slider; take the model groups out.
The Most capable / Uncensored / Fast & cheap table and the Popular list are hardcoded in composer.rs, so a new or renamed model would need an app release. The catalog now serves this (group per model, ordered groups, and badges, from #1538). #1540 is stacked on this branch and reads the sections from there. Please drop ModelGroup, MODEL_GROUPS, POPULAR_MODELS and group_models here and leave a flat list; #1540 adds the sections back once the backend is on dev and prod.

2. Use the server's default effort, not Medium.
The catalog's reasoning object has a default_effort per model (Max for Kimi K3.1 Pro, Kimi K3 and GLM 5.3; High for DeepSeek V4.1 Flash). Those follow the model makers' recommendations. The app only reads supported_efforts today and starts from Medium, moved up to the nearest level the model accepts (recommended_level in effort.rs, and ThinkingLevel::Medium in the runtime's thinking.rs). When nothing is remembered (see 4), the starting level should be the model's default_effort.

3. Reset goes to that same server default.
Reset already returns to "recommended", but recommended is the hardcoded Medium rule above. It should be the model's default_effort, so "Reset to recommended" means what the server recommends for that model.

4. Switching models takes the new model's default.
Picking a different model should start at that model's default_effort, not at the exact or nearest match of the level from the previous model.

What is remembered: one model and effort pair, and only when the user picks it themselves on the New Task view. Opening an existing task that uses another model or level does not change it. There is no memory per model. Example:

  • The user has Kimi at Max remembered, then starts a new task and picks DeepSeek V4.1 Flash at Low. That pair is now remembered.
  • They finish and open New Task again: still DeepSeek V4.1 Flash at Low.
  • They pick Kimi: it starts at Kimi's default, not the Max they used before.

Someone who always wants a non-default level on one model and switches models a lot will have to set it again each time. I'm fine with that for now for the sake of consistency, and we can revisit it later.

5. Tone the slider down a little.
It looks nice, but it's large and the glow at the top level is strong next to the rest of the form, and it pulls focus away from the model list, which matters more here. A smaller track and thumb and a softer glow and bloom would sit better.

The model panel kept its own table of model ids to sections and its own
list of Popular models, so a model deployed after a release listed under
More models until the next one. The catalog now serves groups and badges,
and #1540 builds the sections from it; until then the panel lists the
models flat, in the catalog's order. The group headings, the Popular
badge, its theme tokens and their strings go with the table.
A model with no remembered level started at Medium, moved to the nearest
level it accepts, and a switch carried the previous model's level over.
Both now take the model's `default_effort` from the catalog, which follows
the model makers' recommendations (Max for Kimi K3.1 Pro, Kimi K3 and GLM
5.3, High for DeepSeek V4.1 Flash); a model the catalog gives no default it
accepts keeps the old rule. The runtime serves that level with the levels,
and Reset to recommended returns to it.

New Task remembers one model and level, and only what the user picks
there: picking a level remembers it with the model, and picking another
model starts that model at its default and forgets the level. A task's
picks, and opening a task, leave it alone, so a task's model pick no
longer becomes the default. A level picked for a task's next model waits
in the runtime for the switch, instead of riding on the account default.
The slider was larger than the model rows above it and glowed strongly at
the top level, so it pulled the eye from the model list. The track is
24 px instead of 36, the thumb 27 (30 held) instead of 40 (44), and the
dots 4 instead of 5; the panel's status line keeps the slider's new
height. The fill's glow, the thumb's shadows, its held glow, the bloom
where a level lands, the top level's halo and the brain's spark there are
all softer and smaller.
@matthewrball

Copy link
Copy Markdown
Collaborator Author

Done, in three commits on top of a merge of master (nothing rewritten):

  1. Flat list. ModelGroup, MODEL_GROUPS, POPULAR_MODELS and group_models are gone. The unused-strings test has no exemption, so the group and Popular strings (en, es, revisions), popular_badge() and the badge_fill/badge_text tokens went with them. Agent: list models in the catalog's groups #1540 will need to re-add those; it conflicts with this head in the model_menu loop and the block after chip(), and taking Agent: list models in the catalog's groups #1540's side resolves both.
  2. Default effort. A new task starts at the model's default_effort. Medium, moved to the nearest accepted level, applies only when the catalog gives none.
  3. Reset goes to that same default. A paired computer on an older build doesn't send it, so Reset is hidden there instead of falling back to Medium.
  4. Switching models starts at the new model's default. Only the model and effort picked on New Task are remembered; opening a task changes neither. One reading to confirm: a model picked inside an existing task no longer becomes the default for new tasks either. Say if you'd rather keep that.
  5. Slider. Track 36 → 24 px, thumb 40 → 27 px, with a softer glow, bloom and top-level halo.

App suite: 1,400 passed, 0 failed. The screenshots in the description predate these changes.

@AnthonyRonning
AnthonyRonning merged commit 938292e into master Nov 11, 2026
22 checks passed
@AnthonyRonning
AnthonyRonning deleted the ux/effort-slider branch November 11, 2026 01:23
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.

3 participants