Commit Graph
88 Commits
Author SHA1 Message Date
sam 230280a6e0 feat(webui): Models picks from the provider catalog, and enables available providers
archied already finds usable providers (key set in the environment, or
configured) through the model catalog; the published config view now
carries that catalog, providers with their model ids. Settings > Models
offers role models only from configured providers, lists the catalog's
unconfigured providers as available, and adding one carries its class, key
variable and endpoint. Roles and providers are two accordions, each ending
in an add row.
2026-09-25 18:04:46 +10:00
sam 41979ea75d fix(webui): the live stream reopens after a fatal close; quieter connection status
A non-200 answer to /api/stream (the backend restarting behind a proxy)
closes an EventSource for good, so the top bar read Disconnected until a
reload while every fetch worked. The live-updates store now reopens it
after 1s, doubling to a 30s cap, and resets once live. The connection
status becomes a dot and a label, coloured only when not connected.

History drops the edge fade, which washed out its first and last columns
though nothing overflowed, and its section filter names the section
rather than showing the raw kind.
2026-09-25 17:45:34 +10:00
sam 3c884afb9a fix(webui): Events reads as a flow
A Capture → Map → Bind strip with each step's count opens its tab. The
tabs follow that order, sit left-aligned at their own width and carry
count chips; a count that could not be read stays blank. The Inspector
splits into list and detail only when there is a capture to show, and an
empty event-types list explains where proposals come from.
2026-09-25 17:36:05 +10:00
sam 84e84cac5f feat(webui): needs-you first Dashboard
The header states what is running and what needs a human instead of a
greeting. A stat strip replaces the throughput tiles. The main column
opens on a Needs you queue: each waiting task with its status, title,
repository, workflow and park reason, an Open link and the actions the
server offers for it. Live activity follows; quality gates and the token
outlook move to a right rail.

A failed task-list fetch no longer reads as an empty list, which would
have told the operator nothing needs them; the header says it cannot
reach archied instead.
2026-09-25 16:25:19 +10:00
sam d2b7306436 feat(webui): Plugins and Container runtime settings pages; Advanced keeps only dangerous actions
Plugins: the four extension directories. Container runtime: image, pull
policy (missing or always, the two the daemon accepts), concurrency,
uptime and volume retention as durations, network, and named profiles
with their image and tool allowlist. Advanced now holds only stop and
rollback, and the Managed elsewhere card goes. With every settings kind on
its own page, the generic schema-driven resource editor had no consumer
and is deleted.
2026-09-25 15:32:20 +10:00
sam becb0b5ebf fix(webui): the legacy config catalog stops advertising fields the control plane owns
skills_dir, plugin_dir, secret_engine_dir and containers.* were listed as
editable in /api/config's schema while the plugin-settings and
container-runtime-policies resources own those values at runtime; nothing
could save them there. Drop them from the catalog, and delete the settings
components that rendered the catalog, none of which any page used.
2026-09-25 15:29:31 +10:00
sam 769e24cc55 feat(webui): Personas and Schedules settings pages
Personas: a filterable list with the default marked, and an editor with
name, a default toggle, the system prompt with a character and token
count, Duplicate and Delete. Renaming or deleting the default keeps the
collection naming one that exists; the last persona cannot be deleted.

Schedules: an empty state, then one card per job with ID, task title,
instructions, when (interval, cron line or a single time) and overlap.
Settings opens on Personas.
2026-09-25 15:14:18 +10:00
sam 43d2acf300 feat(webui): Settings > History, and a resizable Settings sidebar
History replaces the Audit card on every settings page: one change log for
all settings, filterable by section, actor and time window, with the
filters in the query so each page's History link opens it filtered to that
page. Rows show the old and new value as a diff and expand to the full
value; Restore still puts a resource back to the version before a change.

