Name:
[IMP] viin_brain,viin_web_editor: Brain core UI polish wave — runtime bug + a11y/responsive
State:
Killed
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#37
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
5c4d69fb566d6dcf3261716501d297ef0df9e587
Description:
[FIX] viin_brain: repair theme token system — Brain UI was theme-blind (off-theme)
Root cause (CEO-reported "rất xấu, không khớp theme Odoo"; PRE-EXISTING, not the
polish wave): theme_tokens.scss Block 1 shimmed Bootstrap-5.3 CSS custom props
with a SELF-REFERENTIAL pattern `--bs-x: var(--bs-x, fallback)`. A custom
property referencing itself is a CSS dependency cycle → computes to the
guaranteed-invalid (empty) value; the fallback is never reached. Odoo 17 ships
Bootstrap 5.1.3 and emits NONE of --bs-* at runtime (verified empty at :root on
the live instance), so every --o-brain-* token that chained into --bs-* (page /
sidebar / context backgrounds, borders, muted text, badge text, trust + AI
surfaces) resolved to empty → panes rendered transparent with no borders, text
fell back to gray, badges lost their fill. The whole app looked flat/off-theme.
Fix: rewrite Block 1 as PLAIN (non-self-referential) assignments anchored to
Odoo-17 runtime vars that DO carry values (--gray-100..900, --primary,
--secondary, --success/-warning/-danger/-info, --body-*), each with a literal
fallback. This single change resolves the entire downstream token chain
(Block 2 surfaces/borders/text, Block 3 trust/AI) — verified in-browser:
--o-brain-bg-sidebar #f8f9fa, --o-brain-border #dee2e6, badge text #fff, header
white + 1px borders. Odoo consumes no runtime --bs-*, so global :root definition
is side-effect-free; a themed deploy that emits real --bs-* overrides by cascade.
Also: vault badge reverted to brand accent fill with white text (earlier wave
darkening treated the wrong cause — gray text came from the empty --bs-white,
not the fill); badge radius 6px→4px and page title 2.1rem→2rem (mockup/spec).
Branch:
17.0
Instance ID:
0
Age:
Up-time:
Not finished