Commit Graph
11 Commits
Author SHA1 Message Date
sam 11fc6dfcbd feat(webui): swap the violet palette for the Graphite theme
Neutral warm greys with one swappable sage accent replace the violet canvas,
washes and brand gradient. IBM Plex Sans/Mono replace Geist. The light theme
keeps the same rules with a darker sage. No layout changes.
2026-09-25 15:08:59 +10:00
sam 1757d76f60 fix(webui): use Tailwind's standard breakpoints everywhere 2026-09-25 08:37:47 +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 83271cd7a2 fix(webui): clear WCAG AA on info and subtle text tokens
The info token doubled as badge text on info-soft and as the log-level
label, and failed 4.5:1 there (4.29:1 dark over card, 4.45:1 over glass;
light theme 4.11:1 on canvas, 3.58:1 on its soft). Dark --info moves to
#B08BF8, light --info to #6F47A6, both clearing 4.5:1 on every surface
they land on. Light --fg-subtle moves to #675E6F for the wash-composited
canvas where the old value measured 4.44:1. Measured pairs recorded at
the token definitions.
2026-09-23 11:05:56 +10:00
sam 0a6eedc928 feat(webui): refine system navigation and appearance 2026-09-21 00:45:02 +10:00
sam 799a7a8249 fix(webui): deepen the primary violet and give links their own tint
The bright violet passed the contrast ratio on paper and failed in the
hand: black-on-purple vibrated at button and FAB sizes. The primary surface
is now deep enough for white labels, and link text on the canvas uses a
dedicated lighter tint, since one violet cannot be both a dark-enough
surface and a light-enough text colour. Also drops an empty-state
description that restated its title.
2026-09-21 00:10:10 +10:00
sam ff8369c5ac feat(webui): land the Phase 1 foundation on the navigation restructure
Two Vue branches were in flight and looked like competing versions of the same
change. They were not: this branch had the navigation restructure (Phase 4)
and the route table, and the other worktree had the Phase 1 foundation, still
uncommitted. Neither had ported a page. This reconciles them.

What came across from the foundation:

- lib/api.ts, the one client every request goes through, so the CSRF and
  Content-Type headers live in a single place, plus the four framework-free
  modules it needs: uuid, stream-state, format, task-meta.
- loadTaskMeta() at boot, so /api/task-meta replaces the freeze-dried
  lifecycle defaults instead of the catalogue being frozen into the bundle.
- capabilities.ts keeps the other branch's pure hiddenRoutes, but reads
  route.meta.section. The other version read route.section, which is always
  undefined for this route table, so its capability gating was silently dead.

The route table stays this branch's: internal/gateway's registry test holds it
in parity with the agent-facing page index in both directions, and the other
branch's table fails it with seven errors.

The frame is Tailwind on the shell, not a ported stylesheet. layout.css
described a shell, a topbar and a nav as authored classes, but the topbar is a
Vue component like every other surface and emits none of them, so two thirds
of that file had no consumer. What the frame needs is now the shell element's
own utilities plus the canvas, focus floor and motion preference in
style.css's base layer, where a global element rule belongs. Verified equal to
the stylesheet it replaces: 20px radius, hairline border, blur(28px)
saturate(1.2), and the narrow-screen collapse.

Also fixes the bundle freshness check failing on the first build after any
change, which had cost both branches of this port a rebuild-and-retry. ui/dist
is committed, so nothing ignores it and Tailwind's content detection scanned
it, making every build an input to the next: class strings left in the bundle
generated utilities for classes nothing references any more, so an unchanged
tree built a different bundle. Excluding it also drops ~12KB of dead CSS.
2026-09-20 19:14:46 +10:00
sam 393e30ed1a 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 2bddb9f36a feat(webui): grouped topbar navigation, built from components
Five top-level items instead of eleven flat ones: Dashboard as a link, then
Work, Agent, Events and System as dropdowns, with each item's one-line
description on a hover tooltip. Configuration dissolves into /system/{status,
appearance,tasks,models,repos,advanced} and /settings redirects to the first of
them, so existing bookmarks still land somewhere. Logs gets a nav entry for the
first time.

The bar is composed from named components rather than one file: Brand (Logo,
BrandName), Nav (NavTrigger, NavGroup, NavItem), SearchBar, SupportLink,
ThemeToggle, ProfileDropdown. The nav model reads the route table, so a route
and its nav entry cannot disagree, and a group whose every child is gated off
is dropped while a group left with one child stays a dropdown.

The Go page registry moves with it, which its parse-the-route-table test
enforces.
2026-09-20 18:46:11 +10:00
sam cf1a3a7bbe fix(webui): self-host Geist, and fold the cross-check findings into the plan
Four review agents checked the bootstrap and the migration checklist against
the deleted tree and the Go handlers. Three found real problems.

The shadcn-vue CLI's default font resolved to a Google Fonts @import. archied
is deployed on LAN-only and air-gapped hosts, where that silently falls back to
a generic sans and makes an admin tool that otherwise has no third-party calls
start making one. Now @fontsource-variable/geist, self-hosted: five woff2 files
in dist and no external URL left in the bundle.

vite.config.ts used __dirname for the @ alias, which Vite 8 already warns is
unsupported under its native config loader. Now import.meta.url. Dropped the
leftover template vite.svg.

The checklist gained what the review found missing, most of it consequential:

  - main.jsx was never named as a source, so the jump-to search, the `soon:`
    nav treatment, the boot-time task-meta re-render and the route-keying rule
    (keyed on path+params but NOT the query, so a tab switch does not remount)
    had no home. vue-router needs an equivalent key strategy.
  - css/layout.css is 498 lines and holds the shell, the chat dock and morph,
    and every breakpoint Phase 5 described only in prose. Named as the source
    to port from rather than left to reverse-engineering.
  - Six further CSS files carried behaviour with no mapping: focus-visible,
    .sr-only, the global prefers-reduced-motion override, and the pill colours
    a Badge port has to match.
  - Chat's content features -- session switching, persona and model selectors,
    inline tool-call rendering -- were absent; Phase 5 described only chrome.
  - Configuration's editable-vs-read-only dual mode (503 when the process only
    holds a published snapshot) is architecture, not styling.
  - Tasks writes tab/attempt state with history.replaceState specifically to
    avoid a remount per tab click.
  - statTile also exports Sparkline, gauge also exports SegmentBar, and five
    icons have no 1:1 Lucide equivalent, so those swaps are design calls.
  - LOG_LEVELS is a wire contract matched by splitCSV server-side.

Corrections: the API surface is 48 methods plus two SSE subscribers, not ~45.
Mutations require both X-Archie-CSRF: 1 and Content-Type: application/json,
answered 403 and 415 -- the likeliest silent breakage after the port, now
stated exactly. My claim that a test enforced "no second fetch()" was wrong:
that text-scan was deliberately removed upstream for testing the file's wording
rather than its behaviour. The real guard was per-method header classification,
flagged as the one test worth bringing back first.

The 106px clipping figure is a live measurement and not recoverable from git,
so it now carries the viewport and both edge positions.
2026-09-20 17:22:51 +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