feat(theme): canonical theme/namespace lists + ship Summer Night (T-371, T-478)
The bundled-theme list and the Tier-0 i18n namespace list were each hand-maintained in 3+ places that had drifted: the testmode harness loaded 8 themes (catppuccin silently unvalidated) while the app and contrast gate loaded 10, and the i18n gate checked 4 of the shipped namespaces. Export one canonical const each — kBundledThemePaths and kTier0Namespaces — and have the app, the testmode harness, and the a11y gates iterate them. Drift-proof meta-assertions: - contrast gate fails if any theme YAML on disk is absent from kBundledThemePaths (so a theme can't sit unvalidated). - i18n gate derives its subjects from assets/i18n/en_us/ at test time and asserts en/nl key parity for every shipped catalog (26, was 4), plus that every kTier0Namespaces entry has a shipped catalog. Surfaced summer-night.yaml: a legacy-ported palette on disk, unbundled and never contrast-checked. Per the maintainer's call, ship it: flesh the palette to full token + syntax coverage (honouring the v1.2 colours, clide derivation pattern for the new keys) and add a structurally identical summer-night-hc sibling that clears the strict extended gate. Both pass. No licenses.yaml change: summer-night is clide's own (ported from legacy clide v1.2 under legacy/, MIT); the only third-party palette, Catppuccin, is already acknowledged; no fonts added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-12
@@ -247,17 +247,7 @@ class _ClideTestAppState extends State<ClideTestApp> {
|
||||
// Theme loading
|
||||
try {
|
||||
const loader = ThemeLoader();
|
||||
const paths = [
|
||||
'lib/kernel/src/theme/themes/clide.yaml',
|
||||
'lib/kernel/src/theme/themes/midnight.yaml',
|
||||
'lib/kernel/src/theme/themes/paper.yaml',
|
||||
'lib/kernel/src/theme/themes/terminal.yaml',
|
||||
'lib/kernel/src/theme/themes/clide-hc.yaml',
|
||||
'lib/kernel/src/theme/themes/midnight-hc.yaml',
|
||||
'lib/kernel/src/theme/themes/paper-hc.yaml',
|
||||
'lib/kernel/src/theme/themes/terminal-hc.yaml',
|
||||
];
|
||||
for (final p in paths) {
|
||||
for (final p in kBundledThemePaths) {
|
||||
final name = p.split('/').last.replaceAll('.yaml', '');
|
||||
try {
|
||||
final theme = await loader.fromAsset(rootBundle, p);
|
||||
@@ -277,7 +267,7 @@ class _ClideTestAppState extends State<ClideTestApp> {
|
||||
final themes = <ThemeDefinition>[];
|
||||
try {
|
||||
const loader = ThemeLoader();
|
||||
themes.add(await loader.fromAsset(rootBundle, 'lib/kernel/src/theme/themes/clide.yaml'));
|
||||
themes.add(await loader.fromAsset(rootBundle, kBundledThemePaths.first));
|
||||
} catch (_) {}
|
||||
|
||||
final services = await KernelServices.boot(
|
||||
|
||||
Reference in New Issue
Block a user