docs/development/ holds one page per kind of change (settings, State Store and persistence, task lifecycle, workflows and steps, event automation, dashboard, agent execution and containers, processes and wiring, merging work), each naming every layer the change must reach and pointing at the document that owns the design. The docs build puts them in the development set; docs/index.md and CLAUDE.md link them. Also adds the container-profile case to the validator agreement test, the check the profiles work skipped.
1.9 KiB
1.9 KiB
Dashboard
Authority: .agents/skills/archie-web-ui (stack facts, design-system rules,
tone and accessibility). This page covers what a change must reach, not how it
should look.
Adding or changing a feature
- The feature lives in
ui/src/<feature>/. Move a helper toui/src/base/only when a second feature needs it. - Keep wire shapes, draft state and payload building in a plain
.tsmodule beside the components (ui/src/bindings/binding-draft.tsis the pattern), and test it inui/test/*.test.ts. Components stay thin. - Every mutation goes through
api.*inui/src/lib/api, which sends the CSRF and Content-Type headers the server's mutation guard requires. A barefetchis refused. - A value the server also describes (task statuses, actions, workflow inputs)
comes from the server. Keep a local default only so the first render works,
and keep it in step (
ui/src/lib/task-meta.ts). - Run
task ui,task test:uiandcd ui && npm run typecheck. Commit the regeneratedui/dist/; the Go binaries embed it.
Adding an API route
- The handler goes in the
internal/webui/api_<concern>.gofile for its concern. Check the request fully on the server; the UI's checks are only a convenience. - A mutation calls
authorizeTaskMutationfirst. - A route whose store is not configured answers 503, and
internal/app/archieui/degraded_routes_test.gopins what each route returns without its contract. Add the route there. - The dashboard runs in its own process (
archie-ui) and must not link the daemon or the workflow engine (cmd/archie-ui/architecture_test.go). Reach stored data throughstorecontractinterfaces wired ininternal/app/archieui/compose.go. - Settings that live in a control-plane resource need no new route: the Advanced settings page edits every resource from its generated schema.