Python
Fold the hide-thinking checkbox into the Composer card
Rohit C Prasadf1a6441b4a07
diff --git a/surfaces/gui/src/components/SettingsView.tsx b/surfaces/gui/src/components/SettingsView.tsxindex b79e077f..d5a363cf 100644--- a/surfaces/gui/src/components/SettingsView.tsx+++ b/surfaces/gui/src/components/SettingsView.tsx@@ -950,8 +950,6 @@ function AppearanceSection() {<ContextBarCard />- <HideReasoningCard />-<AutoApproveCard /><FilesCard />@@ -1317,14 +1315,24 @@ function CompactionCard({ machine }: { machine?: Machine | null }) {// -- Composer: context-window bar (owner ask 2026-07-30) ------------------------// The chip's bar is context-window occupancy; the session total (unbounded) lives in// the popover. Some people would rather not watch a meter at all, hence the toggle.+// #611: the same card also holds "hide thinking while I work" — a persisted, user-global+// checkbox that collapses the live reasoning stream to a quiet indicator while a turn+// runs. The finalized reasoning still appears after the turn, so nothing is lost.function ContextBarCard() {const { t } = useTranslation();const [shown, setShown] = useState<boolean | null>(null);+ const [hidden, setHidden] = useState<boolean | null>(null);useEffect(() => {getSettings()- .then((s) => setShown(s.context_bar === true))- .catch(() => setShown(false));+ .then((s) => {+ setShown(s.context_bar === true);+ setHidden(s.hide_reasoning_running === true);+ })+ .catch(() => {+ setShown(false);+ setHidden(false);+ });}, []);const save = async (next: boolean) => {@@ -1332,7 +1340,12 @@ function ContextBarCard() {await setContextBar(next);};- if (shown === null) return null;+ const saveHidden = async (next: boolean) => {+ setHidden(next);+ await setHideReasoningRunning(next);+ };++ if (shown === null || hidden === null) return null;return (<div className={CARD + " p-4 mb-4"} data-testid="context-bar-card"><div className={FIELD_LABEL}>{t("settings.composer_section")}</div>@@ -1349,43 +1362,17 @@ function ContextBarCard() {<span className="block text-meta text-muted">{t("settings.context_bar_desc")}</span></span></label>- </div>- );-}--// #611: collapse the live reasoning stream to a quiet "Thinking…" indicator while a-// turn runs. Mirror of ContextBarCard: a persisted, user-global checkbox in Composer-// settings. The finalized reasoning still appears after the turn, so nothing is lost.-function HideReasoningCard() {- const { t } = useTranslation();- const [hidden, setHidden] = useState<boolean | null>(null);-- useEffect(() => {- getSettings()- .then((s) => setHidden(s.hide_reasoning_running === true))- .catch(() => setHidden(false));- }, []);-- const save = async (next: boolean) => {- setHidden(next);- await setHideReasoningRunning(next);- };-- if (hidden === null) return null;- return (- <div className={CARD + " p-4 mb-4"} data-testid="hide-reasoning-card">- <div className={FIELD_LABEL}>{t("settings.composer_section")}</div><label className="flex items-start gap-3 py-2"><inputtype="checkbox"className="mt-0.5"data-testid="hide-reasoning-toggle"checked={hidden}- onChange={(e) => save(e.target.checked)}+ onChange={(e) => saveHidden(e.target.checked)}/><span>- <span className="block text-[13px] text-ink">{t("settings.hide_reasoning_title")}</span>- <span className="block text-[12px] text-muted">{t("settings.hide_reasoning_desc")}</span>+ <span className="block text-ui text-ink">{t("settings.hide_reasoning_title")}</span>+ <span className="block text-meta text-muted">{t("settings.hide_reasoning_desc")}</span></span></label></div>