diff --git a/gui/src/components/AccountPoolStrategyControls.tsx b/gui/src/components/AccountPoolStrategyControls.tsx index 57e315abe..271447e86 100644 --- a/gui/src/components/AccountPoolStrategyControls.tsx +++ b/gui/src/components/AccountPoolStrategyControls.tsx @@ -3,6 +3,7 @@ import { ACCOUNT_POOL_STRATEGIES, type AccountPoolStrategy, } from "../account-pool-strategy"; +import { NumberStepper } from "./NumberStepper"; const STRATEGY_LABEL_KEYS = { quota: "accountPool.strategyQuota", @@ -16,11 +17,19 @@ export interface AccountPoolStrategyControlsProps { disabled?: boolean; strategySelectId?: string; stickyInputId?: string; + /** When true, omit the outer strategy label (parent card already titled). */ + hideStrategyLabel?: boolean; onStrategyChange(strategy: AccountPoolStrategy): void; onStickyDraftChange(value: string): void; onStickyCommit(): void; } +function clampStickyDraft(raw: string, delta: number): string { + const parsed = Number.parseInt(raw, 10); + const base = Number.isFinite(parsed) ? parsed : 1; + return String(Math.min(100, Math.max(1, base + delta))); +} + /** * Shared strategy select + round-robin sticky limit for Codex / Anthropic account pools. */ @@ -30,15 +39,16 @@ export default function AccountPoolStrategyControls({ disabled = false, strategySelectId = "account-pool-strategy", stickyInputId = "account-pool-sticky-limit", + hideStrategyLabel = false, onStrategyChange, onStickyDraftChange, onStickyCommit, }: AccountPoolStrategyControlsProps) { const t = useT(); return ( -
{t("startup.subtitle")}
{codexRuntimeWarning}
- {codexRuntimeFix && ( -
-
- {codexRuntimeFix}
-
{codexRuntimeWarning}
+ {codexRuntimeFix && ( +{codexRuntimeFix}
+