Commit Graph
5 Commits
Author SHA1 Message Date
sam fffa6bc528 feat(webui): refine system navigation and appearance 2026-09-21 00:45:02 +10:00
sam a1b8008774 feat(webui): adopt the violet palette, and give the outlet the viewport
Takes style.css, lib/theme.ts and index.html's pre-paint script from the
palette work on worktree-groovy-imagining-widget (73e602a7..72034249), leaving
its flat topbar and route table behind. The theme is a data-theme attribute set
before the first paint, so a reload does not flash the wrong palette, and
color-scheme moves with it.

The outlet takes the viewport height below the topbar so an empty state has
somewhere to sit.
2026-09-20 18:52:15 +10:00
sam d933d36449 feat(webui): bootstrap Vue 3 + shadcn-vue, replacing the Preact dashboard
Sam owns this codebase and reads Vue fluently, not Preact; a UI its maintainer
cannot read is the liability that outweighs the port. shadcn-vue is Vue-only,
so adopting it means the framework moves with it.

Scaffolded per the official Vite guide: `npm create vite --template vue-ts`,
Tailwind v4 via @tailwindcss/vite, `shadcn-vue init` (Reka UI, Lucide, neutral
base, CSS variables). Button and DropdownMenu are added, the latter being what
the pending navigation restructure needs.

Two deviations from the guide, both forced:

  - The guide sets `baseUrl` alongside `paths`. TypeScript 6 deprecates
    `baseUrl` and errors on it, and this project is heading for TS 7 native, so
    `paths` stands alone and resolves relative to the config file. Not a
    downgrade: the scaffold's typescript ~6.0.2 is untouched.
  - vite.config.ts keeps `base: "./"` and unhashed asset names. ui/embed.go
    embeds a committed dist/, served from a path the build does not know;
    hashed names would also orphan a file in git on every rebuild.

The Preact app and its 43 test files are deleted rather than ported, on Sam's
instruction: tests return when there is behaviour worth pinning rather than a
port to re-assert. `task test:ui` is now a vue-tsc typecheck, which is what
would actually catch a broken component; an empty `npm test` would pass
vacuously.

ui/src/router/index.ts carries the route table and is the new source of truth
for TestDashboardPagesRegistryCoversEveryRoute, which parsed main.jsx before.
Keeping that contract alive matters: it is what caught the stale /chat entry
earlier today. Every route resolves to a named placeholder view, so an unported
page is visibly unported rather than blank.

golangci-lint now excludes ui/node_modules. The dashboard toolchain pulls in
`flatted`, which ships a Go implementation beside its JavaScript, and the gate
was failing on complexity in a vendored third-party file.

The shadcn MCP server is registered in the root .mcp.json. `shadcn-vue mcp init`
writes it to the directory it runs in, which for a nested ui/ is a path Claude
Code never reads.
2026-09-20 17:14:47 +10:00
sam 87aaf1f7dc Add Preact bridge and rename JS to JSX 2026-09-03 00:06:43 +10:00
sam 4d44ef76f5 feat(webui): rebuild the dashboard
The old UI was a single 200-line Go file serving one hand-written HTML
page of task rows. It showed that archied was running and almost nothing
about what it was doing -- skills, workflows, memory, channels, logs and
configuration were all invisible unless you read the source or the
config file.

The dashboard now covers each of those as its own section, built as a
Vite app under ui/ at the repo root: it is a separate artefact from the
Go daemon, not an internal package of it. dist/ is committed so building
archied never needs a Node toolchain, and the !no_ui build tag keeps an
embed-free build available.

Both sides are split by concern rather than by layer -- one Go file per
API area, one folder per UI section with its own CSS -- so a change to
logs cannot disturb tasks.

Pages report consequences, not just state: an empty memory page says
Archie starts every conversation with no recollection of earlier ones,
and the setup checklist names what is missing in plain language instead
of showing a grid of zeroes. Nothing greets by a hardcoded name; the
operator comes from [chat], which is deployment data.

Auth is exposure control, not capability control -- the agent already
holds this user's authority through its own tools. So a loopback bind
needs no token, and only a reachable bind mints one and logs a URL,
which means an instance cannot be exposed merely by omitting config.

Container startup now degrades instead of aborting, for the reason
resolveForge already does: a missing agent image should not deny the
operator chat and the dashboard, and under Restart=on-failure it turns a
recoverable problem into a crash loop with the real error scrolling past.

`task dev` runs the daemon under air and the Vite server together in one
terminal.
2026-08-04 01:45:36 +10:00