summaryrefslogtreecommitdiffhomepage
path: root/src/app
AgeCommit message (Collapse)Author
2026-06-07feat(tabs): extract TabBar component with horizontal scroll + sticky end '+'Adam Malczewski
Move inline tab-bar markup from the composition root into a thin presentational TabBar in the tabs feature (feature-as-a-library: pure reducer -> reactive store -> UI). Adds overflow-x scroll (min-w-max strip) and a sticky right-pinned new-chat '+' that floats over scrolling tabs. Draft-on-select / create-on-send behavior unchanged.
2026-06-07fix: optimistic user message echo + tabs persistenceAdam Malczewski
Bug 1 (sent message didn't appear until turn end): the transcript only folded assistant AgentEvents, so the user's own message showed only after turn-sealed resync. Add core/chunks appendUserMessage() (provisional user chunk, superseded on history sync) and call it in chat send() — the message now renders instantly. Bug 2 (tabs didn't persist on refresh): the app passed { storage: undefined } to createLocalStore, which the adapter treats as a no-op store, so nothing was saved. Default to globalThis.localStorage. Regression test exercises the non-injected path. Also updated app store tests for the echo (assistant-vs-user chunk filtering). Verified: svelte-check 0/0, vitest 288 (stable x2), biome clean, build ok.
2026-06-07Slice 3 wave B: tabbed multi-conversation app + model selector (DaisyUI)Adam Malczewski
- store.svelte.ts: tabs store over injected localStorage; one chat store per conversation (Map); single WS routes chat.delta/error by conversationId; draft (null active) mints a conversationId and becomes a tab on first send (title from deriveTitle); GET /models catalog; default model flash; close tab = dispose + cache.delete (local forget) + neighbour activation; restore tabs from storage + load() on construct - App.svelte: DaisyUI tab strip (+ / close), model selector, chat, surfaces - AppStore: tabs/activeConversationId/activeChat/models/activeModel + send/selectModel/newDraft/selectTab/closeTab; +localStorage inject opt Verified: svelte-check 0/0, vitest 281 (stable x2), biome clean, build ok.
2026-06-07fix: blank page on non-localhost HTTP (secure-context crypto.randomUUID)Adam Malczewski
crypto.randomUUID() is secure-context-only — undefined on plain-HTTP non-localhost origins (e.g. http://arch-razer:24204), so createAppStore threw during mount and nothing rendered. Add src/app/uuid.ts randomId(): prefer crypto.randomUUID when present, else build a v4 from crypto.getRandomValues (available in insecure contexts), else Math.random fallback. Use it for the conversation id. Verified: svelte-check 0/0, vitest 221, build ok.
2026-06-07Slice 2 wave 3: wire chat end-to-end at the composition rootAdam Malczewski
- app/store.svelte.ts: one WebSocket carries surfaces AND chat (onChat -> chatStore.handleDelta); build the conversation cache over the IndexedDB adapter; createChatStore wired to transport (socket.send), injected HTTP historySync, and the cache; load() on construct - app/resolve-http-url.ts: host-relative HTTP base (port 24203), mirrors resolve-ws-url; injected fetch - App.svelte: render ChatView + Composer alongside the surface picker - createAppStore gains optional injection points (httpUrl/fetchImpl/indexedDB/ conversationId) for tests - vitest-setup.ts: fake-indexeddb/auto for jsdom IndexedDB (orchestrator-owned config; agent change adopted) Verified green (x2, stable): svelte-check 0/0, vitest 218, biome clean, build ok. Slice 2 (conversation transcript: cache + delta streaming) feature-complete.
2026-06-06Slice 1 follow-up: component-render interaction tests (CR-1/CR-2)Adam Malczewski
- vite: add @testing-library/svelte's svelteTesting() plugin so component render()/mount() resolves Svelte's browser build under vitest/jsdom - dep: @testing-library/user-event for realistic interaction tests - app: 7 component-render tests driving App.svelte through a fake socket (catalog render, subscribe-on-click, unsub/sub ordering, aria-current, error banner, action invoke) Verified green: svelte-check 0/0, vitest 91 passed, biome clean, vite build ok.
2026-06-06Slice 1: surface system + WS transport + composition rootAdam Malczewski
Pure-core feature libraries assembled at the composition root: - core/protocol: pure reducer over surface catalog/spec/error messages - features/surface-host: generic field-kind interpreter (toggle/progress/ selector/stat/button) + pure plan logic; no surface-id special-casing - adapters/ws: injected WebSocket client (effects at the edge) - app: composition root store (Svelte 5 runes over the pure reducer), host-relative surface WS URL resolution (resolveWsUrl), root App.svelte Verified green: svelte-check 0/0, vitest 84 passed, biome clean, vite build ok.