summaryrefslogtreecommitdiffhomepage
path: root/src/features/heartbeat/ui
AgeCommit message (Collapse)Author
2026-06-29feat(heartbeat): add inactiveOnly checkbox (skip fires while workspace is busy)Adam Malczewski
Add the frontend UI for the backend's per-workspace heartbeat `inactiveOnly` setting (default on): when on, the heartbeat skips a scheduled fire whenever the configured workspace has any active agents (a conversation whose status is "active" or "queued"); it stays quiet while the user is actively working and only fires when the workspace is idle. When off, the heartbeat fires unconditionally on every interval (the pre-existing behavior). Contract (backend handoff: notes/heartbeat-setting-handoff.md): - GET /workspaces/:id/heartbeat now includes inactiveOnly: boolean - PUT /workspaces/:id/heartbeat accepts a partial { inactiveOnly?: boolean } (absent = unchanged; explicit false = opt-out; non-boolean → 400) The heartbeat shapes are FE-owned locally (consumer-defines-port — not in @dispatch/transport-contract; verified the mirror has no heartbeat symbol), so this is a FE-local type + view-model + UI change — no pinned file: dep bump or .dispatch mirror regen needed. The network seam (store.svelte.ts) needed no change: setHeartbeatConfig already JSON.stringify's the patch verbatim and normalizes the response via normalizeHeartbeatConfig (now producing the field). Implementation (pure core / injected shell): - types.ts: inactiveOnly on HeartbeatConfig + HeartbeatConfigPatch - view-model.ts (pure): inactiveOnly in HeartbeatFormState; formFromConfig/ emptyForm/patchFromForm/formDiffers carry it; normalizeHeartbeatConfig coerces with `d.inactiveOnly !== false` (default ON — mirrors the backend config-store deserializer; only explicit false opts out, so a legacy config persisted before the field reads back as true) - HeartbeatView.svelte: a checkbox (default checked) "Only run when idle" as the first config section, save-on-change (mirrors the enable toggle): a partial PUT { inactiveOnly } on toggle; a failed save reverts + surfaces the error inline Tests: new HeartbeatView.test.ts (renders checked/unchecked, partial-patch PUT, failed-save revert); view-model.test.ts form/normalize/diff coverage; updated PromptEditor.test.ts + store.test.ts echo fixtures for the new required field. Verification: typecheck 0 errors; test 1133 passing (stable x2); biome clean; build succeeds. Live read-only check: the running main backend (not the feature worktree backend) has no inactiveOnly yet; the FE's defensive default renders the checkbox checked and degrades gracefully — no crash. No backend was booted by the agent. backend-handoff.md §2l records the consumed contract + FE status.
2026-06-27feat(vision): resolve persisted image URLs against the API baseAdam Malczewski
Images are now stored on disk under tmp (not SQLite) and served via GET /images/:conversationId/:imageId. Persisted ImageChunk.url is a compact relative HTTP path (/images/<conv>/<uuid>.png) instead of a base64 data URL. No wire/transport-contract type change (behavior only) — re-mirrored the delta notes. - New pure resolveImageUrl(url, apiBase) helper (core/chunks/image-url.ts, +8 tests): data/absolute URLs pass through; relative paths are prepended with the API base (no double slash; empty base -> root-relative). Exported from core/chunks + re-exported from features/chat. - ChatView: new apiBaseUrl prop; <img src> uses resolveImageUrl. The optimistic echo's data URL passes through; persisted relative paths resolve against the base. +3 tests. - AppStore exposes httpBase (getter); App.svelte passes apiBaseUrl into ChatView and the heartbeat RunModal (also renders image chunks). Verification: svelte-check 0/0; vitest 959/959 (run twice, +11); biome clean; vite build OK. See backend-handoff.md §2j-update-2. Not merged or pushed.
2026-06-27Merge branch 'dev' into feature/heartbeatAdam Malczewski
# Conflicts: # src/app/App.svelte # src/app/store.svelte.ts # src/app/store.test.ts # src/features/workspaces/ui/WorkspaceCard.test.ts
2026-06-27feat(heartbeat): show next heartbeat timer + backend handoff for timestamp ↵Adam Malczewski
endpoint
2026-06-26fix(heartbeat): hide runs loading state to prevent sidebar flickerAdam Malczewski
2026-06-26fix(heartbeat): PromptEditor save not persisting — flickers and revertsAdam Malczewski
2026-06-26feat(heartbeat): default system prompt to workspace default + reset buttonAdam Malczewski
2026-06-26fix(heartbeat): make PromptEditor modal truly fullscreenAdam Malczewski
2026-06-26feat(heartbeat): prompt editor modal + hours/minutes timer + backend handoffAdam Malczewski
2026-06-26feat(heartbeat): heartbeat view with config, run list, live chat modal, and ↵Adam Malczewski
sidebar wiring