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>
35 lines
895 B
TOML
35 lines
895 B
TOML
[project]
|
|
name = "chrome"
|
|
version = "0.1.0"
|
|
description = "Shared page shell, design tokens and service helpers for the internal services."
|
|
requires-python = ">=3.13"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"jinja2>=3.1",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8", "httpx>=0.27", "uvicorn[standard]>=0.30"]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["chrome*"]
|
|
|
|
# The shell is useless without its templates and static tree, and a wheel
|
|
# carries only .py files unless told otherwise. scribe shipped a broken wheel
|
|
# this way once; the container worked only because uvicorn imported from the
|
|
# source tree.
|
|
[tool.setuptools.package-data]
|
|
chrome = [
|
|
"templates/*.html",
|
|
"static/*.css",
|
|
"static/*.js",
|
|
"static/vendor/*",
|
|
"static/wa/**/*",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|