Repository navigation
[PR] Make compression-tree block fills theme-aware (dark-mode readable) - #5254
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9104-pr.5254.c6bc415This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5254.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…ment The theme-aware node-box fills already landed on master via #5417 (6c13364, supersedes this PR's fill changes), leaving the #3917 comment's "on a light canvas" premise false. This rebased commit keeps only that comment correction from the original head; the duplicate --node-fill* vars and their test guard were dropped because master's #5417 fix already ships the equivalent --tm-*-fill vars + guard.
881da1e to
d7adcfc
Compare
[bot] Conflict resolved and pushed — new PR head Why the conflict existed: master already merged the same visual fix — Resolution (rebase): rebased PR head Verified on the rebased head (targeted, per local-test discipline): Live status (mirror cache, fetched this run @ sha Recommendation: the PR's substantive work shipped via #5417; what remains is a one-line stale-comment correction. Owner: merge the micro-residual or close as superseded by #5417 — closing is yours alone to do. 七问(本轮 CI 处理)
收工判定:冲突已解除、无红项,本车道工作完成;剩余动作(合并或关闭)归 owner。 |
[bot] 最终审核结论(当前 head 本轮独立验证(自己重做,非引用前楼层):
八问
进度说明:前两轮运行卡死在工作区依赖安装(工作区无 node_modules,共享机器上全量装依赖/构建长时间无输出);本轮避开本地构建,改用 git 级核对 + 镜像缓存取证,结论如上。 收工判定:审核通过,可合并。剩余动作二选一归 owner:①合并这条微残留(一行注释修正,零风险);②以 superseded by #5417 关闭(旧注释措辞保留,影响可忽略)。本车道工作完成。 |
What
In the session-detail Structure tab, the compression-tree block boxes (b1/b2/b3 …) were unreadable in dark mode: the box background was hardcoded light (
#fff/#f2f7ff/ …) while the text inside follows the theme (var(--text)/var(--text-muted)), which turns near-white in dark mode → light text on a light box. Reported in #5210 with screenshots of exactly this.Root cause
src/web/styles.tsset the five.g-node* rectfills to literal light hexes, written assuming a "light canvas" (the#3917comment even said so). Node text has always been themed. Light mode: dark text, reads fine. Dark mode: text flips light and the hardcoded light fill erases it. Same defect class already guarded for.fd-left/.bd-cardby the#4737test ("must not hardcode white (dark scheme)") — the g-node fills were the one spot that slipped through.Fix
Made the five fills theme-aware via CSS custom properties defined in all three palettes (light
:root, the media-query dark block, the pinned-dark block):#fff,#f2f7ff,#f6f3ff,#fffaf0,#f7f8fa) — light mode looks exactly as before.--bg-elev=#161b22), keeping a faint tier hue: base#1c2129, T1#1a2234, T2#201e32, T3#28231c, n#22272e. Both--textand--text-mutednow have strong contrast on every fill.Tier border colors are unchanged (borders read fine on both themes). Also fixed the now-false "on a light canvas" wording in the
#3917comment. Pure CSS + one regression test; no logic / wire / config / persistence change.Behavior change (intended)
Dark-mode appearance of the tree node boxes only: pale/white boxes → subtle dark tinted boxes. Light mode is byte-for-byte unchanged. That is the point of the fix.
Tests
tests/web-blocks-tree.test.ts: each of the five.g-node* rectrules must resolve itsfillto a theme variable (never a hardcoded#hex), and all three palettes must define the five vars — so any scheme silently falling back to a hardcoded fill re-breaks the test.tsc --noEmitclean;tests/web-blocks-tree.test.ts13/13 pass. Full suite runs in CI.Closes #5210