summaryrefslogtreecommitdiffhomepage
path: root/src/features/concurrency
AgeCommit message (Collapse)Author
2026-06-28fix(concurrency): narrow inputs + tighten gap so provider name is visibleAdam Malczewski
2026-06-28fix(concurrency): narrow inputs + make them shrink so close button never ↵Adam Malczewski
overflows
2026-06-28fix(concurrency): keep Set+X inline (nowrap) instead of wrapping to a new lineAdam Malczewski
2026-06-28fix(concurrency): Set+X on same line, status line with in-flight count and badgeAdam Malczewski
2026-06-28refactor(concurrency): simplify view to add-button list with inline limit + ↵Adam Malczewski
cooldown
2026-06-28feat(concurrency): configurable cooldown + adaptive-headroom auto-reduce bannerAdam Malczewski
Consumes the backend's concurrency-fixes (commit 2d27666) — additive to [email protected], NO version bump. ConcurrencyStatusEntry gains cooldownMs / autoReduced / autoReducedFrom? / notice?; new ConcurrencyCooldownResponse / SetConcurrencyCooldownRequest + GET/PUT /concurrency/cooldown/:providerId. FE: - Pure core (logic/view-model.ts): DEFAULT_COOLDOWN_MS; parseCooldownInput (non-negative int — 0 is valid, unlike the limit); normalizeCooldown; cooldownLabel ("350ms"/"1.2s"/"0ms (off)"); viewConcurrencyStatus extended (cooldown + autoReduce fields; auto-reduce → warning badge, not busy); viewAutoReduce/autoReduceNotices (banner view — prefers backend notice, synthesizes a fallback); summarizeStatus "N auto-reduced" fragment; normalizeConcurrencyStatus coerces new fields (immutable readonly build; autoReducedFrom/notice only when autoReduced===true); normalizeConcurrencyCooldown. - Types (logic/types.ts): re-export the 2 new contract types + ConcurrencyCooldownResult + Get/SaveConcurrencyCooldown ports. - UI: ConcurrencyCooldownRow.svelte (inline-edit cooldown + Save → PUT, seeded via the ChatLimitField pattern); AutoReduceBanner.svelte (dismissible banner — backend notice + "Was N, now M." + "Restore to N"); ConcurrencyView renders the cooldown per status card + the banner section. The banner persists while autoReduced===true, is dismissible, and clears automatically once a poll shows autoReduced===false after a restore PUT. - Store (store.svelte.ts): getConcurrencyCooldown + setConcurrencyCooldown (surface 400/404/503 as ok:false; normalize at the seam) + interface decls. - App.svelte: saveConcurrencyCooldown adapter → ConcurrencyView. - Tests: +47 (view-model cooldown/auto-reduce/normalizers; component banner render, cooldown PUT, restore clears banner, dismiss; store cooldown GET/PUT). Re-synced the file: dep (bun install) + re-mirrored .dispatch/transport-contract. reference.md. typecheck 0/0, 1048 tests green (run twice), biome clean, build OK. Worktree env: an untracked dispatch-backend → backend symlink was created in the worktree parent so the canonical file:../dispatch-backend/... paths resolve (NOT committed — per the §2d/§2j worktree convention).
2026-06-27feat(concurrency): 'Saved.' confirmation on the limit row + handoff updateAdam Malczewski
Backend now persists concurrency limits across reboots (no API contract change — same endpoints/shapes, so no re-pin/re-mirror needed). Taking the suggested optional UX hint: after a successful Save the limit row shows a brief green 'Saved.' that clears on the next edit (mirrors the ChatLimitField pattern). backend-handoff.md §2j: notes the persistence change + the two earlier backend-only changes (200ms release cooldown; 'queued' status — already shipped as CR-13). typecheck 0/0, 926 tests green, biome clean, build OK.
2026-06-27style(concurrency): drop the verbose section descriptionsAdam Malczewski
The 'Concurrency limits' and 'Live status' section headings are clear on their own; the explanatory paragraphs under each were overbearing. Removed both.
2026-06-27fix(concurrency): silent background refresh — no loading flickerAdam Malczewski
The 2s status poll (and post-mutation limit reloads) toggled a visible loading state, but since the refresh is near-instant the spinner flashed for <1 frame — a visible flicker/jerk every poll. The polling is now SILENT (mirrors the heartbeat runs list): - refreshLimits/refreshStatus: re-entrancy guard (limitsInFlight/statusInFlight, no UI), no loading-state toggle. Error cleared only on success so it stays visible + stable during an in-flight retry (no vanish-mid-poll). - Removed limitsLoading/statusLoading: the Refresh buttons are plain-text (no spinner, not disabled); the empty-state guards use hasLoaded* only (no && !loading), so the list area never reflows mid-refresh. +1 regression-guard test (Refresh buttons never surface a spinner). typecheck 0/0, 926 tests green (x2), biome clean, build OK.
2026-06-27feat(concurrency): provider dropdown instead of free-text inputAdam Malczewski
Replace the Add-form provider text input with a <select> dropdown populated from the available models' provider prefixes (<provider>/<model>), unioned with providers already carrying a configured limit (so a limit set out-of-band but whose model list is empty still appears). The selection auto-defaults to the first option and falls back when an option disappears. - logic/view-model.ts: pure providerFromModel + providerOptions(models, limits) (distinct provider ids, first-seen order) + 7 tests. - ConcurrencyView.svelte: models prop + <select> bound to newProviderId; disabled + 'No providers available' when there are no models. - App.svelte: pass models={store.models}; component test updated to the dropdown (selectOptions) + a no-models case (6 component tests). Verified: typecheck 0/0, 922 tests green, biome clean, build OK.
2026-06-27docs(concurrency): expand backend handoff §2j + drop unused importAdam Malczewski
- backend-handoff.md: full §2j slice (API surface, contract note, FE summary, verification, the single-provider GET note, worktree symlink note) + bump the pinned transport-contract version 0.22.0 → 0.23.0 in the header/packages/ mirror/endpoints sections. - ConcurrencyView.svelte: remove an unused ConcurrencyLimitView type import (the type flows via viewConcurrencyLimits' return type; svelte-check clean).
2026-06-27feat(concurrency): add provider concurrency limits UI — settings + live statusAdam Malczewski