b9daa01b4b7d15679cc0ebbc79ec5c441ace2d39
62
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b9daa01b4b |
feat(webui): port the dashboard (Phases 3-5)
Every page from the deleted Preact dashboard, rebuilt in Vue 3 + shadcn-vue.
The navigation restructure landed earlier on this branch; this is the surfaces
behind it, and the two are now one app.
Dashboard, Tasks (list and detail), Configuration split six ways, Logs,
Inspector, Mappings, Bindings, Workflows, Skills, Curators, Channels, chat.
Components, not files: docs/prds/dashboard-port-brief.md requires one
component, one job, one file, with shared state in a module beside it. So a
page file composes and holds nothing, and a shape repeated across panes becomes
its own component (LogRow, PageHeader, PanelLoading, WorkflowBar).
Behaviour that had to survive, because each was a fix:
- Live activity's detail is clamped to one line with the payload on the title.
Unclamped, one row made the dashboard 7,481px tall.
- Each health card takes its own height. Equalising left a mostly-empty box
taking a quarter of the first screen once setup was done.
- Tasks: `tab`/`attempt` live in the query string and are written with
router.replace, so a tab click adds no history entry and does not remount.
The list's deep-link reveal honours prefers-reduced-motion.
- LOG_LEVELS is a wire contract (the server matches that CSV server-side), used
unchanged by both log panes.
- The chat panel's Phase 5 list: a FAB that is the only toggle, a morph whose
scale, radius and position interpolate together, no scrim, no close button,
Escape returning focus to the launcher, Stop only while streaming.
- Unconfigured is not broken. A 501 on /api/version or the log stream renders
what is true ("Not configured on this deployment") rather than blank, and a
read-only Configuration says so instead of offering controls that cannot work.
Three things the port decided rather than carried:
- Button gains an `attention` variant and Badge the five status tones, in the
project's own cva. The pill's dot did not come across: the Badge's shape is
the affordance, and the same tone now covers a trend indicator.
- The icon module is not ported. Its name-to-glyph lookup is the pattern
shadcn-vue's rules call out as wrong, so icons come from @lucide/vue at the
call site. The five bespoke glyphs have no consumer yet and become components
if a page draws them.
- The theme control left the topbar for /system/appearance, per the approved
navigation design. ThemeToggle.vue and Placeholder.vue are deleted rather
than orphaned: every route now resolves to a real page.
Also fixes the bundle freshness check failing on the first build after every
change. ui/dist is committed, so nothing ignores it and Tailwind's content
detection scanned it, making each build an input to the next.
|
||
|
|
5fe25045d1 |
feat(webui): port the dashboard (Phase 3, first page)
The control room, on the primitives from the previous commit. Being the first page it also settles the shape of the rest: shadcn components for chrome, one feature folder per page, Lucide imported at the call site. Carried across deliberately, because each was a fix rather than a layout: - Live activity's detail is cut to one line and clamped again in the cell, so a long unbroken token (a path, a URL, a hash) cannot widen the column past the table. Unclamped, one agent_finish row made the dashboard 7,481px tall. - Each HEALTH card takes its own content height. Matching them was right while both held a checklist; once setup is done that card is a title and a line while Gate pulse carries a gauge and four rows, so equalising them left a mostly-empty box taking a quarter of the first screen. The task links are router paths now, not the `#/tasks` hashes the Preact build used. History routing means a hash is not a route any more, so one that survived here would navigate nowhere. Also in this change: - Button gains an `attention` variant, in the project's own cva. An action that exists because something needs a human has to look unlike one that is always present, and `destructive` would overstate it: nothing is broken, it is waiting. - The setup panel branches on the state machine rather than on "is setup present at all". Guarding on presence showed a 100% checklist with every step struck through where the complete state belongs. |
||
|
|
3d20dde9cb |
feat(webui): port the shared primitives (Phase 2)
The Preact tree's ui/src/base/ was deleted with the dashboard. This rebuilds what depended on it, on the shadcn layer rather than as new bespoke markup. Badge and Card come from the shadcn-vue CLI, so they match the already-vendored components, and the composed pieces sit on top of them: - Badge gains the five status variants the pills used, over the palette's status tokens. The pill's dot did not come across: the Badge's own shape is the affordance, and the same variant now covers a trend indicator, where a dot reads as noise. - base/StatTile.vue uses full Card composition instead of dumping everything into one content slot, with base/Sparkline.vue and the goodDirection logic that says whether "up" is good news. - base/Gauge.vue and base/SegmentBar.vue, both of them: the original exported two components from one file and budget composition uses the second. - base/LogRow.vue over lib/log.ts, which holds the LOG_LEVELS wire contract (the server matches that CSV server-side, so it is not a display choice). - lib/status.ts, so status colour has one home: a task state, a gate result, a log level and a trend all draw from the same five kinds. Two deliberate departures: The icon module is not ported. Its name-to-glyph string lookup is the pattern shadcn-vue's rules call out as wrong, and nothing consumes the five bespoke glyphs anyway: the navigation is text with tooltips. Icons come from @lucide/vue at the call site, and the five become components if a page draws them. The gauge's aria-label announces the rounded percentage. It announced the raw one, so a screen reader read 71.38461538461539% where the screen showed 71% (bead 86au). Also lands the four modules the checklist marks copy-verbatim, which encode bugs fixed just before the delete: dashboard/activity-detail, chat/ command-scroll, workflows/workflow-rows and logs/logs-empty. |
||
|
|
c578a4d6c3 |
feat(webui): land the Phase 1 foundation on the navigation restructure
Two Vue branches were in flight and looked like competing versions of the same change. They were not: this branch had the navigation restructure (Phase 4) and the route table, and the other worktree had the Phase 1 foundation, still uncommitted. Neither had ported a page. This reconciles them. What came across from the foundation: - lib/api.ts, the one client every request goes through, so the CSRF and Content-Type headers live in a single place, plus the four framework-free modules it needs: uuid, stream-state, format, task-meta. - loadTaskMeta() at boot, so /api/task-meta replaces the freeze-dried lifecycle defaults instead of the catalogue being frozen into the bundle. - capabilities.ts keeps the other branch's pure hiddenRoutes, but reads route.meta.section. The other version read route.section, which is always undefined for this route table, so its capability gating was silently dead. The route table stays this branch's: internal/gateway's registry test holds it in parity with the agent-facing page index in both directions, and the other branch's table fails it with seven errors. The frame is Tailwind on the shell, not a ported stylesheet. layout.css described a shell, a topbar and a nav as authored classes, but the topbar is a Vue component like every other surface and emits none of them, so two thirds of that file had no consumer. What the frame needs is now the shell element's own utilities plus the canvas, focus floor and motion preference in style.css's base layer, where a global element rule belongs. Verified equal to the stylesheet it replaces: 20px radius, hairline border, blur(28px) saturate(1.2), and the narrow-screen collapse. Also fixes the bundle freshness check failing on the first build after any change, which had cost both branches of this port a rebuild-and-retry. ui/dist is committed, so nothing ignores it and Tailwind's content detection scanned it, making every build an input to the next: class strings left in the bundle generated utilities for classes nothing references any more, so an unchanged tree built a different bundle. Excluding it also drops ~12KB of dead CSS. |
||
|
|
a1b8008774 |
feat(webui): adopt the violet palette, and give the outlet the viewport
Takes style.css, lib/theme.ts and index.html's pre-paint script from the palette work on worktree-groovy-imagining-widget (73e602a7..72034249), leaving its flat topbar and route table behind. The theme is a data-theme attribute set before the first paint, so a reload does not flash the wrong palette, and color-scheme moves with it. The outlet takes the viewport height below the topbar so an empty state has somewhere to sit. |
||
|
|
82512b84cd |
feat(webui): grouped topbar navigation, built from components
Five top-level items instead of eleven flat ones: Dashboard as a link, then
Work, Agent, Events and System as dropdowns, with each item's one-line
description on a hover tooltip. Configuration dissolves into /system/{status,
appearance,tasks,models,repos,advanced} and /settings redirects to the first of
them, so existing bookmarks still land somewhere. Logs gets a nav entry for the
first time.
The bar is composed from named components rather than one file: Brand (Logo,
BrandName), Nav (NavTrigger, NavGroup, NavItem), SearchBar, SupportLink,
ThemeToggle, ProfileDropdown. The nav model reads the route table, so a route
and its nav entry cannot disagree, and a group whose every child is gated off
is dropped while a group left with one child stays a dropdown.
The Go page registry moves with it, which its parse-the-route-table test
enforces.
|
||
|
|
8c83449cf4 |
feat(webui): history routing
createWebHistory with base "/". The Go server already falls back to index.html for any unmatched path and [web] has no path-prefix option, so the dashboard is always at the root. legacy-hash-redirect.ts rewrites `#/path` links minted before this change. Verified against archie-ui rather than the Vite dev server: /tasks, /tasks/42 and /settings all serve index.html with assets resolving, and #/settings lands on /settings. |
||
|
|
83c939b3df |
fix(webui): self-host Geist, and fold the cross-check findings into the plan
Four review agents checked the bootstrap and the migration checklist against
the deleted tree and the Go handlers. Three found real problems.
The shadcn-vue CLI's default font resolved to a Google Fonts @import. archied
is deployed on LAN-only and air-gapped hosts, where that silently falls back to
a generic sans and makes an admin tool that otherwise has no third-party calls
start making one. Now @fontsource-variable/geist, self-hosted: five woff2 files
in dist and no external URL left in the bundle.
vite.config.ts used __dirname for the @ alias, which Vite 8 already warns is
unsupported under its native config loader. Now import.meta.url. Dropped the
leftover template vite.svg.
The checklist gained what the review found missing, most of it consequential:
- main.jsx was never named as a source, so the jump-to search, the `soon:`
nav treatment, the boot-time task-meta re-render and the route-keying rule
(keyed on path+params but NOT the query, so a tab switch does not remount)
had no home. vue-router needs an equivalent key strategy.
- css/layout.css is 498 lines and holds the shell, the chat dock and morph,
and every breakpoint Phase 5 described only in prose. Named as the source
to port from rather than left to reverse-engineering.
- Six further CSS files carried behaviour with no mapping: focus-visible,
.sr-only, the global prefers-reduced-motion override, and the pill colours
a Badge port has to match.
- Chat's content features -- session switching, persona and model selectors,
inline tool-call rendering -- were absent; Phase 5 described only chrome.
- Configuration's editable-vs-read-only dual mode (503 when the process only
holds a published snapshot) is architecture, not styling.
- Tasks writes tab/attempt state with history.replaceState specifically to
avoid a remount per tab click.
- statTile also exports Sparkline, gauge also exports SegmentBar, and five
icons have no 1:1 Lucide equivalent, so those swaps are design calls.
- LOG_LEVELS is a wire contract matched by splitCSV server-side.
Corrections: the API surface is 48 methods plus two SSE subscribers, not ~45.
Mutations require both X-Archie-CSRF: 1 and Content-Type: application/json,
answered 403 and 415 -- the likeliest silent breakage after the port, now
stated exactly. My claim that a test enforced "no second fetch()" was wrong:
that text-scan was deliberately removed upstream for testing the file's wording
rather than its behaviour. The real guard was per-method header classification,
flagged as the one test worth bringing back first.
The 106px clipping figure is a live measurement and not recoverable from git,
so it now carries the viewport and both edge positions.
|
||
|
|
d933d36449 |
feat(webui): bootstrap Vue 3 + shadcn-vue, replacing the Preact dashboard
Sam owns this codebase and reads Vue fluently, not Preact; a UI its maintainer
cannot read is the liability that outweighs the port. shadcn-vue is Vue-only,
so adopting it means the framework moves with it.
Scaffolded per the official Vite guide: `npm create vite --template vue-ts`,
Tailwind v4 via @tailwindcss/vite, `shadcn-vue init` (Reka UI, Lucide, neutral
base, CSS variables). Button and DropdownMenu are added, the latter being what
the pending navigation restructure needs.
Two deviations from the guide, both forced:
- The guide sets `baseUrl` alongside `paths`. TypeScript 6 deprecates
`baseUrl` and errors on it, and this project is heading for TS 7 native, so
`paths` stands alone and resolves relative to the config file. Not a
downgrade: the scaffold's typescript ~6.0.2 is untouched.
- vite.config.ts keeps `base: "./"` and unhashed asset names. ui/embed.go
embeds a committed dist/, served from a path the build does not know;
hashed names would also orphan a file in git on every rebuild.
The Preact app and its 43 test files are deleted rather than ported, on Sam's
instruction: tests return when there is behaviour worth pinning rather than a
port to re-assert. `task test:ui` is now a vue-tsc typecheck, which is what
would actually catch a broken component; an empty `npm test` would pass
vacuously.
ui/src/router/index.ts carries the route table and is the new source of truth
for TestDashboardPagesRegistryCoversEveryRoute, which parsed main.jsx before.
Keeping that contract alive matters: it is what caught the stale /chat entry
earlier today. Every route resolves to a named placeholder view, so an unported
page is visibly unported rather than blank.
golangci-lint now excludes ui/node_modules. The dashboard toolchain pulls in
`flatted`, which ships a Go implementation beside its JavaScript, and the gate
was failing on complexity in a vendored third-party file.
The shadcn MCP server is registered in the root .mcp.json. `shadcn-vue mcp init`
writes it to the directory it runs in, which for a nested ui/ is a path Claude
Code never reads.
|
||
|
|
da0116f0ba |
fix(webui): stop the UI contradicting itself, and clear the AA failures
Four P1 findings from the audit. Workflows claimed "No workflow runs yet" directly above stage tables listing those runs (archie-core-rcbf). The rows were built from the definition list alone, so a workflow with statistics but no definition produced no row at all. workflow-rows.js now merges both sides: a run is evidence the workflow exists. The producer is also at fault -- /api/workflows returns definitions: [] from the archie-ui composition while the daemon logs a registry of seven -- which also means "Start work" never renders there. Filed as archie-core-3tij. The logs page said "Durable history unavailable" twice and promised live logs from a stream that had stopped (archie-core-c5bz). EventSource fires onerror both for a retry and for a give-up; readyState tells them apart, so a dead stream now reports "unavailable" in red instead of "reconnecting" in amber forever. The toolbar says "Live only" and the empty state carries the explanation, each once. An unconfigured update check (501) now says so on Configuration rather than rendering nothing at all. Contrast (archie-core-umdn). --fg-subtle was 3.37:1 dark and 2.72:1 light, used for every KPI caption and column header; both move to values clearing 4.5:1 on every surface they actually land on, down to surface-hover at 4.51. White on the dark accent was 3.2:1 on the active nav item and every primary button: --accent-fg becomes near-black at 5.96:1 and the accent itself is untouched, since it is also the link colour and reads correctly on the canvas. Swept four routes in both themes: no remaining failures outside elements painted on a gradient, which a compositing check cannot judge and which are white on blue-purple anyway. The HEALTH cards take their own height again (archie-core-1786637500926-421-7c63bcd3). Equalising them was right when both held a checklist; once setup completes, that card is a title and one line while Gate pulse carries a gauge and four rows, so matching heights left a ~400px empty box in the first screen. |
||
|
|
3dfc5394bd |
feat(webui): rehome update and dangerous-action controls to Configuration
Installing a release and approving a gated action are things you do to the deployment, not things you say to Archie. They lived in the chat surface only because that is where they were first built, and in a launcher panel a few hundred pixels wide they crowded out the conversation (archie-core-tf20). Both are new cards in ui/src/settings/operator-cards.jsx, wired into Configuration beside the read-only UpdateStatusCard that was already there. Behaviour is unchanged from the chat panel, including accepting both the capitalised and lowercase checkpoint field shapes the API has returned. A 501 from either endpoint renders no card at all rather than an error: a deployment that does not wire update-checking should show nothing, which is what the dev stack does. Reload Telegram deliberately did not move. It was never an API call -- the old handler sent the "/restart" chat command as a message -- so a Configuration button would have to post a chat message to reach the adapter. It stays as /restart in the palette until the cross-process restart RPC exists (archie-core-ry4k); archie-core-oif3 tracks landing it here afterwards. |
||
|
|
af8ba18068 |
fix(webui): make the chat panel behave like a chat window
Remediation from testing the launcher (archie-core-ifay), plus the morph Sam
asked for.
The panel grows out of the launcher rather than fading in beside it: closed, it
is collapsed to a pill the size of the button and translated over it; open, it
is the full panel. Scale, border-radius and position interpolate together, and
the contents fade in once the shape has mostly arrived, so the button reads as
becoming the panel. The launcher stays visible throughout and is the only
control that opens and closes it, so the panel carries no close button.
- Header shows the open conversation's name; ChatApp owns the header now,
because the title and the actions that change it belong to the same
component.
- New chat became the Lucide message-circle-plus glyph and moved into the
header. Added to the icon set, which is the same 24-grid stroke system.
- The commands accordion is gone. The composer's slash palette was already
the command surface and floats above the input; having both was two
answers to one question.
- Arrow keys scroll the palette so the selection stays visible. The decision
is pure arithmetic in command-scroll.js, including the case of an option
taller than the list, which aligns to its top so the command name is not
the part scrolled out of sight.
- The settings popover closes on any pointerdown or focus outside it.
- Stop renders only while a reply is streaming.
- The composer keeps focus and stays writeable during a send, so the next
message can be typed while one streams. It was `disabled`, which also made
the focus() in the send's finally block a silent no-op. sendMessage already
refuses a second concurrent turn via isSendingRef.
- Composer actions sit at the right of the input row, the resize handle is
gone, and the Enter/Shift+Enter hint is removed.
- Message bubbles dropped their "Archie"/"You" labels; side and colour
already say who spoke.
- Fixed an empty band under the composer: the panel still declared two grid
rows from when the launcher owned the header.
|
||
|
|
1422dc5955 |
fix(webui): make chat a FAB-opened panel and stop the topbar clipping
Four P0 defects from the frontend audit, plus the one-line theme fix that was
making every one of them look worse.
Chat is a floating launcher and the panel it opens, not a route
(archie-core-yuvg, archie-core-hesx). /chat rendered an empty page with a
drawer over it, and that drawer hosted the full-page chat workspace: a page
title, a conversations column, a four-control action row and a command-help
column, all inside 440px. Measured at 1440x900, .chat-workspace was 174px wide
holding 270px of content and the composer ran off the viewport.
- The Chat nav entry, the /chat route and the topbar chat icon are gone;
the launcher is the single way in.
- The panel anchors to the launcher and opens leftward from it, sharing its
bottom edge, so the button never moves. No scrim and no scroll lock: the
page stays readable and clickable, which is the point of asking Archie
about the page you are on.
- Conversations became a switcher in a compact bar; personality, provider
and model moved into a disclosure beside it; the empty state and composer
dropped to panel type scale.
- The launcher renders outside .shell because .shell's backdrop-filter is a
containing block for fixed positioning, which otherwise pinned the button
to the scrolling shell instead of the viewport.
- Update-check, Dangerous actions and Reload Telegram left the panel; their
api.* calls are untouched for the rehome to Configuration
(archie-core-tf20).
The topbar no longer clips its utility cluster (archie-core-mkb3). brand, nav
and topbar-end were all flex:none with no wrap above 1220px, and .app sets
overflow:hidden, so between 1221px and ~1582px the avatar, theme toggle and
documentation button were cut off with no way to reach them. The nav is now
the one region allowed to shrink, the search collapses to its icon below
1500px, and the nav wraps to its own row below 1270px where it stops fitting.
Live activity clamps its detail column (archie-core-qo7f). An agent_finish
payload rendered raw turned one row into six viewports and the dashboard into
7,481px. The cell shows the first meaningful line; the full text stays on the
title.
color-scheme is bound to the active theme (archie-core-nm0y), so scrollbars
and native controls stop rendering light inside the dark UI.
|
||
|
|
2d3e4e59ad |
fix(ui,gateway): load the served lifecycle vocabulary, and make the page registry match the routes (#890)
* fix(ui): make the served lifecycle vocabulary actually load
base/task-meta.jsx documents the backend as the source of truth: /api/task-meta
returns the statuses (label, pill severity, "needs you") and the operator
actions, and loadTaskMeta() replaces the freeze-dried defaults with that
catalog. Nothing called it. Every pill, status filter and action control read
the snapshot, so a catalogue change on the server never reached the browser --
the module's first paragraph was simply not true.
main.jsx now asks for the catalog once at boot, alongside the capabilities read
it already does for the same reason: the shell paints immediately and upgrades a
moment later.
The two vocabularies the dashboard mirrors rather than serves -- FILE_STATUS
(ids owned by internal/domain/workflow/task/changes.go) and CONFIG_SCHEMA
(events.ConfigCapturedSchema) -- are now documented as the deliberate second
tier, with their two-sided pins named, so the tree stops telling two stories
about where a vocabulary comes from. Both degrade to a raw id or the verbatim
payload rather than rendering something wrong, which is why mirroring is
tolerable there and not for a presentation catalog.
RED before (loader never called):
x booting the dashboard replaces the freeze-dried vocabulary with the served catalog
actual: 'custom_status', expected: 'Custom status'
Also repairs a drifted LAW asset. A fresh build of pristine main dirties both
ui/dist/assets/index.css and index.js:
|
||
|
|
b5e9831dea |
refactor(ui): finish the Preact port and delete the imperative DOM layer
The dashboard was a hybrid: a Preact page per route rendered into a shell built by a hand-rolled el() helper. Every route was Preact and the shell was not, which is why nothing failed -- the last of the vanilla layer was the part that composed the app. Removed: - ui/src/base/dom.jsx -- el/append/mount, the unused pill/empty pair, and a statusKind re-export that duplicated task-meta for one caller - ui/src/chat/chat-tools.jsx and the el-based bubble builders in chat-render.jsx: nothing in src/ called them, only their own tests did - the chatPage() DOM bridge, which existed so an imperative shell could embed a VNode Ported: - base/icons.jsx: icon() -> <Icon>; the glyph path table stays data - base/gauge.jsx, base/statTile.jsx, base/log-row.jsx: DOM builders -> components, with inline SVG instead of innerHTML - base/format.jsx: ago/compact, which never were DOM - chat/markdown.jsx: renderMarkdown() -> <ChatMarkdown>, so a streamed reply is diffed rather than rebuilt block by block - main.jsx: shell, nav, jump-to search, theme and chat drawer are one App; pages still render into one long-lived outlet Routing stays wired at import rather than from an effect. A page installs its own hash-sensitive state as it mounts, and task detail writes its tab selection back with replaceState as it settles: if the outgoing page is still mounted when the hashchange lands it canonicalises the URL back to its own route and the navigation is silently lost. The outlet and the two navigation-owned pieces of chrome are published through a callback ref, which runs at commit time, before any page effect. Tests: dom.test.js (el) and chat-tools.test.js are gone. The statTile cases in dom.test.js were not dropped -- they pinned the zero-value headline bug that made fresh installs look broken, and moved to test/statTile.test.js against the component. log-row and chat-markdown render their components. ui/dist rebuilt: index.js 146977 -> 146010 bytes. Closes archie-core-v9gv.2 and archie-core-v9gv. |
||
|
|
51a4177a48 |
fix(webui): remount the task detail page when the task id changes
Code review on this PR: navigating from one /tasks/:id route to another keeps the previous task's data. The router renders pages with Preact's own render() into one long-lived outlet (main.jsx show()), and taskDetailPage returned RunDetail with no key, so the same element was diffed in place and never remounted. Every task-scoped read lives in a useEffect with empty deps and the open tab and pinned attempt are useState initialisers, so all of them ran once for the first task and the new task was rendered against another task's reads: run history, events, open tab, pinned attempt, and the log/change/debug caches. RunDetail's own comment already asserted "the route remounts it when that changes" -- the remount it relied on never happened. Keying by id makes it happen. Keying rather than resetting is deliberate: RunDetail holds 14 pieces of task-scoped state, and a hand-rolled reset must name every one and silently regresses when a fifteenth is added. A remount is exhaustive by construction. Preact 10.29.8 wraps render() in a Fragment and diffs children by key, so a changed root key unmounts and mounts fresh; both regression tests were shown to fail without the key. Tests: component-level (two task ids rendered into one shared host, mirroring the router's outlet) and router-level through the real show() path. |
||
|
|
7414713d61 |
feat(webui): add the per-run task detail page
A per-task page at #/tasks/{id} with tabs for the attempt's stages and log, changed
files, configuration and a raw debug view. Reachable from the task list, deep
linkable via ?tab= and ?attempt=, and reload safe. Existing URLs (#/tasks?task=N
and #/tasks?status=...) are unchanged.
- A stage rail per attempt: name, duration, terminal status and error text, with
unattributed events surfaced and the agent's own verdict shown separately.
- No pass/fail badge and no exit code anywhere: the backend has neither, and a stage
that returned nil after producing a poor diff is a success. Status word, duration
and error text are shown instead.
- The log pane filters by attempt, stage and level, states the coverage caveat for
stage filters (agent and tool output records no stage), and keeps the three read
outcomes distinct: no log reader in this deployment, no file for this attempt, and
no entries matching the filter.
- Retry is labelled as a new run and its confirm says the previous attempt's commits
are discarded, because it hard-resets the branch onto the base.
- An absent capture reads "not captured for this run" rather than implying nothing
changed, and no elapsed-run figure is shown since only per-stage durations exist.
- The events cache is invalidated on retry (it previously kept the ended attempt's
events) and the log cache is keyed by attempt, so two attempts cannot be conflated.
- ui/dist is rebuilt and committed: the gate runs the node tests but never rebuilds
the bundle, so a stale one would otherwise ship behind a green gate.
- docs/prds/task-run-detail.md records the surface and its limits, and
docs/architecture/observability.md describes it alongside the read endpoints.
Both new vocabularies are pinned by tests on each side (config schema, change
statuses) so a one-sided rename fails a test instead of silently degrading the page.
|
||
|
|
3cb3cf7e62 |
feat(ui): download a task attempt's log, and stop blaming a setting for it
The attempt-log panel offered no way to get a log out of the dashboard, and its failure copy asserted that task logging was not enabled for the run. The first is the feature: the panel now links to the download route for the attempt it is showing, so the browser owns the filename the server sets and streams the body to disk rather than the client holding a whole log in memory. The second is the honesty fix. "No log recorded for this attempt" is a fact about the attempt; "this dashboard cannot read task logs" is a fact about the deployment, and only the second is worth sending an operator to a setting for. The panel renders them differently off the response's found/disabled markers. Rebuilds ui/dist, which is a committed asset. |
||
|
|
cb69cf1979 |
fix(ui): unbreak binding approve and the two deletes, and centralise the client
Three dashboard mutations were refused 415 on every use. archied's
authorizeTaskMutation runs before the handler body and answers
"Content-Type must be application/json" unless the request declares a JSON
body -- including when there is no body to send, because that requirement is
what makes a simple cross-origin form post inexpressible. bindingApprove,
mappingDelete and bindingDelete sent Accept and X-Archie-CSRF but no
Content-Type, so approving a binding or deleting a mapping or binding never
worked from the dashboard.
Reproduced against the real handler with the browser's exact headers: 415,
where the same request plus Content-Type returns 200 and arms the binding.
The Go tests missed it because doJSONWithHeaders sets Content-Type
unconditionally, even for a nil body, so no test ever exercised the shape the
client actually sends.
Every api.* method now goes through one request() (and one send()), which
sets Content-Type and the CSRF marker on every mutation rather than only
where a payload happens to exist. The module already claimed to be "the
single place that knows how to talk to archied" while 22 call sites built
their own fetch, headers, timeout and error handling inline and chat.jsx
built a 23rd; that claim is now true, and chat.jsx's stream goes through
api.chatStream so only the URL, headers and failure shape are shared while
chat.jsx keeps its abort/timeout and SSE parsing.
Behaviour deliberately preserved: 204 deletes still parse no body, the
install timeout stays 120s, and 401 still classifies as session-expired. One
intentional change -- a 401 message is now the server's own text ("open the
dashboard URL archied logged at startup") rather than a bare "unauthorised",
since errorMessage already prefers the actionable reason and the classification
is derived from the status either way.
ui/test/api-client.test.js asserts the browser mutation contract for every
method, that reads carry no mutation marker, that a 204 resolves without
parsing, that api.jsx holds exactly one fetch call, and that every api method
is classified by the suite so a new one cannot be added uncovered. ui/dist is
rebuilt, being a committed asset.
I had claimed this work was needed to fix a 401 defect. It was not: all 22 raw
call sites passed res.status to ApiError, so classifyActionError already mapped
401 to session-expired, and chat.jsx never classified at all. The missing
Content-Type was the real defect.
|
||
|
|
801ac1570c |
feat(webui): report which dashboard sections a process can serve
The same dashboard is served by the daemon, which holds every runtime handle, and by the UI process, which holds two remote contracts. A section with nothing behind it still answers -- an empty list, a "disabled" marker, a 501 -- and the browser cannot tell that from a deployment where nothing has happened yet. GET /api/capabilities says which sections this process can back, and the nav drops the rest rather than offering a page that is permanently empty. It fails open in both directions: an unreported section stays visible, and a failed read hides nothing, because an entry that silently vanished is worse than a page that explains itself. Mappings and bindings move the other way. Both are ratified State Store contracts carried by the client the UI process already holds, so leaving them nil degraded two pages that have an owner; compose wires them. A table test now enumerates every route whose capability is daemon-local and pins what it answers without one (requirement 4 of archie-core-8cda.5.4): task logs, the log feed and its stream, version and the update flow, channels and reload, curators, memory, skills, workflows and work requests. Adding a route with no owner now fails that test rather than the operator's browser. |
||
|
|
5288a8d980 |
feat(webui): render configuration from a published snapshot
The configuration page had exactly one source: this process's own config.Holder. The UI process has no holder and is not permitted one, so the page was empty there and the shared-holder assumption was the thing blocking the cutover. GET /api/config now reads a ConfigViewSource. The daemon builds the projection from the configuration it owns, as before, and publishes that same document to the State Store on boot and on every republish -- reload, a dashboard edit, a repository field change -- since those are exactly the moments it changes. The UI process renders what it reads there and nothing else; an unknown schema is refused rather than half-rendered, and nothing published yet is the documented empty response, not an error. Editable is a property of the process, not of the configuration, so each source sets it: the daemon holds the update path, the reader does not. The settings page honours it, rendering values where it would otherwise offer controls whose PATCH would answer 503 -- the deliberate feature reduction archie-core-ymut recorded, made visible instead of discovered by clicking. A failed publish is logged and degrades to a stale page. It must never fail the reload or the edit that produced the configuration, both of which have already taken effect. |
||
|
|
3bb68671b7 |
fix(webui): stretch HEALTH row cards to equal height
Gate pulse and Finish setting up sat in the same CSS grid row, but a block-level .card doesn't fill its grid-stretched wrapper's height on its own -- it shrinks to its own content. With Gate pulse's empty state being much shorter than the setup checklist, its card ended up noticeably shorter than its sibling, leaving dead space below it that read as the content floating uncentered relative to the row. Flexing the wrapper and growing .card to fill it (scoped to .dash-top, not the shared .card rule used elsewhere) makes both HEALTH cards match height while each card's own content keeps flowing from the top. Verified via a static repro using the real project CSS: card heights and bottom edges now match (290.5px/y=343 for both, versus 227px/279.5 vs 274.5px/327 before). Closes archie-core-1786637500926-421-7c63bcd3. |
||
|
|
cc95f854de |
refactor(ui): extract Pill to ui/src/base/, closing archie-core-mlro
Pill was independently duplicated byte-for-byte across 11 files
(tasks, logs, mapping-editor, capture-row, settings, update-status,
skills, dashboard, memory, channels, curators) plus the bindings page
built earlier this session -- a violation of organisation.md's
"extract on the second distinct consumer" rule, predating this
session entirely. Found while building the bindings UI.
Mechanical extraction only, no behavior change: ui/src/base/pill.jsx
is now the single definition; every call site imports from there.
skills.jsx's copy used `class=` instead of `className=` (functionally
identical in Preact) -- normalized to the shared version's className.
captures.jsx's import of Pill (previously re-exported through
capture-row.jsx) now points at the shared module directly.
Verified via task test:ui (120/120 unchanged) and, since this touches
the exact rendering path that had a real app-wide regression earlier
tonight (commit
|
||
|
|
4fa478a2de |
feat(webui): bindings dashboard UI; fix app-wide Preact render regression
Completes t2db.8's remaining UI half. Mirrors ui/src/mappings/ exactly: bindings.jsx (list + editor), binding-editor.jsx (pure StatusPill/ BindingRow), bindings.css, wired into main.jsx's route table with a new icon. API helpers (bindingCreate/Update/Delete/Approve) added to api.jsx following the existing mapping* pattern. CRITICAL FIX, found via real browser verification (AGENTS.md's UI rule), not by inspection: every JSX-based page in this app -- dashboard, tasks, logs, captures, mappings, skills, workflows, memory, curators, channels, settings, and now bindings -- silently rendered the literal text "[object Object]" instead of its content. Root cause: main.jsx's router passed each page's Preact VNode into dom.jsx's mount()/append(), which only knows how to append real DOM Nodes or stringify everything else -- so a VNode object became exactly that string. Confirmed this predates tonight's work entirely: extracted and served the already-committed ui/dist bundle in isolation and reproduced the identical failure on the stock dashboard, unrelated to any change here. Fix: main.jsx's show() now detects a Preact VNode vs. a real DOM Node (the unused `soon: true`/comingSoon() fallback) and calls Preact's own render() for the former, leaving the generic mount() helper and its other four vanilla-DOM call sites untouched. Verified every single page renders correctly post-fix via a throwaway, fully-isolated webui.Server harness (temp SQLite, no real config/forge/network calls) driven by Playwright -- not assumed from the source diff alone. Also found and fixed a second real bug the same way: editing a binding without retyping its secret (the intended "leave blank to keep the current one" UX, matching UpdateBinding's own documented COALESCE contract) was rejected with 400, because the API handler validated edits with the create-time Validate(), which unconditionally required a full-length secret. Root-cause fix: split Binding.Validate() (create, unchanged) from a new ValidateForUpdate() (skips the length floor only when the secret is empty -- preserving the existing one -- still enforces it on a genuinely-supplied new secret). Full state machine (draft -> edit -> pending_approval -> approve -> armed -> delete) verified end-to-end in the browser afterward. Filed archie-core-mlro separately for the Pill component's pre-existing duplication across 11 files -- not fixed here, out of scope for this ticket, following this session's established discipline. |
||
|
|
227cc6bb36 |
test(webui): migrate UI tests to Preact testing library and fix tasks Fragment render
Use @testing-library/preact rendered under jsdom (registered via test/register.js) so the Post-Preact .jsx components and pages are exercised through the real automatic-runtime render path instead of the legacy el() DOM-helper API the tests were written against. - Add jsdom + @testing-library/preact dev deps and a jsdom globals setup in ui/test/register.js (window/document/navigator/getComputedStyle/...). - Switch the .jsx loader hook to the automatic JSX runtime to match @preact/preset-vite, so source files that shadow h (mapping-editor) and Fragment/children arrays work exactly as in the Vite build. - Migrate captures, config-row, mappings, settings-update-status, task-logs, settings-lifecycle, settings-schema, tasks-actions and the chat-app tests to render the Preact components and query the DOM via testing-library. - Fix a real render bug in tasks.jsx: <h.Fragment> is not rendered by the automatic runtime (rows came out as [object Object]); use the imported <Fragment> instead, matching the other migrated modules. |
||
|
|
b6112642db | feat(webui): refactor chat module to Preact component and add unit tests | ||
|
|
ced7bb8038 |
feat(curator): track and expose recent activity per curator
Add a small bounded activity tracker (activityTracker, in internal/domain/curator/activity.go) fed directly from the runtime's existing emitRun point: last-run time, last-run action count, and up to 20 recent actions per curator, newest first. No persistence layer -- it resets on restart, same as the rest of the runtime's in-memory state. Registry.RecordActivity/Activity expose it. Closes archie-core-1786637489932-6-1f803e02. |
||
|
|
61e7fd3068 |
feat(webui): dashboard-aware chat — Archie sees the page, points you there
The web chat is now a persistent slide-over drawer available on any page
(not just the /chat route), and the agent is told which dashboard page the
operator is on so it can point them to the relevant page with a clickable chip.
Backend (gateway):
- Message gains a per-message Page field; the system prompt renders it in
the <env> block (Current page), so Archie knows where the operator is.
- New dashboard_tools.go: a DashboardPages registry plus two web-only tools
— page_index (lists every page and what it shows) and dashboard_navigate
(validates a path, returns {path,label}; rejects unknown/empty paths).
- The web chat sink emits a dedicated navigate stream event when the model
calls dashboard_navigate, independent of ShowToolCalls.
Frontend (webui):
- chat sends currentPage() (location.hash) with each stream request; a
dashboard_navigate result renders as a clickable link chip (href=#/path).
- The chat is mounted once in a slide-over drawer with a topbar launcher,
scrim and Esc-to-close; /chat opens the drawer instead of a second page.
- ui/dist rebuilt (committed) with the bundled changes.
- .gitignore: ignore .impeccable/ (impeccable tool critique snapshots).
New capability (per scope discipline): designed in
docs/prds/dashboard-aware-chat-navigation.md.
Tests: dashboard_tools_test (registry, resolve/reject, web-only gating),
prompt page-line cases, webui Message.Page + navigate-frame capture, and
chat-tools chip tests. task check is green.
|
||
|
|
cf06cd6a08 |
feat(dashboard): render task actions, statuses and filters from the server catalog
Three surfaces stopped keeping hand-synced copies of the lifecycle vocabulary, so a status or action added on the backend shows up without a frontend change: - task actions render label/variant/confirm from taskstate.ActionCatalog via actionFor(); unknown actions no longer vanish behind a hardcoded switch and a new action needs no frontend case - status labels and pill severities come from taskstate.Statuses via statusLabel()/statusKind(); the local copy and the dom.js switch are gone - the status filter vocabulary and the "needs you" grouping derive from statusIds()/attentionStatusIds(); a new status appears in the filter and in the settings page's Work lifecycle card, driven by /api/task-meta Regenerated ui/dist so the embedded binary ships the new dashboard. |
||
|
|
a825db283c |
fix: harden task and chat execution
Task runs now preserve real model context limits, provider usage, baseline-repair spend, commit identity, durable agent-finish telemetry, and useful timeline details without imposing a token cap. Dashboard forge links are canonical per owning GitHub or Gitea identity. Chat turn claims acquire SQLite writer intent before reading, eliminating the concurrent SQLITE_BUSY snapshot race. |
||
|
|
9e89e0cd9e | fix(chat): restore transcript and update replay | ||
|
|
972fb5b8e1 |
feat(deployment): default to managed NATS workers
Autonomous workflows now always hand a complete task to a scoped archie-agent container. Embedded NATS is the default and external NATS changes only broker placement; legacy agent and containers.enabled inputs decode for migration but cannot select an execution path. The daemon flushes task-event subscriptions before a worker can publish, and runtime updates snapshot and restore the configured worker image. |
||
|
|
5d00ec7b0c |
refactor(agentexec): remove legacy execution paths
Autonomous workflows now have exactly one production boundary: a task-scoped archie-agent receives a full-task core-NATS request and runs the worker-local stage loop. The legacy [agent] section remains decode-only for migration; it no longer selects runtime behavior. |
||
|
|
691e10c251 |
fix(telegram): compact tool output and drop turn caps
Render completed ToolCallEvents as Telegram-safe streaming blocks with compact name/status and a short cleaned preview. Summarize file contents and listings instead of dumping source or quoted JSON. Collapse repeated legacy turn-budget failures. Remove max_tokens turn gating and the 200000 turn_budget_chars default so absent or commented config cannot restore an aggregate cap. Keep per-result max_result_chars and spill. Confine find/grep discovery to the active workspace/worktree. Refs #604 |
||
|
|
da5e4e2955 |
feat(webui): surface per-component update status on /api/version and Configuration
The prior two changes gave every component an InstallType/Reference and a way to observe what's actually running (installtype.Type(), daemon.AgentStatus, [nats] config), but nothing consumed any of it -- an operator still had no single place to see whether a component's actual running state agrees with what the update-check command claims. Add GET /api/version: per component, install type, observed running version, the check command's installed/available claims, and a computed status -- ok / update_available / drift / unknown. drift takes priority over update_available (a claim the running system contradicts is worse than a newer release merely existing), and a component with no installed claim at all reports unknown rather than guessing "ok" or "update_available" from a comparison that was never actually made. Surface it as an "Update status" card above the Configuration page's existing config view, sourced independently so its own failure (or a 501 on deployments with no update-check command configured, which renders nothing rather than an error) never blocks the config view that's already there. Closes archie-core-1786751948782-3-837a8fd0.3 and, with it, archie-core-1786751948782-3-837a8fd0 (all 5 design points landed). |
||
|
|
a6e500f6fa |
fix(webui): theme the Workflows 'Start work' form controls
renderStartWork built raw input/select/textarea elements with no CSS class, so they fell back to browser-default white boxes against the rest of the dark theme. Style them like the app's other themed form controls (Configuration's .kv-input). Closes archie-core-w35v. |
||
|
|
aba035a396 |
feat(webui): payload field mapping -- bind JSON paths to named fields, preview before saving
Adds t2db.3: schema-by-example field mapping for the no-code playbook epic. An operator picks a captured event, clicks through its payload to bind named fields to JSON paths, and previews the resolution against a real event before saving -- a missing, null, or type-changed path fails loudly (named by field and event) rather than handing an agent a blank value. - internal/domain/mapping: Mapping/Field types, path parsing/walking, Resolve (per-field failure reporting), Validate (incl. duplicate names) - internal/store/mappings.go: SQLite persistence, mirrors captures.go - internal/webui/api_mapping.go: CRUD + preview HTTP API - ui/src/mappings/: dashboard editor (clickable payload tree, live preview) Design decisions recorded in docs/prds/payload-field-mapping.md. t2db.4 (binding a mapping + matcher to a workflow) is out of scope here. |
||
|
|
b07cb7c312 |
fix(webui): stop the capture live-event notification duplicating payloads into the unbounded events table
Adversarial review of the just-shipped event inspector (
|
||
|
|
a8f9f1b339 |
feat(webui): event inspector -- see captured payloads in the dashboard
Adds GET /api/captures (token-gated, matching the memory/skills enabled-false-not-an-error convention when Server.Captures is nil) and a new dashboard page at /captures listing recent inbound captures, newest first, with per-row expand to explore the redacted payload and headers pretty-printed. Live updates reuse the existing operator-activity event pipeline (Server.emit -> Events.Publish -> the /events SSE stream every other page already subscribes to) rather than polling or inventing new push plumbing: handleCapture now emits a Kind "capture" event with the same field shape the list endpoint returns, so a captured event appears in the inspector without a manual refresh. Frontend follows the tasks/task-row.js precedent: row rendering is split into ui/src/captures/capture-row.js so it can be unit tested without the page's fetch/SSE wiring. "Unbound" is shown for every row today since no binding data model exists yet (t2db.4) -- the column is wired now so that bead only needs to change what it renders, not add it. |
||
|
|
824c53b297 |
fix(webui): scroll selected command into view on keyboard navigation
Arrow-key navigation in the chat composer's command menu updated aria-selected but never scrolled the option into the visible area, so selecting past the viewport with the keyboard left the highlighted item hidden. Mouse scrolling already worked since it doesn't rely on selection state. |
||
|
|
e9bc36e33d |
fix(chat): harden inline tool call streaming
Telegram streaming callbacks now enqueue cancellable rendering rather than performing network I/O while draining the authoritative model stream. Final edit failures fall back to normal split delivery. Completed tool events now correlate inputs by call ID and expose only bounded, conservative parameter shapes. Tool-call visibility is snapshotted per reply so reloads cannot change an in-flight turn. |
||
|
|
06dc034a72 |
feat(chat): show tool calls inline and stream replies into one message
Chat returned only the final answer, so a wrong tool choice, a hallucinated action, or a footgun like `systemctl stop` against `restart` was invisible from the conversation. Only text deltas were threaded through the turn, and tool calls executed inside Generate with nowhere to report. Replace the delta callback with gateway.TurnStream, which carries text fragments and completed tool calls on one ordered path from the model loop to the channel. The sequence is the point: a tool line that overtakes the sentence it interrupted describes a turn that never happened. Text-only callers use gateway.DeltaFunc and are unaffected. A tool is reported on its result, never on its call -- the call part carries no outcome yet, so reporting both would list every tool twice, once with nothing to say. Telegram renders it behind [chat.telegram] show_tool_calls, off by default: this is debugging visibility, and it narrates every internal step to provide it. The dashboard always shows it, being the operator's own observability surface; its tool lines are live-only and are not persisted with the conversation. The Telegram live reply changes mechanism, and with it what a frame MEANS. It used to stream through sendMessageDraft: drafts are ephemeral 30-second previews, so a tool call longer than that outlived the preview, and successive frames were observed concatenated with their cursors intact. It now sends one real message and edits it. An update used to be "the next preview of the answer"; it is now "the whole answer as it currently stands, replacing what is there". The cursor is appended at render time and never stored, so exactly one exists and always at the end, and a frame too long for one message is cut to its tail rather than rejected outright. A stopped or failed turn now edits the cursor away instead of leaving it blinking on a message nothing will finish. That cleanup runs on a live context because turnCtx is already dead, and it runs on both failure branches: ai-sdk raises an aborted stream as ErrAborted with ctx.Err() formatted in rather than wrapped, so errors.Is cannot be trusted to tell a /stop from a fault. Closes #467 |
||
|
|
367637d174 |
fix(webui): cap and centre the Configuration page instead of its lists
The page ran the full width of the shell, so a card was roughly 1300px of which the content used the left third. Every previous attempt fought that inside the card by capping or shrinking .kv-list, which only moved the imbalance around: the lists changed width but the Repositories and Providers tables stayed stretched just as far, and shrinking the lists broke the row separators and the alignment of the Edit column. Constrain the page container instead. One max-width and auto margins on the view fixes every child at once, so cards, key/value lists and tables all sit on the same readable measure and the leftover space falls outside the cards where it reads as margin rather than as a hole. Scoped to this page as .cfg-page rather than added to .page-head, which every other view shares; widening that is a separate decision. This is what `margin: 0 auto` was for. Applying it to .kv-list, which is what I tried first, really would have misaligned each list against its own card heading and against the table beneath it, and I used that to rule the approach out rather than to move it up a level. |
||
|
|
f2eaba2fe1 |
fix(webui): keep Configuration rows full width, hug only the label column
Sizing the whole list with width: fit-content fixed the label-to-value distance by breaking the row: every list ended at a different width, the separators stopped part-way across the card, and no two Edit buttons shared a column. Those are two different knobs and only one of them was ever the bug. How far the value sits from its label is set by the label track; how wide the row is is set by the container. Hug the first, leave the second alone: the label column is max-content so the value starts immediately after the longest label, the value column takes the slack, and the actions column is pinned right. The row spans the card again, so the separators run full width and every Edit lands in one column, while the label-to-value distance stays as short as it was. Verified against the built stylesheet in the dark theme at 1440px: label and value adjacent, locked reasons on their own line, actions aligned across sibling lists. |
||
|
|
7b07033d7c |
fix(webui): size Configuration key/value lists to their own content
The rewrite capped .kv-list at 72rem and left it anchored to the card's left edge, so on a wide screen the rows stopped well short of the card and the action column floated in the middle of the dead space rather than sitting near the value it belongs to. Any fixed cap is a guess that is wrong at some viewport: too wide and the actions drift away from the value, too narrow and paths truncate for no reason. Size the list to its children instead -- width: fit-content, bounded by max-width: 100% so a pathological value clamps and lets the ellipsis take over. Not centred with margin: 0 auto. These lists share cards with full-width tables (Models & providers has both), so centring would misalign every list against its own card heading and against the table directly beneath it. Sizing to content required moving the columns off the row and onto the list. Each .kv was previously its own grid, so no row could size a column against any other row, and a max-content label track would have ended at a different x on every line. The list now declares the tracks and each row adopts them with grid-template-columns: subgrid, giving one shared label column sized to the longest label and no wider. A @supports fallback keeps the previous bounded-column behaviour where subgrid is unavailable, and the narrow-viewport rules drop out of subgrid because a shared label column is the wrong shape once the row stacks. Verified by rendering the built stylesheet against representative markup rather than by inspection: label and value adjacent, notes on their own line, actions in a reserved column, no dead space. |
||
|
|
fb7fba4232 |
fix(webui): rebuild the Configuration page layout so values stop colliding
The page had three compounding layout faults, all visible on a wide
screen and all still present after the earlier spacing pass:
1. .cfg-row used justify-content: space-between on a full-width card,
so the label sat at the far left and its value at the far right with
roughly a thousand pixels between them. Reading one pair meant
tracking across the viewport. The earlier "tighten KV row spacing"
change reduced vertical padding only, which is why the complaint it
was meant to answer survived it.
2. .cfg-value had no min-width: 0, so a long value could not shrink
inside its flex parent. It overflowed into the Edit button, which is
why 400 rendered as "40" and 100000000 was clipped mid-number.
3. The locked-row reason was a flex sibling of that overflowing value,
so it ran onto the end of the path with no separation, rendering
".../archie/work" and "pins the daemon's working layout" as one
unbroken string.
Replace the flex row with a three-column grid: label, value, actions.
Label and value are adjacent and left-aligned so the eye travels a fixed
short distance at any viewport width; the value column is minmax(0, 1fr)
so it can actually shrink, truncating with an ellipsis and keeping the
full text in a title attribute; actions occupy a reserved column that
nothing can overlap. Secondary text (locked reason, override marker,
validation error) gets its own grid row instead of sharing the value
line. Narrow viewports stack label over value rather than truncating
both to a few characters.
Extract the row renderer into settings/config-row.js. settings.js
imports its own stylesheet, which the node test shim cannot parse, so
the rendering logic was untestable where it sat; this mirrors
tasks/task-row.js. Seven tests now cover the two collision bugs
structurally, asserting on per-child text rather than the row's
flattened string so a future layout change cannot pass by merging the
fields back into one node.
Also stop sharing .cfg-rows with the Workflows "Start work" form. A
class owned by the Configuration page meant restyling Configuration
could silently restyle that form; it is now .wf-form, owned by the
feature that uses it.
|
||
|
|
a92d77696c | Merge branch 'main' into feat/348-config-editing | ||
|
|
664197b43b |
fix(webui): tighten configuration KV row spacing
Each row in the read-only configuration view was ~45px tall but the text was only ~20px — empty space outweighed content by ~2:1, making the page hard to scan. The combined effect of `gap: var(--sp-2)` on the flex container and `padding: var(--sp-2) 0` on each row doubled the breathing room. Tables on the same page (Repositories, Providers) already use the target density; configuration rows now match them. Scope the override to `.cfg-section` descendants because the Workflows "Start work" form reuses `.cfg-rows` for its input fields (form.cfg-rows, no .cfg-row children) and would otherwise lose its 8px inter-field gap. The form is unaffected: the override only matches when an ancestor carries .cfg-section. Rows go from ~45px to ~25px, with the border carrying the visual rhythm instead of doubled padding. |
||
|
|
171e1b2686 |
feat(config): surface overlay state, shadowed keys, and per-row reset
Three gaps closed, all in the 'your change didn't take effect and nothing told you' family: 1. MaxRetries joins the reloadable allowlist, and the criterion is fixed on reloadableFields: a field is reloadable when EVERY consumer re-reads it. MaxRetries is the worked example -- its only consumer is the webui maxRetriesFor handler, which re-reads per request (api_tasks.go:380,383); nothing in the daemon reads it, so warning 'requires restart' was spurious. Chat.Telegram.TokenEnv is documented as the counter-example (webui reads it per request but a startup-built telegram bot consumes it, so it is not reloadable). Pinned by TestChangedNonReloadableFields alongside the comment. 2. Boot-time overlay degradation is now surfaced. config.ReloadStatus gains OverlayUnavailable; main.go records the reason when the overlay store cannot be opened or its values fail validation, and /api/config carries it (merged into LastReload). Cleared by a successful dashboard write or reset. The settings page renders a warning banner, so a daemon running on file config alone says so where the operator is looking, not only in logs. 3. Overlay-shadowed file edits are visible and recoverable. ConfigView.Overridden lists the dotted keys the runtime overlay currently sets, so the UI marks those rows (their file value is shadowed until reset). POST /api/config/reset exposes the store's Delete as a per-row reset: it deletes the row and republishes file + remaining overlay, which is also the answer to 'my file edit isn't taking effect'. The dashboard can now remove every override it can create. Verified: task check clean; -race clean on cmd/archied, webui, infrastructure/configuration; new handler tests cover the reset 200/400/503 paths and the overridden list. |
||
|
|
fa8a0d6d02 |
feat(webui): inline config editing on the Configuration page
The dashboard's Configuration page can now change runtime-tunable settings without hand-editing TOML (issue #348). Scalar rows get an Edit affordance; Save PATCHes the dotted key to /api/config, which validates the materialised config before persisting to the runtime overlay and republishing. Per the design constraints: - Structured values (repositories, models, providers -- arrays and maps) render read-only with no edit affordance; they are not faked as editable. - Denylisted keys (db_path, work_dir) render explicitly disabled with the server's reason from the ConfigView.locked map, instead of a row that silently lacks an Edit button. - Bool fields edit via a select, ints parse client-side so a typo fails before a round trip, durations and strings pass through to the server which validates them. The server's error text is shown inline on a rejected save (validation failure, denylist, disabled overlay). - Enter saves, Escape cancels, Cancel restores the row. api.configUpdate PATCHes /api/config with {updates: {dotted.key: v}}. Verified: task check clean; 23 node tests pass; dist rebuilt and committed in the same change. |