chrome served its assets at /chrome and the service's at /static, both
top-level. agent-bridge cannot use that: its design (D-0008) puts everything
behind exactly two proxied prefixes, /ui and /api, so assets at a third
top-level path are unreachable behind Caddy.
`mount_prefix="/ui"` moves both trees underneath it - /ui/chrome/... and
/ui/static/... - Web Awesome's versioned path included, which the autoloader
derives from its own script URL and so has to be right rather than
approximately right.
The default is unchanged, so marketplace on v0.1.0 is unaffected and does not
need the bump.
The test asserts the negative as well as the positive: nothing may be served
from a path the proxy does not forward. That is the actual requirement, and
it is the half such a test usually omits.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three fixes found by driving a real page, not by reading the code.
Its autoloader works out where to fetch components from by finding the
<script> whose src *ends with* "webawesome.loader.js". The cache-busting
`?v=` defeated that match, so it fell back to the site root and every
component 404'd - a page that merely looks unstyled, with nothing in the
browser console and only 404s in the server log to say why. Web Awesome now
lives at /chrome/wa-<version>/, which removes the query string and, because
component filenames are stable across releases, also busts caches properly
on an upgrade. There are regression tests for both halves.
The brand ramp pointed at yellow but buttons came out brown: Web Awesome
picks step 50 for a loud fill because that is the darkest point that still
carries white text, and yellow-50 is #b45f04. The services have always used
bright yellow with dark text, so the fill/on pair is now set explicitly
rather than taken from the ramp.
TemplateResponse's old (name, context) signature is gone in Starlette 1.7,
and the error handler was returning its 404 page with an HTTP 200.
Also adds the import map for Preact/hooks/htm to the shell. hooks.module.js
carries a bare "preact" specifier internally, so the map is required rather
than a convenience, and it belongs here once instead of in every service.
strings_json() hands an island its translations with `<` escaped.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
One page frame, one palette, one set of components, one implementation of
config readers, proxy auth, /healthz, i18n and cache-busted asset URLs.
The design tokens had been copied into homepage, marketplace, agent-bridge
and scribe and had started to drift; so had theme.js and the asset() helper,
which existed in two incompatible versions. board.css carried the instruction
"Copy the values from homepage's style.css when they change there", which is
the problem stated as a procedure.
Components come from Web Awesome 3.14.0 (MIT), vendored under static/wa by
vendor-webawesome.sh - curl and tar against the npm registry, so there is no
node_modules, no lockfile and nothing for CI or a Containerfile to run. The
script prunes type definitions and IDE metadata, 13M down to 3.4M, and keeps
only the en and pl translations. Components style themselves inside a shadow
root, so a page rule cannot reach into one: "this input is the wrong width"
stops being a thing that can happen rather than a thing to be careful about.
Two decisions worth recording here:
- Asset versioning is a content digest over the whole static tree, not each
file's mtime. mtime is wrong in a container, where every COPY'd file
carries the build timestamp, so every asset appeared to change on every
build. A single tree-wide token also means a cached page can never pair
itself with a newer script.
- Pages keep the data-theme="light|dark|system" attribute the services have
always used. Web Awesome drives light/dark from a wa-light/wa-dark class
instead; base.html and theme.js own that mapping so nothing else learns it.
The compatibility aliases in tokens.css (--bg, --surface, --accent, ...) are
deliberate: they let a service move page by page instead of all at once.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>