The first cut grouped consecutive same-kind events, but the real noise
shape is an interleave: one background cycle emits curator_run,
session-memory and curator_action events carrying the same payload, and
kind-keyed grouping left them all visible. The grouping key is now the
rendered detail plus the task, so one cycle of noise collapses to one
row regardless of which internal kind emitted each event, while events
carrying different information never merge. Verified against a live
daemon: 50 background events collapse to one expandable row.
The feed's 50 raw events were dominated by consecutive same-shape
background rows (session-memory cycles, runner calls), which buried the
milestones the dashboard exists to surface. Consecutive events sharing
one label and one task now collapse into a group row with an xN badge;
expanding it reveals its events in place. The grouping is consecutive,
not global, so interleaved kinds keep their order and a milestone is
never merged with an event that merely shares its kind.
The projection is a pure view over the store's raw stream (activity-group.ts,
table-tested); the store keeps every event. Group rows keep ActivityRow's
link contract, and the disclosure button is stop-propagated inside the
first cell so it never fights the row-level link.
The three recovery tools now carry a required `confirm: true`, rejected before
the API is touched when absent. It is a deliberate-action signal, not a
security control -- an agent can pass it trivially, and the module header says
so. Its value is making the model state intent rather than reaching for a
mutation mid-sentence.
The module headers also record two things this work learned the hard way: the
API's three string/object shape traps (inputSchema and executeTool's input and
result are JSON strings, not objects), and the advisory status of the
annotations -- Chrome 152's getTools() reports only readOnlyHint and
untrustedContentHint and drops consequentialHint, and a page-invoked
executeTool gates nothing. Nothing here is enforced by the browser. The tools
run in the signed-in operator's session and cannot exceed that operator's
rights; that is the security model.
Register the dashboard's own tools with document.modelContext so an in-page
agent can read tasks, events, and daemon health, and recover a stuck task:
list_tasks, get_task, recent_events and daemon_health (read-only), plus
retry_task, stop_task and cancel_task (consequential). The human review gate
(approve/reject) and the destructive verbs (abandon/archive) are deliberately
not exposed.
Every tool calls the same ui/src/lib/api.ts client the interface calls, so the
agent and the UI exercise one set of endpoints, one CSRF header and one error
shape. Registration is framework-agnostic (lib/webmcp.ts machinery,
lib/webmcp-tools.ts list, lib/archie-webmcp.ts the api binding) and no-ops when
document.modelContext is absent, which it is outside the WebMCP origin trial.
Tools returning agent, operator or inbound content carry untrustedContentHint;
only the recovery actions carry consequentialHint.
Verified in system Chrome 152 with --enable-features=WebMCP: seven tools listed
with schemas and annotations, all four read-only tools executed against the live
dashboard, and the flagless run mounts the dashboard with no exception.
An unauthenticated document request answered with a plain-text 401 -- and
index.html, the bundle and every asset sit behind requireToken -- so a
bookmarked or bare URL was a dead end: the dashboard's own authentication
banner could never load to explain it. Document requests now get a
self-contained 401 page whose one-field form reuses the ?t= exchange, so a
pasted token sets the cookie and the redirect lands on the dashboard. A
rejected token re-renders the page with the reason instead of answering a
document with text.
API and event-stream callers keep the plain-text 401: classifyActionError maps
it to "session-expired", and an EventSource error body is never seen.
The auth banner gains a Retry that re-runs the reads which report their own
401s, so a recovered session clears it without a document reload. The retry is
extracted to lib/session-retry.ts with an in-flight guard and unit tests.
Inspector, Bindings and Mappings were three sibling destinations in a
dropdown, for what is one chain read in order: an event, the mapping that
names its fields, the binding that decides what runs. They are now three
tabs on /events, and the bar carries Events as a link rather than a menu
with one child sharing its name.
The navigation entry is always live and the tabs prune themselves: each is
a separate capability, so a composition that can back only some of them
still reaches the ones it can, and an unreported section stays visible.
Which tabs exist, and which one is showing, lives in tab-selection.ts and
is unit-tested without a browser; the page owns the components and the
address bar. The old paths survive as bookmarks that redirect to their tab,
so a link or a learned URL still lands somewhere that works.
Three pages become tab panels: they lose their page-level headers -- the
page names the page -- and keep their own actions in a right-aligned row.
CapturesHeader.vue is absorbed into the Inspector panel, which is where its
stream status belongs.
The control-plane descriptors now derive a JSON Schema from the Go type of
the document they describe (6ba10c0b), and nothing consumed it: the editor
rendered dashed keys, guessed no format, and synthesised a new row from a
literal skeleton per array path.
A pure reader (settings/resource-schema.ts) resolves the schema node for an
editor path -- nested keys, array items, and a keyed collection's
additionalProperties -- and the editor uses it for labels (title ahead of
the dashed-key fallback), a duration placeholder, a hint when the schema
carries prose, and the shape of a new row. A descriptor with no schema, or
one describing nothing, renders exactly as before.
Deletes ControlPlaneResourceCard.vue: 121 lines, zero references, the
abandoned schema-driven card and the only other consumer of schema_json.
The settings page now reads apply status beside each resource: every known
process with the version it applied, its error if it rejected the edit, and
whether it is still reporting at all. It re-reads after each save, so the page
reflects what the processes did with an edit rather than what was stored.
The server derives liveness only, because it knows whether a record went stale
but not which version the page is showing. The client compares against the
resource it is rendering, which is what turns a live record on an older
version into a pending restart.
A process that stopped re-stamping and one that never reported are separate
rows with separate wording, and neither is an error: the setting may be fine
and the process simply absent, which an operator acts on differently. A failed
apply-status read leaves the previous rows rather than taking the settings
page down with it.
state-store-contract.md gains the pair in its inventory and its count moves
from 45 to 47, with the note that this read is a list rather than the
config-snapshot pair's found=false singleton.
Closes archie-core-pskb.
The Web UI and messaging channels now read and write Archie's runtime
settings through one versioned, audited control-plane API hosted on the
State Store's existing gRPC server: catalog, query, command, watch. Each
feature owns its resource, validation and commands; storage only writes
versions and audit records.
Workflows move with it. Definitions become portable YAML compiled through
a closed, typed step registry and stored as a control-plane resource, so
the yaegi interpretation paths (internal/gate, wfeval, wfextract,
gateeval, gateextract, skillbuild) are deleted rather than carried.
The UI process reads definitions as data: the JSON projection lives in
internal/domain/workflow/task so a dashboard decodes the stored
collection without linking the workflow engine, which cmd/archie-ui's
deletion gate forbids. Shipped definitions ride the catalog descriptor
rather than a bespoke REST route, keeping the API to its four operations.
archie-messaging gains -state-store-target/-state-store-token and reads
channel settings from the database, failing closed when the State Store
is unreachable: the database is authoritative for those settings.
Posts to /webhooks/capture/{source} with a realistic GitHub, Sentry, form or
large payload (or an exact body), reads the capture back so a silent drop is
visible immediately, and names the intake's rate and size limits when it
hits them. Wired as task webhook:send.
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.
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.
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.
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.
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.
* 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: 10e7d030 (#889, memory unification slice
5) changed ui/src without rebuilding ui/dist, and task check runs task ui --
which repairs dist instead of verifying it -- so a stale dist is invisible to
the gate. Rebuilding here restores the invariant; a dist-freshness gate is filed
as follow-up.
* fix(ui,gateway): restore the search focus the port dropped, and the page registry truth
An adversarial review of the port (b5e9831d) found three things worth acting on.
1. Topbar search -- a regression the port introduced. The el() version focused
the input when the narrow-layout toggle opened it, and blurred it after a
successful jump; the port kept neither. That layout hides the field with
width:0/pointer-events:none until .is-open or :focus-within, so without
focus() the caret was not in the field the operator had just opened, and
without blur() :focus-within left it expanded across the topbar after the
jump. Both calls are back, with the ref they need.
2. dashboard_tools.go advertised a page that does not exist and omitted two that
do. The registry calls itself "the single source of truth for what the
dashboard exposes", but it is a hand-copy of the route table in
ui/src/main.jsx: /memory stayed after the page was deleted (that deletion
also left ui/dist stale -- archie-core-1vhh), and /bindings and /curators
were never added. So the agent could hand the operator a chip to a route that
now falls back to the dashboard, and could not answer "where do I go for
playbook bindings?".
3. TestDashboardPagesRegistryCoversEveryRoute did not test that. It asserted
three hardcoded paths and passed while the registry listed a deleted page. It
now reads the route table back out of ui/src/main.jsx and compares in both
directions, which is what makes the registry's claim holdable. RED before:
route "/bindings" is a dashboard page the registry does not list, so the agent cannot point at it
route "/curators" is a dashboard page the registry does not list, so the agent cannot point at it
registry lists "/memory" (Memory), which is not a dashboard route: the agent would send the operator somewhere that does not exist
Also deletes the dead .chat-page rules the deleted chatPage() bridge left
behind: nothing renders .chat-page any more (chat.jsx renders
.chat-page-content, and the drawer sizes it from layout.css).
Not changed: the unreachable `soon` path, which predates the port and was
reported rather than acted on.
* fix(build): verify ui/dist is fresh instead of never looking at it
ui/dist is committed because the Go build embeds it, so it is a generated
source file. Nothing in the gate read it: task check does not run task ui, and
nothing else compares the bundle with ui/src. So when 10e7d030 (#889) changed
ui/src without rebuilding, the committed bundle went on serving the Memory page
whose source had been deleted -- with the gate green throughout.
task ui:check (tools/uidist.sh) rebuilds into a temporary directory and compares,
never rewriting the committed artifact. That is the rule docs:check already
states for the contract reference -- a gate that silently rewrote the artifact
would bless an unintended change with no reviewer ever seeing it -- and it
matters more now that several agents work in their own worktrees, where each
could otherwise pass while producing a different bundle.
Evidence:
fresh tree exit 0, matches
hand-staled bundle exit 1, names the differing file
the #889 drift replayed exit 1, names BOTH index.css and index.js
(pre-#889 bundle, post-#889 sources)
git status after a run unchanged: the check never writes ui/dist
Cost: ui:check declares ui:deps like ui and test:ui do, so the gate runs npm
install once per dependent. Task's sources/generates up-to-date check does not
apply to a node_modules directory (measured: it ran on every invocation), so the
target does not claim otherwise; guarding that is follow-up work.
Gate: task check exit 0, UI suite 230/230, all Go packages ok.
* fix(ui): make the served vocabulary reach an already-painted page
Greptile's finding on the first cut of this fix, and it was right: loadTaskMeta()
resolves after a page has painted and only mutated module state. The route tree
renders into its own root, so App re-rendering cannot reach it, and a painted
page kept the freeze-dried labels it read on the way up.
show() is split so the page render can be repeated on its own: renderRoute()
mounts the current route into the outlet without the teardown/chrome side
effects, and the catalog effect calls it once the catalog lands. The key is
unchanged, so Preact re-renders the mounted page in place and keeps its state.
Deeper instance of the same defect, found while fixing that one:
task-filters.jsx captured the vocabulary in module-level constants at import
(ATTENTION_STATUSES/TASK_STATUSES), so the task filter could never see a served
status, no matter when or how correctly the catalog landed. Both are read at
call time now.
Tests, and what they actually cover:
- the task-filter test has teeth: with the source fix stashed it fails, with
the fix it passes.
- task-meta-late-catalog.test.js guards the boot fetch end to end (it fails
when loadTaskMeta is never called), but it does NOT isolate the re-render:
a page also re-renders for its own reasons, so the assertion holds without
renderRoute too. Said plainly here rather than implied as coverage -- the
fix makes the re-render deterministic instead of incidental, and this
harness cannot tell those apart.
- it lives in its own file because main.jsx boots once per process; a second
test in the same file would assert against a detached tree.
UI suite 232/232, task check exit 0.
Deletes internal/memory (Manager, builtin.Provider, memory_edit tool) now
that slices 2-4 built the CRUD engine family and its per-turn read/write
seams. Also deletes internal/infrastructure/memory/builtin/provider.go (the
memory_edit adapter over the old package -- its markdown store already
relocated in slice 2), internal/tools/provider/memory (the old tool
registration, redundant with slice 4's memory_create/update/delete/list),
config.Memory.{Provider,ProviderConfig} and the validateMemory rejection
that existed only to complain about Provider, and webui.MemoryStatus/
MemoryProviderHandle plus its dashboard page -- never wired in production
(s.Memory was always nil), confirmed by /api/capabilities always reporting
"memory": false.
Rewrites ARCHITECTURE.md's "Memory engine family" section to describe the
current engine (internal/domain/memory contract, internal/infrastructure/
memory builtin engine + its builtin/ markdown store, the per-turn read seam
in gateway/turn_memory.go, the per-turn write tools in
gateway/turn_memory_tool.go) instead of the deleted Manager. Fixes two
docs/architecture/configuration.md rows that described the deleted
manager's literals and SaveConfig mechanism.
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.
Five files survived the Preact chat cutover with no production consumer:
- ui/src/chat/chat-view.jsx, chat-catalog.jsx, chat-panels.jsx: zero importers
anywhere in ui/src or ui/test.
- ui/src/chat/chat.html: referenced only by chat-view.jsx, itself orphaned.
- ui/src/chat/chat-stream.jsx: imported only by ui/test/chat-markdown.test.js.
Its updateStreamingReply helper swaps a rendered Markdown node into the DOM --
the imperative hyperscript pattern the Preact port replaced.
Corroborating evidence that these were already outside the build graph: a full
"task ui" rebuild after deleting them produced NO change to the committed
ui/dist bundle, so tree-shaking had already excluded all five.
ui/test/chat-markdown.test.js loses only the case that exercised the deleted
module. Its two renderMarkdown cases stay, because renderMarkdown is live --
ui/src/chat/chat-render.jsx and chat.jsx both call it.
Not touched: chat.jsx, chat-render.jsx, chat-retry.jsx, chat-state.jsx,
chat-tools.jsx, chat-update-status.jsx, markdown.jsx -- each still has at least
one importer, so none of them is an orphan.
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.
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.
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.
Six tests asserted on the wording and formatting of source and config files
rather than on behaviour: four injected text into fixtures and checked that a
regex noticed, and two asserted on api.jsx's contents. They break on an extra
space, a newline, a rename, or a comment that merely mentions the token -- the
single-fetch check had already false-positived on a comment, and I patched it
with a comment-stripper instead of deleting it. A test that cannot tell "the
code is wrong" from "the file is formatted differently" tests the wrong thing,
and the maintenance cost is permanent.
Deleted: tools/contractaudit/negative_test.go in full, and the source-scanning
"api.jsx holds exactly one fetch call" check with its stripComments helper. The
dashboard suite still asserts the browser mutation contract behaviourally, per
method, by inspecting the request each one makes -- which is where the real
defect was found. 142 UI tests pass; the 45 methods remain fully covered by the
two inventories and the completeness check.
The tool's own decoding is now testable without a file: parseDeclarations takes
an io.Reader, so its rules are exercised with in-memory input, and only the
absent-file branch still touches a path (which is never created).
contractaudit is no longer part of task check. Its surfaces are discovered by
scanning source text, so a rename or reformat elsewhere can change its output
with nothing actually wrong -- it reported 16 live routes as unconsumed once,
when the dashboard's request helper was renamed. A check that can fail for
reasons unrelated to what it measures must not be able to break a build. It now
matches tools/reachaudit: advisory, run by hand, --strict available on request.
Also removes five unused indirect requires from tools/go.mod (go mod tidy).
They were residue from the reflection-based first implementation of the RPC
scan, which was replaced by text scanning without tidying. -mod=readonly cannot
catch a superfluous require, so nothing would ever have found them.
Rewrites docs/prds/contract-conformance-audit.md, which claimed RPC coverage was
derived by reflection over the exported client type -- it never was -- listed
surface sizes of 43/12/52 against real counts of 45/21/49, described three
classification classes where the code has four, invented a five-surface Shape
with files that were never written, and blamed raw fetch calls for a 401 defect
that did not exist. Each false claim is now recorded in an errata section rather
than quietly dropped, and the document states plainly that the audit has found
nothing actionable: the 415 refusals and the duplicated client plumbing were
both found by reading the handler and reproducing the request.
Testing rule added to the document, since this is the second time: assert on the
observable effect, never on the content or formatting of generated or
hand-authored text and config files.
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.
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.
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.
Failed task actions in the dashboard rendered the same generic message
regardless of cause. ApiError already carried the HTTP status, but nothing
read it: a refused mutation (400/403/409 - bad input, CSRF, conflicting
state) looked identical to a broken one (5xx, network drop, timeout), and
an expired session (401, whether archied's own token cookie or an upstream
forward-auth proxy) showed a generic failure instead of prompting
re-authentication.
Add classifyActionError() in api.jsx to map a caught error to a refused /
broken / session-expired kind, and use it in tasks.jsx to render each with
distinct framing and coloring (reusing the existing warn/danger tokens
pill.css already establishes) - refused actions get "you can't do that",
broken ones get "try again, or check the daemon", and an expired session
gets a reload prompt.
Refs archie-core-h3lg.
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.
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.
Adds PATCH /api/config/repos/{owner}/{name}, a dedicated seam distinct
from the generic dotted-key PATCH /api/config path: a repository is
one element of []config.Repo, not a flat key. Traced the mechanism
before adding any new plumbing -- overlay.Nest/ApplyOverlayValues
already handle "repos" as a single whole-slice key with no dot, so
the fix is a webui handler plus a bootstrap seam that reads the
daemon's live, untrimmed Repos (never webui.RepoView, which omits
Preflight/TestGlob), mutates the one matched field via the pure
applyRepoFieldUpdate helper, and republishes through the existing
UpdateConfig(ctx, {"repos": repos}) path unchanged.
config-row.js's row() gains an opts.save override so an edit can be
redirected to a different persistence call. The repositories table
renders an autosaving checkbox for the two booleans and a
save-on-blur/Enter input for max_retries, via api.configRepoUpdate.
Closes archie-core-b6ew.6, and with it archie-core-b6ew.
TestConfigFieldDescriptorsRestartRequiredIsDeliberate pins the exact
RestartRequired value per field against the reload.go evidence
already documented in configFieldDescriptors' own comment, so a field
reclassified without re-checking reload.go fails loudly instead of
silently defaulting to "takes effect immediately."
ui/test/settings-schema.test.js renders settingsPage against a schema
fixture containing a field settings.js was never written to know
about, proving the renderer needs no field-specific branch to show it
correctly, and asserts by reading settings.js's own source that none
of the generically-rendered fields' keys appear literally in it --
the direct regression test for archie-core-b6ew.3.
The rest of this issue's scope (metadata completeness, structured/
locked non-editability, schema secret-leak guard) was already covered
incrementally while implementing archie-core-b6ew.1 through .4.
Closes archie-core-b6ew.5
settings.js drops identityCard/budgetsCard/storageCard/webCard/
pullPolicyLabel in favour of one schemaCards() that walks cfg.schema
and builds a card per section, a row per non-structured field --
label, type, description, editability and enum options all come from
the backend descriptor instead of a hardcoded row(...) call per key.
config-row.js gains: enum fields edit as a <select> from opts.options;
opts.editable === false renders read-only distinct from a locked row
(no reason to show, just no edit affordance); opts.hint carries a
field's description as the label's tooltip, so "0 means unlimited."
travels with the field instead of being baked into a display-value
string per key.
ConfigSection also gains Description, filled in per section to match
each card's existing sub-text, since the card's own explanation is
schema metadata too.
Structured sections (repositories, models & providers) are untouched
-- still the existing bespoke renderers, reserved for archie-core-b6ew.4.
Closes archie-core-b6ew.3
Confirmed in production (task 6, 2026-09-02): dashboard/PR summaries
showed raw prompt-token sums with no cache accounting -- 360,018 of a
reported 400,021 "prompt tokens" were cache hits billed at a steep
discount, not full price. Real fresh spend was ~40,003 tokens, roughly
10x less than the headline number implied. Nothing was double-counted;
the totals were internally consistent, just presented misleadingly.
Adds TaskContext.RunUsage (in-memory, presentation-only) and
formatTokenUsage, rendering "N tokens (F fresh + C cached)" in PR
bodies and the dashboard timeline instead of a raw sum, falling back
to the plain total when no breakdown is available.
Also trims StageBaselineGate's retry-mission prompt to failing-only
go test output via extractFailingGateOutput -- the full passing-
package listing was a direct, mechanical contributor to the growing
per-iteration prompt sizes on every gate-repair retry, not just a
display problem. Degrades to unchanged output for non-Go gates or
unrecognized shapes.
GET /api/tasks/{id}/logs was fully working -- internal/logging's
decode() already captures every JSON field generically (stage,
tokens, iterations, model, everything) -- but nothing in the
dashboard ever called it. The only Logs page hit the daemon-wide
feed, which never carries this per-stage/per-agent-run detail in the
first place. An operator could never see why a task took as long as
it did or its token spend breakdown, even though the daemon already
recorded and could already serve it.
Adds a collapsible attempt-log section to each task's existing
timeline drill-down, reusing the daemon-wide page's row rendering
(extracted to ui/src/base/log-row.js as the shared second consumer).
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.
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.
Archie owns the status and action vocabulary in internal/taskstate, but the
dashboard had to keep a hand-synced copy of the display labels, pill severities
and action confirm prompts -- so a new status or action silently rendered
wrong until someone edited the frontend.
- add taskstate.Statuses() and taskstate.ActionCatalog() so the rules and their
presentation live in one place
- expose GET /api/task-meta returning {statuses, actions}
- add a client base/task-meta.js that fetches the catalog and exposes
statusLabel/statusKind/statusIds/attentionStatusIds/actionFor, with a
freeze-dried default snapshot so the dashboard renders instantly and keeps
working when archied is unreachable
- tests for the catalog, the endpoint and the client accessors
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.
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).
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.
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.
chatStreamEvent gained a Failed bool, set from ToolCallEvent.Err !=
"" -- the field the rest of the codebase already treats as
authoritative -- rather than the browser sniffing summary.startsWith
"failed:" on rendered text. A successful tool whose own output starts
with that literal string (a grep hit, a log line read back) was being
styled as a failed step.
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.