Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(composer): lead the reasoning submenu with a drag slider (#417)

ushaio23f980a39b9b
diff --git a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx
index 368b94da7..e972b763d 100644
--- a/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx
+++ b/apps/desktop/src/features/chat/composer/ComposerModelPicker.tsx
@@ -1,3 +1,4 @@
+import { useEffect, useState, type CSSProperties } from "react";
import type { TFunction } from "i18next";
import { formatTokenCount, modelIdsMatch } from "@pi-desktop/shared";
import { AnchoredMenu } from "../../../components/settings/AnchoredMenu";
@@ -16,6 +17,23 @@ import type { useComposerModelMenu } from "./hooks/useComposerModelMenu";
type ModelMenuController = ReturnType<typeof useComposerModelMenu>;
+/**
+ * Keys the native range input must own while focused. Without stopping
+ * propagation, ArrowLeft would leave the submenu for the menu root and
+ * Enter would re-commit the radio-list highlight instead of the slider.
+ */
+const THINKING_SLIDER_KEYS = new Set([
+ "ArrowLeft",
+ "ArrowRight",
+ "ArrowUp",
+ "ArrowDown",
+ "Home",
+ "End",
+ "PageUp",
+ "PageDown",
+ "Enter",
+]);
+
export type ComposerModelPickerProps = {
t: TFunction;
controller: ModelMenuController;
@@ -54,15 +72,41 @@ export function ComposerModelPicker({
modelSearchRef,
modelListRef,
thinkingListRef,
+ thinkingSliderRef,
modelGroups,
flatModels,
thinkingMenuLevels,
+ thinkingMode,
showView,
+ showThinkingMode,
selectModel,
+ commitThinkingLevel,
selectThinkingLevel,
onMenuKeyDown,
} = controller;
+ // Slider geometry: one stop per available level, with the fill carried as
+ // a CSS custom property so the accent track can follow the native input.
+ const thinkingSliderIndex = Math.max(
+ thinkingMenuLevels.findIndex((level) => level === thinkingLevel),
+ 0,
+ );
+ // Local drag lead: the native input follows the pointer or arrow key
+ // immediately while the store confirmation lands, so a controlled value
+ // never snaps back mid-drag. The lead clears once the store confirms.
+ const [dragThinkingIndex, setDragThinkingIndex] = useState<number | null>(null);
+ useEffect(() => {
+ if (dragThinkingIndex === null) return;
+ if (thinkingMenuLevels[dragThinkingIndex] === thinkingLevel) {
+ setDragThinkingIndex(null);
+ }
+ }, [dragThinkingIndex, thinkingLevel, thinkingMenuLevels]);
+ const thinkingSliderValue = dragThinkingIndex ?? thinkingSliderIndex;
+ const thinkingSliderPercent =
+ thinkingMenuLevels.length > 1
+ ? (thinkingSliderValue / (thinkingMenuLevels.length - 1)) * 100
+ : 0;
+
return (
<AnchoredMenu
className="composer-model-thinking"
@@ -231,23 +275,107 @@ export function ComposerModelPicker({
<div className="composer-thinking-heading">
{t("chat.reasoningSupportedBy", { model: modelLabel })}
</div>
- <div className="composer-thinking-list" ref={thinkingListRef}>
- {thinkingMenuLevels.map((level, index) => (
+ {/* The value label is the gateway to the dropdown list (issue
+ #417): the slider is the default, but one click restores
+ the classic radio list for explicit selection. A
+ single-level binding has nothing to slide, so it renders
+ the radio list directly. */}
+ {thinkingMenuLevels.length > 1 ? (
+ <div className="composer-thinking-mode">
<button
- key={level}
type="button"
- data-thinking-index={index}
- className={`composer-plus-item ${thinkingLevel === level ? "active" : ""} ${thinkingHighlight === index ? "kb-active" : ""}`}
- role="menuitemradio"
- aria-checked={thinkingLevel === level}
- onMouseMove={() => setThinkingHighlight(index)}
- onClick={() => void selectThinkingLevel(level)}
+ className="composer-thinking-value"
+ role="menuitem"
+ aria-expanded={thinkingMode === "list"}
+ title={
+ thinkingMode === "list"
+ ? t("chat.reasoningSliderAdjust")
+ : t("chat.reasoningLevelList")
+ }
+ aria-label={`${t("chat.reasoningLevel")}: ${thinkingLevel}`}
+ onClick={() =>
+ showThinkingMode(thinkingMode === "list" ? "slider" : "list")
+ }
+ onKeyDown={(event) => {
+ // Enter must toggle, not run the menu's list selection.
+ if (event.key === "Enter") event.stopPropagation();
+ }}
>
- <span className="flex-1">{level}</span>
- {thinkingLevel === level ? <IconCheck size={14} className="composer-model-check" aria-hidden="true" /> : null}
+ <span className="composer-thinking-value-level">{thinkingLevel}</span>
+ <IconChevronDown size={12} aria-hidden="true" />
</button>
- ))}
- </div>
+ </div>
+ ) : null}
+ {thinkingMode === "slider" && thinkingMenuLevels.length > 1 ? (
+ <div className="composer-thinking-slider">
+ <input
+ ref={thinkingSliderRef}
+ type="range"
+ className="composer-thinking-range"
+ min={0}
+ max={thinkingMenuLevels.length - 1}
+ step={1}
+ value={thinkingSliderValue}
+ aria-label={t("chat.reasoningLevel")}
+ aria-valuetext={thinkingMenuLevels[thinkingSliderValue] ?? thinkingLevel}
+ style={
+ {
+ "--composer-thinking-progress": `${thinkingSliderPercent}%`,
+ } as CSSProperties
+ }
+ onChange={(event) => {
+ const index = Number(event.target.value);
+ setDragThinkingIndex(index);
+ const level = thinkingMenuLevels[index];
+ if (level && level !== thinkingLevel) void commitThinkingLevel(level);
+ }}
+ onBlur={() => setDragThinkingIndex(null)}
+ onKeyDown={(event) => {
+ if (THINKING_SLIDER_KEYS.has(event.key)) event.stopPropagation();
+ }}
+ />
+ <div className="composer-thinking-ticks">
+ {thinkingMenuLevels.map((level) => (
+ <button
+ key={level}
+ type="button"
+ className={`composer-thinking-tick ${thinkingLevel === level ? "active" : ""}`}
+ role="menuitemradio"
+ aria-checked={thinkingLevel === level}
+ title={level}
+ onClick={() => {
+ if (level !== thinkingLevel) void commitThinkingLevel(level);
+ }}
+ onKeyDown={(event) => {
+ // Enter must commit this tick in place, not run the
+ // menu's list selection and return to the root.
+ if (event.key === "Enter") event.stopPropagation();
+ }}
+ >
+ {level}
+ </button>
+ ))}
+ </div>
+ </div>
+ ) : (
+ <div className="composer-thinking-list" ref={thinkingListRef}>
+ {thinkingMenuLevels.map((level, index) => (
+ <button
+ key={level}
+ type="button"
+ data-thinking-index={index}
+ className={`composer-plus-item ${thinkingLevel === level ? "active" : ""} ${thinkingHighlight === index ? "kb-active" : ""}`}
+ role="menuitemradio"
+ aria-checked={thinkingLevel === level}
+ onMouseMove={() => setThinkingHighlight(index)}
+ onClick={() => void selectThinkingLevel(level)}
+ >
+ <span className="flex-1">{level}</span>
+ {thinkingLevel === level ? <IconCheck size={14} className="composer-model-check" aria-hidden="true" /> : null}
+ </button>
+ ))}
+ </div>
+ )}
</>
)}
</>
diff --git a/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts b/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts
index 32adf0605..f6bbb6011 100644
--- a/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts
+++ b/apps/desktop/src/features/chat/composer/hooks/useComposerModelMenu.ts
@@ -20,6 +20,7 @@ import {
thinkingLevelForProvider,
thinkingProviderForModel,
type ComposerMenuView,
+ type ThinkingSelectionMode,
} from "../model";
type UseComposerModelMenuOptions = {
@@ -51,10 +52,12 @@ export function useComposerModelMenu({
const [query, setQuery] = useState("");
const [modelHighlight, setModelHighlight] = useState(-1);
const [thinkingHighlight, setThinkingHighlight] = useState(-1);
+ const [thinkingMode, setThinkingMode] = useState<ThinkingSelectionMode>("slider");
const rootMenuRef = useRef<HTMLDivElement>(null);
const modelSearchRef = useRef<HTMLInputElement>(null);
const modelListRef = useRef<HTMLDivElement>(null);
const thinkingListRef = useRef<HTMLDivElement>(null);
+ const thinkingSliderRef = useRef<HTMLInputElement>(null);
const thinkingProvider =
resolvedThinkingProvider ??
@@ -157,6 +160,7 @@ export function useComposerModelMenu({
setQuery("");
setModelHighlight(-1);
setThinkingHighlight(-1);
+ setThinkingMode("slider");
}, [open]);
useEffect(() => {
@@ -168,19 +172,28 @@ export function useComposerModelMenu({
requestAnimationFrame(() => {
if (view === "root") rootMenuRef.current?.querySelector<HTMLButtonElement>("button")?.focus();
if (view === "model") modelSearchRef.current?.focus();
- if (view === "thinking") thinkingListRef.current?.querySelector<HTMLButtonElement>("button")?.focus();
+ if (view === "thinking") {
+ // The slider is the default surface: focus its input so arrows land
+ // in the slider instead of the radio list. A single-level binding
+ // renders the radio list directly, so focus its first row instead.
+ if (thinkingMode === "slider" && thinkingMenuLevels.length > 1) {
+ thinkingSliderRef.current?.focus();
+ } else {
+ thinkingListRef.current?.querySelector<HTMLButtonElement>("button")?.focus();
+ }
+ }
if (view === "model" && modelHighlight >= 0) {
modelListRef.current
?.querySelector(`[data-model-index="${modelHighlight}"]`)
?.scrollIntoView({ block: "nearest" });
}
- if (view === "thinking" && thinkingHighlight >= 0) {
+ if (view === "thinking" && thinkingMode === "list" && thinkingHighlight >= 0) {
thinkingListRef.current
?.querySelector(`[data-thinking-index="${thinkingHighlight}"]`)
?.scrollIntoView({ block: "nearest" });
}
});
- }, [open, view]);
+ }, [open, thinkingMenuLevels.length, thinkingMode, view]);
useEffect(() => {
if (!open || view !== "model" || modelHighlight < 0) return;
@@ -200,6 +213,8 @@ export function useComposerModelMenu({
setView(nextView);
setModelHighlight(-1);
setThinkingHighlight(-1);
+ // Entering the reasoning submenu always restarts on the slider (issue #417).
+ if (nextView === "thinking") setThinkingMode("slider");
if (nextView !== "model") setQuery("");
};
@@ -236,22 +251,60 @@ export function useComposerModelMenu({
}
};
+ /**
+ * Toggle the reasoning submenu between its slider and radio-list
+ * presentations. The list opens with the current level highlighted so
+ * Up/Down/Enter behave exactly as before the slider existed.
+ */
+ const showThinkingMode = (mode: ThinkingSelectionMode) => {
+ setThinkingMode(mode);
+ setThinkingHighlight(
+ mode === "list" ? thinkingMenuLevels.indexOf(thinkingLevel) : -1,
+ );
+ };
+
+ /**
+ * Commit a reasoning level while staying in the reasoning submenu, so a
+ * dragged slider or a tick click keeps its surface for further tweaks.
+ * Returns false when the configuration is rejected, mirroring the list
+ * selection path's error contract.
+ *
+ * A drag can emit one commit per crossed stop. Idle sessions persist each
+ * configure directly, so concurrent promises could resolve out of order and
+ * land the store on a stale level. The chain serializes the sends: each
+ * configure starts only after the previous one has settled its store write.
+ */
+ const thinkingCommitChainRef = useRef<Promise<boolean | void>>(Promise.resolve());
+ const commitThinkingLevel = async (level: ThinkingLevel) => {
+ const send = async (): Promise<boolean> => {
+ try {
+ await configureActiveSession({
+ mode,
+ providerId: provider?.id,
+ modelId,
+ thinkingLevel: level,
+ });
+ return true;
+ } catch (error) {
+ showToast(error instanceof Error ? error.message : String(error), {
+ variant: "error",
+ });
+ return false;
+ }
+ };
+ const run = thinkingCommitChainRef.current.then(send);
+ thinkingCommitChainRef.current = run.then(
+ () => undefined,
+ () => undefined,
+ );
+ return run;
+ };
+
const selectThinkingLevel = async (level: ThinkingLevel) => {
- try {
- await configureActiveSession({
- mode,
- providerId: provider?.id,
- modelId,
- thinkingLevel: level,
- });
- setView("root");
- setModelHighlight(-1);
- setThinkingHighlight(-1);
- } catch (error) {
- showToast(error instanceof Error ? error.message : String(error), {
- variant: "error",
- });
- }
+ if (!(await commitThinkingLevel(level))) return;
+ setView("root");
+ setModelHighlight(-1);
+ setThinkingHighlight(-1);
};
const onMenuKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
@@ -316,11 +369,15 @@ export function useComposerModelMenu({
modelSearchRef,
modelListRef,
thinkingListRef,
+ thinkingSliderRef,
modelGroups: filteredModelGroups,
flatModels,
thinkingMenuLevels,
+ thinkingMode,
showView,
+ showThinkingMode,
selectModel,
+ commitThinkingLevel,
selectThinkingLevel,
onMenuKeyDown,
controlsBlocked,
diff --git a/apps/desktop/src/features/chat/composer/model.ts b/apps/desktop/src/features/chat/composer/model.ts
index a2dac7c19..2300465fd 100644
--- a/apps/desktop/src/features/chat/composer/model.ts
+++ b/apps/desktop/src/features/chat/composer/model.ts
@@ -69,6 +69,12 @@ export type ComposerFileReference = {
export type ComposerMenuView = "root" | "model" | "thinking";
+/**
+ * How the reasoning submenu presents its levels: a draggable slider by
+ * default, with the radio list one value-label click away (issue #417).
+ */
+export type ThinkingSelectionMode = "slider" | "list";
+
export type PromptEnhancementError = {
message: string;
code: string;
diff --git a/apps/desktop/src/styles/composer-menus.css b/apps/desktop/src/styles/composer-menus.css
index f037f3e35..85d0231bb 100644
--- a/apps/desktop/src/styles/composer-menus.css
+++ b/apps/desktop/src/styles/composer-menus.css
@@ -235,6 +235,137 @@
overflow-y: auto;
}
+/* Reasoning slider (issue #417): the submenu leads with a drag slider; the
+ value label toggles the classic radio list for dropdown selection. */
+.composer-thinking-mode {
+ display: flex;
+ justify-content: flex-end;
+ padding: 0 4px 4px;
+}
+
+.composer-thinking-value {
+ display: inline-flex;
+ min-height: 24px;
+ align-items: center;
+ gap: 4px;
+ border-radius: var(--radius-sm);
+ padding: 0 8px;
+ background: var(--ds-tile-deep);
+ color: var(--ds-accent);
+ font-size: var(--text-sm);
+ line-height: var(--leading-compact);
+ cursor: pointer;
+ transition:
+ background var(--motion-duration-fast) var(--motion-ease-out),
+ color var(--motion-duration-fast) var(--motion-ease-out);
+}
+
+.composer-thinking-value:hover,
+.composer-thinking-value:focus-visible {
+ background: var(--ds-bg-hover);
+ color: var(--ds-text-primary);
+}
+
+.composer-thinking-value > svg {
+ color: var(--ds-text-muted);
+}
+
+.composer-thinking-slider {
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ padding: 0 6px 4px;
+}
+
+.composer-thinking-range {
+ -webkit-appearance: none;
+ appearance: none;
+ width: 100%;
+ height: 18px;
+ margin: 0;
+ background: transparent;
+ cursor: pointer;
+}
+
+.composer-thinking-range:focus-visible {
+ border-radius: var(--radius-sm);
+ outline: 2px solid var(--ds-accent);
+ outline-offset: 2px;
+}
+
+.composer-thinking-range::-webkit-slider-runnable-track {
+ height: 4px;
+ border-radius: var(--radius-full);
+ background: linear-gradient(
+ to right,
+ var(--ds-accent) 0,
+ var(--ds-accent) var(--composer-thinking-progress, 0%),
+ var(--ds-border-subtle) var(--composer-thinking-progress, 0%),
+ var(--ds-border-subtle) 100%
+ );
+}
+
+.composer-thinking-range::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ width: 14px;
+ height: 14px;
+ margin-top: -5px;
+ border: 2px solid var(--ds-bg-elevated-opaque);
+ border-radius: var(--radius-full);
+ background: var(--ds-accent);
+}
+
+.composer-thinking-range::-moz-range-track {
+ height: 4px;
+ border-radius: var(--radius-full);
+ background: var(--ds-border-subtle);
+}
+
+.composer-thinking-range::-moz-range-progress {
+ height: 4px;
+ border-radius: var(--radius-full);
+ background: var(--ds-accent);
+}
+
+.composer-thinking-range::-moz-range-thumb {
+ width: 10px;
+ height: 10px;
+ border: 2px solid var(--ds-bg-elevated-opaque);
+ border-radius: var(--radius-full);
+ background: var(--ds-accent);
+}
+
+/* One label per stop; long ladders ellipsize instead of wrapping. */
+.composer-thinking-ticks {
+ display: flex;
+ gap: 2px;
+}
+
+.composer-thinking-tick {
+ flex: 1 1 0;
+ min-width: 0;
+ overflow: hidden;
+ padding: 0;
+ border-radius: var(--radius-sm);
+ color: var(--ds-text-muted);
+ font-size: var(--text-2xs);
+ line-height: var(--leading-compact);
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ cursor: pointer;
+ transition: color var(--motion-duration-fast) var(--motion-ease-out);
+}
+
+.composer-thinking-tick:hover,
+.composer-thinking-tick:focus-visible {
+ color: var(--ds-text-primary);
+}
+
+.composer-thinking-tick.active {
+ color: var(--ds-accent);
+ font-weight: var(--font-weight-strong);
+}
+
@keyframes composer-menu-in {
from {
opacity: 0;
diff --git a/apps/desktop/test/composer-model-thinking-menu.test.mjs b/apps/desktop/test/composer-model-thinking-menu.test.mjs
index de45ba3a0..b3d0fb547 100644
--- a/apps/desktop/test/composer-model-thinking-menu.test.mjs
+++ b/apps/desktop/test/composer-model-thinking-menu.test.mjs
@@ -30,6 +30,32 @@ test("model and reasoning selection return to the root without closing", () => {
assert.match(composerSource, /setView\("root"\);[\s\S]*?setThinkingHighlight\(-1\)/);
assert.match(composerSource, /const thinkingMenuLevels: ThinkingLevel\[\] = availableThinkingLevels\.length/);
});
+test("the reasoning submenu leads with a slider and keeps the list behind the value label", () => {
+ assert.match(composerSource, /const \[thinkingMode, setThinkingMode\] = useState<ThinkingSelectionMode>\("slider"\)/);
+ assert.match(composerSource, /showThinkingMode\(thinkingMode === "list" \? "slider" : "list"\)/);
+ assert.match(composerSource, /aria-expanded=\{thinkingMode === "list"\}/);
+ assert.match(composerSource, /type="range"/);
+ assert.match(composerSource, /className="composer-thinking-range"/);
+ assert.match(composerSource, /aria-label=\{t\("chat.reasoningLevel"\)\}/);
+ assert.match(composerSource, /const commitThinkingLevel = async/);
+ assert.match(composerSource, /if \(!\(await commitThinkingLevel\(level\)\)\) return;/);
+ assert.match(composerSource, /if \(level && level !== thinkingLevel\) void commitThinkingLevel\(level\);/);
+ // The slider owns its arrow/Home/End keys; ArrowLeft must not leave the submenu.
+ assert.match(composerSource, /if \(THINKING_SLIDER_KEYS\.has\(event\.key\)\) event\.stopPropagation\(\);/);
+ assert.match(composerSource, /composer-thinking-tick/);
+ assert.match(stylesSource, /\.composer-thinking-range::-webkit-slider-runnable-track/);
+ assert.match(stylesSource, /\.composer-thinking-range::-webkit-slider-thumb/);
+ assert.match(stylesSource, /\.composer-thinking-range::-moz-range-thumb/);
+ assert.match(stylesSource, /\.composer-thinking-tick\.active\s*\{/);
+});
+ // A single-level binding renders the radio list directly; the slider and
+ // its value toggle only exist when there is more than one stop.
+ assert.match(composerSource, /\{thinkingMenuLevels\.length > 1 \? \(\s*<div className="composer-thinking-mode">/);
+ assert.match(composerSource, /thinkingMode === "slider" && thinkingMenuLevels\.length > 1 \? \(/);
+ assert.match(composerSource, /thinkingMode === "slider" && thinkingMenuLevels\.length > 1\) \{/);
+ // Drag commits serialize so out-of-order configure responses cannot land a stale level.
+ assert.match(composerSource, /thinkingCommitChainRef/);
+ assert.match(composerSource, /aria-valuetext=\{thinkingMenuLevels\[thinkingSliderValue\] \?\? thinkingLevel\}/);
test("opening the combined menu preloads model metadata before its submenu", () => {
assert.match(
diff --git a/docs/spec/04-ux/07-ui-design-system.md b/docs/spec/04-ux/07-ui-design-system.md
index 48c0dc95b..399edd895 100644
--- a/docs/spec/04-ux/07-ui-design-system.md
+++ b/docs/spec/04-ux/07-ui-design-system.md
@@ -909,9 +909,12 @@ The composer renders only controls connected to the active pi session:
in-place with a back row and its submenu. The Model submenu contains search
plus sticky provider groups. Each model row begins at one tab stop beneath
its provider heading, making the provider → model hierarchy legible without
- altering the model label. The Reasoning submenu contains only the selected
- provider's real `supportedThinkingLevels` with a selected-row check. Selecting
- either value returns to the root without dismissing the popover.
+ altering the model label. The Reasoning submenu leads with the current
+ level as a value label plus a drag slider across the selected provider's
+ real `supportedThinkingLevels`; the value label toggles the radio list with
+ a selected-row check. Slider commits apply without leaving the submenu,
+ while selecting from the list returns to the root without dismissing the
+ popover.
- While the active session is running, the draft and runtime controls stay
editable as next-turn choices; only Send is disabled. Host configuration
remains pinned for the in-flight turn and the latest queued choice is
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index 5f344eb4e..dfcbce7c6 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -2685,15 +2685,20 @@ reasoning-level control.
`role="menu"`. Its root has exactly two `role="menuitem"` entries. The Model
submenu has a search input and sticky provider headings, while the Reasoning
level submenu starts with `Current model <model> supports these reasoning
- levels` and lists the selected model binding's enabled levels in canonical
- order.
+ levels`, a value label carrying the current level, and a drag slider with
+ one labeled stop per enabled level in canonical order (D432). The value
+ label toggles the classic radio list of levels.
Model-row reasoning badges use published reasoning metadata; vision badges
use the effective image-input capability for the row's provider binding
(`supportsImages` when explicitly set, published image input otherwise).
Rows use `role="menuitemradio"`, `aria-checked`, active-row styling, and a
- trailing check. Selecting a concrete model or level persists the complete
- session config, clears model filtering, and returns to the root without
- dismissing the menu. Closing and reopening always starts at the root.
+ trailing check. Selecting a concrete model, or a level from the radio list,
+ persists the complete session config, clears model filtering, and returns
+ to the root without dismissing the menu; slider and tick commits persist
+ the level while staying in the submenu. Closing and reopening always starts
+ at the root, and entering the Reasoning submenu always restarts on the
+ slider; a binding with a single enabled level renders the radio list
+ directly.
- Unknown Custom/OpenAI-compatible models remain at `off` until the user
explicitly enables a level in Settings. The menu never auto-infers reasoning
support; after an explicit binding selection it renders the configured level.
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index a3890c940..31125ea23 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -3204,18 +3204,26 @@ identify the platform validation still needed.
- **Steps**: 1) Open the Composer model × reasoning chip. 2) Confirm the root
contains only Model and Reasoning level entries with current values. 3) Open
Model, search for a model, and select a model from a provider group. 4) Confirm
- the menu remains open at the root, then open Reasoning level and choose multiple
- supported levels. 5) Repeat with a non-reasoning provider and an unknown
- free-form model id; exercise Escape, outside click, Up/Down, Enter, and Left.
+ the menu remains open at the root, then open Reasoning level, drag and click
+ the slider across multiple supported levels, click a tick label, then click
+ the value label to reveal the radio list and choose a level from it. 5)
+ Repeat with a non-reasoning provider and an unknown free-form model id;
+ exercise Escape, outside click, Up/Down, Enter, Left, and the slider's
+ arrow keys.
- **Expected**: The chip is in the right toolbar with a Bot icon, before the
standalone prompt-enhancement Sparkles action and Send/Abort; Off omits the
level text. The single anchored menu replaces its root
with an in-place back row and submenu, never opens tabs or a second popover,
and always reopens at the root. Model search filters sticky provider groups;
- reasoning rows come from the selected model's explicit binding levels in
- canonical order, use radio semantics and a trailing check, and show the
- current model support note. Selecting either value immediately updates the
- chip and root value, clears model filtering, and keeps the menu open. A
+ reasoning levels come from the selected model binding's explicit binding
+ levels in canonical order. The submenu opens on a slider with one labeled
+ stop per level and the current level as a value label (a single-level
+ binding renders the radio list directly); slider and tick
+ commits update the chip immediately without leaving the submenu, and the
+ value label toggles the radio list, which uses radio semantics and a
+ trailing check and shows the current model support note. Selecting either
+ value immediately updates the chip and root value, clears model filtering,
+ and keeps the menu open. A
non-reasoning or unknown model starts at `off`, but an explicit Settings
binding can make its configured levels available; discovery never promotes it
automatically. Refreshing discovered model data cannot overwrite the binding.
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 0c3bbe860..b6d86308b 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -5417,3 +5417,24 @@ that was sitting at the bottom — including after the turn had finished.
and no new default. `project.deleteRunningBlocked` keeps its meaning, copy,
and every translation. See ADR 0251, D421, and
E2E-PROJECT-delete-running-sessions-are-named-and-stopped.
+
+## 2026-09-16 — The reasoning submenu leads with a slider (#417, D432)
+
+- The Composer's Reasoning level submenu opened directly into a vertical radio
+ list. Issue #417 asked for a Codex-desktop-style slider while keeping the
+ existing click-to-list interaction.
+- The submenu now opens with the support note, the current level as a value
+ label, and a native range input with one stop per enabled level plus a
+ clickable tick label per stop. Dragging the slider or clicking a tick
+ commits the level immediately through the same `configureActiveSession`
+ path and stays in the submenu for further tweaks; the value label toggles
+ the classic radio list, which keeps its radio semantics, trailing check,
+ Up/Down/Enter/Left contract, and root-return behavior.
+- The slider owns its arrow/Home/End/Enter keys while focused, so ArrowLeft
+ no longer leaves the submenu from the slider, while Escape still closes the
+ menu. Entering the submenu or reopening the menu always restarts on the
+ slider.
+- Level values remain untranslated canonical strings, and the seven-level
+ ladder, provider filtering, and clamping rules are unchanged. Renderer only:
+ no protocol, storage, host, permission, or migration change. See
+ `04-ux/08-component-spec.md`, `04-ux/07-ui-design-system.md`, and E2E-050.
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index 37b0880e1..9b42004e6 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -503,6 +503,8 @@ export const de = {
"permissionMode": "Berechtigungsmodus",
"reasoningLevel": "Argumentationsebene",
"reasoningSupportedBy": "Aktuelles Modell {{model}} unterstützt diese Argumentationsebenen",
+ "reasoningLevelList": "Aus Liste wählen",
+ "reasoningSliderAdjust": "Mit Schieberegler anpassen",
"permissionInherit": "Standard",
"permissionAsk": "Immer nachfragen",
"permissionAcceptEdits": "Änderungen akzeptieren",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index 8969cc355..b1212e126 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -510,6 +510,8 @@ export const en = {
permissionMode: "Permission mode",
reasoningLevel: "Reasoning level",
reasoningSupportedBy: "Current model {{model}} supports these reasoning levels",
+ reasoningLevelList: "Choose from list",
+ reasoningSliderAdjust: "Adjust with slider",
permissionInherit: "Default",
permissionAsk: "Ask every time",
permissionAcceptEdits: "Accept edits",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index d6ca67969..fffb46548 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -503,6 +503,8 @@ export const es = {
"permissionMode": "Modo de permiso",
"reasoningLevel": "Nivel de razonamiento",
"reasoningSupportedBy": "El modelo actual {{model}} admite estos niveles de razonamiento",
+ "reasoningLevelList": "Elegir de la lista",
+ "reasoningSliderAdjust": "Ajustar con el control deslizante",
"permissionInherit": "Predeterminado",
"permissionAsk": "Preguntar siempre",
"permissionAcceptEdits": "Aceptar ediciones",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index aef3cff6f..836b0f928 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -503,6 +503,8 @@ export const fr = {
"permissionMode": "Mode d'autorisation",
"reasoningLevel": "Niveau de raisonnement",
"reasoningSupportedBy": "Le modèle actuel {{model}} prend en charge ces niveaux de raisonnement",
+ "reasoningLevelList": "Choisir dans la liste",
+ "reasoningSliderAdjust": "Ajuster avec le curseur",
"permissionInherit": "Par défaut",
"permissionAsk": "Demander à chaque fois",
"permissionAcceptEdits": "Accepter les modifications",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 9cd491dc0..e49942c84 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -512,6 +512,8 @@ export const ko = {
permissionMode: "권한 모드",
reasoningLevel: "추론 수준",
reasoningSupportedBy: "현재 모델 {{model}}은(는) 다음 추론 수준을 지원합니다",
+ reasoningLevelList: "목록에서 선택",
+ reasoningSliderAdjust: "슬라이더로 조정",
permissionInherit: "기본값",
permissionAsk: "매번 묻기",
permissionAcceptEdits: "편집 허용",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 08c1e5803..4a5633019 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -512,6 +512,8 @@ export const tr = {
permissionMode: "İzin kipi",
reasoningLevel: "Akıl yürütme düzeyi",
reasoningSupportedBy: "Geçerli model {{model}} bu akıl yürütme düzeylerini destekliyor",
+ reasoningLevelList: "Listeden seç",
+ reasoningSliderAdjust: "Kaydırıcıyla ayarla",
permissionInherit: "Varsayılan",
permissionAsk: "Her seferinde sor",
permissionAcceptEdits: "Düzenlemeleri kabul et",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index 0ec901bbb..ebae54fd3 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -508,6 +508,8 @@ export const zhCN = {
permissionMode: "权限模式",
reasoningLevel: "推理等级",
reasoningSupportedBy: "当前模型 {{model}} 支持的推理等级",
+ reasoningLevelList: "从列表选择",
+ reasoningSliderAdjust: "滑动调整",
permissionInherit: "跟随默认",
permissionAsk: "每次询问",
permissionAcceptEdits: "允许编辑",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index cb4fa1c17..0eb20073f 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -508,6 +508,8 @@ export const zhTW = {
permissionMode: "許可權模式",
reasoningLevel: "推理等級",
reasoningSupportedBy: "當前模型 {{model}} 支援的推理等級",
+ reasoningLevelList: "從列表選擇",
+ reasoningSliderAdjust: "滑動調整",
permissionInherit: "跟隨預設",
permissionAsk: "每次詢問",
permissionAcceptEdits: "允許編輯",