Skip to content

Move fast mode to a bolt button in the traits pane - #440

Merged
Tryanks merged 1 commit into
mainfrom
feat/fast-mode-bolt
Sep 15, 2026
Merged

Tryanks merged 1 commit into
mainfrom
feat/fast-mode-bolt

Conversation

@Tryanks

@Tryanks Tryanks commented Sep 15, 2026

Copy link
Copy Markdown
Owner

What changes

Fast mode is pulled out of the traits (reasoning) picker's option list and becomes a persistent lightning-bolt button pinned to the pane's top-right corner.

  • Filled amber bolt (#F5A524, one hard-coded colour in Theme::fast_mode_accent, deliberately not a theme token) = on; outline bolt in muted foreground = off. Click toggles and keeps the pane open.
  • Models without fast mode still show the bolt, dimmed and inert: no hover background, cursor_default, no handler. On desktop a tooltip reads "Current model cannot enable fast mode"; in the compact layout tapping does nothing and there is no tooltip.
  • The bolt wrapper is absolutely positioned above the scroll container and .occlude()s it; on_click stops propagation. Hovering or clicking the bolt never reaches an option row scrolled underneath it.
  • The Claude "Fast Mode" rows are no longer listed. A Codex "Service Tier" section is rendered only when tiers other than default and fast exist, and then without the Fast row.
  • FastMode in crates/core/src/provider_models.rs is the single owner of "does this model have fast mode / is it on / which selection toggles it" (Claude fastMode boolean, or Codex serviceTier select with a fast-valued or "Fast"-labelled tier, which the app-server reports as priority). The composer bolt and the Orchestrate settings Fast switch both use it; the duplicate model_fast_supported is removed.
  • New assets/icons/zap.svg / zap-filled.svg (Lucide, currentColor). toolbar_icon_button now accepts any Icon.
  • Locale keys composer.fast_mode and composer.fast_mode_unsupported in both en.yml and zh-CN.yml. docs/DESIGN.md composer section updated.

The chip label is untouched: the desktop chip still shows Fast/Normal or the tier name.

Tests

fast_mode_keys_on_claude_boolean_and_codex_fast_tier covers the boolean shape, the app-server select shape (default/priority), and an unsupported spec, replacing the Orchestrate settings test that exercised the same rule.

Visual verification (macOS, TCODE_DATA_DIR throwaway profile)

  • Claude Opus 5: no Fast Mode section; outline bolt; click → filled amber, chip "High · 快速 · 1M", pane stays open. With the list scrolled so an option row sat under the bolt: hovering the bolt showed no hover background on the row, clicking toggled fast without selecting the row and without dismissing the pane.
  • Codex GPT-6 Astra: no Service Tier section; click → filled amber, chip "Medium · Fast".
  • Claude Fable 5.1: dimmed bolt; hover shows only the tooltip, no hover circle; click does nothing.
  • Compact (600 px wide): bolt at top-right in a 44 pt slot; dimmed state checked with Fable.

Checks run

  • cargo fmt --all --check — pass
  • cargo clippy --workspace --all-targets --locked -- -D warnings — pass
  • cargo build --workspace --locked — pass
  • cargo test --workspace --locked — pass (core 128, ui 413, runtime 170)

Fast mode leaves the traits option list: a lightning bolt pinned to the
pane's top-right corner owns it for both Claude (fastMode boolean) and
Codex (serviceTier fast tier). Filled amber when on, muted outline when
off, dimmed and inert with a tooltip when the model has no fast mode.
The wrapper occludes the scrolling list beneath it so hover and clicks
never reach an option row.

`FastMode` in core::provider_models is the one owner of "does this spec
support fast / which value switches it / is it on"; the Orchestrate Fast
switch uses it instead of its own descriptor scan.

Also fixes a pre-existing sidebar test initializer missing
`title_generating` and a stale fmt in codex.rs so the workspace checks
pass.
@Tryanks
Tryanks merged commit bfa72eb into main Sep 15, 2026
11 of 12 checks passed
@Tryanks
Tryanks deleted the feat/fast-mode-bolt branch September 15, 2026 21:42
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