The sidebar's edge drags (or takes arrow keys) between 180 and 420px,
resets on double-click and remembers its width per browser.
2026-09-25 15:10:07 +10:00
sam 2e34ef75a3 feat(webui): Tools & MCP settings page
MCP servers as editable rows per transport (stdio command and arguments,
HTTP URL, SSE endpoints) with parallel tool calls; MiniMax with its key as
a secret reference; web fetch with byte, duration and a danger-toned
private-networks toggle, its fields disabled while it is off; tool output
limits with a token estimate.

Fixes sticky positioning across the app: the frame and main used
overflow hidden, which made each a scroll container that never scrolls,
so the Settings save bar and sidebar never stuck. Both now clip instead.
2026-09-25 15:09:53 +10:00
sam c0832cf96b feat(webui): Scheduling policy settings page
Its own page under Settings > Agents instead of a generic card on Advanced:
trigger as a segmented control with the label field shown and required
only when the trigger needs one, the six forge state labels as a fixed
table, a max-retries stepper and a duration input for the poll interval.
Settings pages leave room below the last setting so it can be scrolled up
to eye level.
2026-09-25 15:09:45 +10:00
sam 992c77d9ce feat(webui): one save flow for Settings
Edits live in the control-plane store as drafts against the version they
started from, so they survive moving between Settings pages. A sticky bar
counts unsaved changes; the review drawer shows a field-level diff per
section with Revert, and saves the sections one at a time, stopping at the
first failure. A conflicting save rebases the draft onto the latest value.
Restart pending is read from apply status. Per-card Save buttons, Live and
Version badges go; leaving Settings with edits asks first.
2026-09-25 15:09:38 +10:00
sam 4ffebb855d feat(webui): five-place top bar with Settings, New task and one connection pill
Dashboard, Tasks, Workflows, Events and Settings replace the Work, Agent
and System menus. Configuration pages move under /settings/* with
redirects from their old paths; Logs and Appearance leave the bar and stay
reachable from Jump to, the Dashboard and the account menu. New task opens
the Start work form in a dialog and lands on the new task. One pill reports
the live stream's state.

Drops docs/prds/dashboard-navigation-groups.md: web UI design is not
tracked in PRDs.
2026-09-25 15:09:18 +10:00
sam 9344647719 fix(webui): multiplex dashboard live updates over one stream 2026-09-25 14:05:34 +10:00
sam c5faad5915 feat(controlplane): field-level sys_audit table, audit view on settings pages, whole-task time limit 2026-09-25 09:54:30 +10:00
sam d4ac063caa fix(webui): render sub-second durations as under 1 s 2026-09-25 08:49:52 +10:00
sam 1757d76f60 fix(webui): use Tailwind's standard breakpoints everywhere 2026-09-25 08:37:47 +10:00
sam 1e54efcc33 test: remove events-page source-string test
It asserted on text in the router, nav and Events page sources rather than
on behaviour.
2026-09-25 01:35:26 +10:00
sam 5f915931ef test: remove layout-pinned route-registry and task-meta fixture tests
TestDashboardPagesRegistryCoversEveryRoute parsed ui/src/router/index.ts as
text, and TestTaskMetaPayloadMatchesFixture plus ui/test/task-meta-snapshot
pinned a formatted JSON fixture. They failed on formatting, not behaviour.
2026-09-25 01:32:20 +10:00
sam 2e00777f07 refactor: format markdown files using prettier, fix spelling concerns, reduce Taskfile bloat 2026-09-25 01:10:28 +10:00
sam 894b3d280b chore(webui): remove legacy hash and Events-tab redirects
The #/path rewrite and the /captures, /mappings and /bindings redirects only
kept pre-cutover bookmarks working.
2026-09-25 00:36:43 +10:00
sam 335fb4bb22 Merge branch 'main' into pg/foundation 2026-09-24 22:21:24 +10:00
sam 47fae672f1 feat(eda): workflow inputs, optional repository and agent profiles
Workflow definitions declare inputs, repository (none, optional or
required; default required) and profile. A binding assigns each input
from a mapped parameter or a constant and may take its repository from a
parameter, which must name a configured repo; both are checked when the
binding is saved and again at dispatch. Inputs travel as structured task
data (tasks.inputs, the task brief, and a JSON block in the agent's
mission), never as body text.

A task with no repository runs in a per-task scratch workspace with no
clone and no publication grant. The agent.run step runs one mission
without a repository and finishes the task in the new completed status.

Agent profiles live under [containers.profiles.<name>]: an image and an
allowlist over the tools archie adds (MCP, scripts, plugins).
[containers].image is the default profile; an unconfigured profile parks
the task. The workflow is now pinned before the container starts so the
profile can choose its image.

Also stop two archied tests writing embedded NATS state into the package
directory, refuse an empty state_dir for embedded NATS, and drop the NATS
store files an earlier lane commit tracked.
2026-09-24 20:29:33 +10:00
sam bbaca2a39d Merge remote-tracking branch 'origin/pg/foundation' into worktree-agent-a62864fcfbdb43f5a
# Conflicts:
#	internal/app/archied/state_store.go
#	internal/contracts/state/v1/state.pb.go
#	internal/daemon/daemon.go
#	internal/infrastructure/captureintake/receiver.go
#	internal/infrastructure/captureintake/receiver_test.go
#	internal/infrastructure/legacyimport/load.go
#	internal/infrastructure/postgres/edastore_test.go
#	internal/infrastructure/postgres/postgresdb/edastore.sql.go
#	internal/infrastructure/postgres/queries/edastore.sql
#	internal/infrastructure/staterpc/client.go
#	internal/infrastructure/staterpc/values.go
#	internal/webui/api_binding.go
#	internal/webui/api_binding_test.go
#	ui/dist/assets/index.js
#	ui/src/bindings/BindingEditor.vue
#	ui/src/bindings/BindingRow.vue
2026-09-24 19:34:31 +10:00
sam be050afc70 feat(webui): bindings pick an event type and filter, mappings show their type and match count 2026-09-24 14:46:21 +10:00
sam 8a2b5b95f9 merge: t2db.40 sources and signing into pg/foundation
Resolves against t2db.36: captures carry both event_type and unsigned (proto field 10), the State Store serves sources and event types from the Postgres EDA store, the capture row shows event type and signature together, and the staterpc sentinels map both ways from one table.
2026-09-24 14:38:40 +10:00
sam 684ec1263a feat(eda): sources own signing, with UUIDv7 paths and approved unsigned option
A source is the capture endpoint: a UUIDv7 path by default or a unique
URL-safe custom path, signed by default with an Archie-generated secret
(encrypted via the bindings cipher), or unsigned after an approval.
Intake verifies X-Hub-Signature-256/X-Signature-256 against the source
secret before redaction; an unauthenticated event on a signed source is
captured but never dispatched, an event on an approved unsigned source
dispatches and is marked unsigned. The binding secret is retired; migration
0006 derives sources from existing binding and capture source strings,
moving each binding's secret onto its source. SourceStore crosses the
State Store gRPC contract. The dashboard gains a sources panel and flags
unsigned in the capture inspector, binding list and task timeline.
2026-09-24 14:26:21 +10:00
sam 152cdc6523 feat(webui): inspector shows proposed and unidentified events, names and pastes event types 2026-09-24 14:21:21 +10:00
sam cb518e6f6d feat(webui): serve change statuses and the config schema through /api/task-meta
Closes #865. The dashboard hand-copied the Change* file-status ids and events.ConfigCapturedSchema. /api/task-meta now serves both; the Vue dashboard renders ui/src/lib/task-meta-snapshot.ts until the served catalog lands. The Go handler is pinned to internal/webui/testdata/task_meta.json and the snapshot is pinned to that same fixture, so a one-sided rename fails a test.
2026-09-24 09:31:09 +10:00
sam 92effeb692 feat(webui): two-section quality gates, sweep the restating card prose
The quality gates card stacked its number and rows across the full row
width -- the rate pinned to the left edge, the counts to the right --
which reads as two places at once. The card now has two internal
sections, left to right: the rate, and the per-workflow rows that
explain it; the row collapses under 720px.

Also swept the restating descriptions: 'Work that passed its quality
gates' under Quality gates, 'Archie needs these before it can work on
its own' under Finish setting up, 'Next 30 days at the current rate'
under Token outlook, 'Last 50, newest first' under Live activity. A
title and a sentence that restate each other are noise; the table or
chart says the thing. CapturesCard's redaction note is a security fact,
not restatement, and stays. The unconfigured versions state is one
quiet line, not a card with a title, a description, and a sentence.
2026-09-23 15:29:28 +10:00
sam 4f90b97a86 feat(webui): compact quality gates card, drop the setup celebration, hover nav
Three dashboard refinements from operator feedback:

The setup panel's completed state was celebration prose -- a full card
saying setup was done, occupying a grid cell until dismissed. A
configured daemon is the absence of a problem: the state machine now
only distinguishes incomplete from omit, the checklist returns on its
own if setup regresses, and the dismissal machinery is deleted with it.

'Gate pulse' led with a donut whose entire payload was one number, and
the name was decoration too. The card is 'Quality gates' now: the pass
rate as the number itself beside its run count, per-workflow rows as
tight hairline rows instead of muted pills, and the parked line is gone
-- Throughput's Needs-you tile already speaks for parked tasks, from the
statuses themselves. base/Gauge.vue had no other consumer and is deleted.

Topbar nav groups open on hover and close on leave, with a short grace
period bridging the trigger-to-content gap; click and keyboard
activation keep working through the same controlled open state.

The live activity feed scrolls within its card (previous commit); the
health row's cards are now compact enough to match it.
2026-09-23 14:53:40 +10:00
sam e8b8f5569f fix(webui): group live activity by payload, not by event kind
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.
2026-09-23 11:20:45 +10:00
sam 5aeffa3028 feat(webui): collapse runs of background telemetry in live activity
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.
2026-09-23 11:07:14 +10:00
sam 5d2dc3d4ca feat(webui): require explicit confirm on WebMCP recovery tools
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.
2026-09-22 13:57:31 +10:00
sam 2cb2b0c638 feat(webui): publish WebMCP tools for the dashboard
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.
2026-09-22 13:53:41 +10:00
sam 17b2e2a5cb feat(webui): give the dashboard an actionable auth failure state
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.
2026-09-22 07:13:48 +10:00
sam 76ba97895f feat(webui): make Events one page with three tabs
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.
2026-09-22 04:21:36 +10:00
sam aa650e2ccf feat(webui): read the derived resource schema in the document editor
The control-plane descriptors now derive a JSON Schema from the Go type of
the document they describe (a19cd24b), 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.
2026-09-22 03:56:02 +10:00
sam a396b32048 fix(webui): derive the task filter through a function the guard can call 2026-09-22 01:57:52 +10:00
sam eaaa7aa26e fix(webui): re-derive the task status filter when the served catalog lands 2026-09-22 01:57:52 +10:00
sam d38e27fdf0 feat(webui): show which process is running which settings version
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.
2026-09-21 15:57:46 +10:00
sam 924b02a1b0 feat(controlplane): runtime administration over the State Store's gRPC server
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.
2026-09-21 08:17:42 +10:00
sam 2c3a47de68 feat(tools): a capture-intake sender for exercising the Events surfaces
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.
2026-09-21 01:10:30 +10:00
sam 793864c682 fix(webui): four-column appearance grid on wide screens 2026-09-21 00:46:28 +10:00
sam 0a6eedc928 feat(webui): refine system navigation and appearance 2026-09-21 00:45:02 +10:00
sam e18fb8b204 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.
2026-09-20 17:14:47 +10:00
sam 7d7e900e47 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.
2026-09-20 16:50:28 +10:00
sam 25086a66a2 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.
2026-09-20 16:33:47 +10:00
sam 1d2e58ebaa 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.
2026-09-20 16:30:01 +10:00
sam 30a9be4dc5 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.
2026-09-20 16:00:29 +10:00
sam 0311eb74a7 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: 04d4d8f1 (#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 (278b7fc6) 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 04d4d8f1 (#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.
2026-09-19 23:38:19 +10:00