Repository navigation
[PR] fix(web): make compression-blocks treemap follow the dark theme - #5422
ranxianglei wants to merge 0 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.7685-pr.5422.89d6116This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5422.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 这是 #5417(treemap 深色模式不可读)的指定修复 PR,检索 open+closed 未见针对同一改动的并列 PR/issue。分类:bug 修复 · scope/ui · p3(深色下体验瑕疵,不丢数据、不影响核心功能)。 已拉分支 pr-5422 核对代码 + 独立复验,逐条如下。 结构化八问
补充验证
合并判定可合(approve)。方向对、根因修到位、浅色零漂移、深色补齐、回归测试有牙、CI 全绿、diff 干净(2 文件每行都在目的内)。满足 §7.4 自动合入门禁全部条件;按规矩我不执行 merge,请人工合并。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Review verdict: MERGEABLE — one small finding fixed directly on this PR's branch (below). Note: posted as a comment review because GitHub forbids approving one's own PR from this account; the review substance below stands as the approval record.
Direction check (issue #5417): verified the root cause independently — the five .g-node rect fills were pinned to hardcoded light hexes while node text runs on themed vars (.g-id/.g-meta fill: var(--text)/var(--text-muted)), so dark mode rendered light text on white/light grounds = unreadable. The fix targets the producer of the offending bytes (the fill values are now theme-driven at the source), not a symptom mask. Direction is correct.
Regression audit — existing behaviors of the touched paths, item by item:
- Light-mode rendering: NEW light var values are byte-identical to the old hexes (
#fff≡#ffffff; the other four verbatim) → preserved, zero drift. - OS-dark (
@media (prefers-color-scheme: dark) { :root:not([data-theme]) }) and?theme=darkpin: both palettes define all five vars; cascade verified across all four OS-scheme × pin combinations, including pinned-light inheriting the light values from base:root(the light pin block defines no tm vars) → correct. - Strokes (tier-1 var(--accent); tier-2/3/n mid-tone hexes legible on both grounds), text,
.inactive,:hover,.fselrules: untouched, preserved. - High-risk patterns (semantic drift, fail-fast→swallow, threshold/timing/output-format changes): not applicable — pure frontend CSS presentation, one view; no wire/config/persistence/kernel/update.ts touchpoints.
Test validity: the new guard has teeth in both directions — every node rule must use a var(--tm-*-fill) fill AND carry no hardcoded hex, and BOTH dark palettes must define all five vars; reverting any fill to a hardcode fails it. Matches the established theme-guard pattern in the same file (#4737).
Small finding fixed in review (own labeled commit f977355, comment/test-title only, zero behavior change): the CSS comment and test title cited #5419 — on GitHub that number is the unrelated release-v0.1.211 PR; the treemap dark-mode issue is #5417 (repo convention cites GitHub numbers throughout this file: #2473/#2559/#4737). Corrected in place per the fix-in-review rule; CI re-runs on the new head.
结构化八问
- 是什么问题:web 面板的压缩块树图不跟随暗色模式——节点填充写死浅色,文字走主题变量变浅,暗色下基本不可读。
- 什么原因导致的:树图后加时 5 个节点 fill 直接硬编码浅色 hex,没接进面板早已存在的暗色调色板;文字侧已用变量,暗色下 fill 与文字错配。
- 影响范围与严重程度:仅暗色模式(OS 偏好深色或
?theme=dark)下的树图视图;可读性缺陷(该场景该视图不可用),无数据丢失 → p3。 - 怎么修复的:引入 5 个
--tm-{base,t1,t2,t3,tn}-fill主题变量,在三个调色板块(亮色/OS 暗色/暗色 pin)各定义一次,5 条规则的 fill: 改引变量;描边/文字/inactive 不动。 - 是否有回归问题:无。亮色逐字节不变;描边/文字/hover/inactive/fsel 未触碰;四种主题组合级联逐一验证(见上方 regression audit)。原 head CI 绿;新 head 唯一差异是注释/测试标题修正,零行为影响。
- 是否破坏缓存:不涉及(纯前端 CSS,无缓存/重试/游标/去重键)。
- 是否改了设计方向:不涉及——沿用面板既有 CSS 变量主题机制。
- 是否引入了新的配置:不涉及——仅内部 CSS 变量,非用户配置/env/CLI flag。
判定:可合(新 head CI 绿后由 owner 合并)。
[bot] (ai: vllm-qwen/qwen3.8-27b) 被强制重启后恢复。汇报进度与结论: 结论:PR #5422 的改动已全部在 master 上,PR 冗余,建议关闭验证过程
结构化八问
处置建议PR #5422 的改动已全部在 master 上(含 reviewer 的 #5419→#5417 修正),PR 冗余。建议 owner 关闭 PR #5422。我不执行关闭(owner-only)。 |
[bot] (ai: vllm-qwen/qwen3.8-27b) Re-verified live state this run: 4 test shards still failing + merge state The PR's changes are already in master. Commit
I verified line-by-line that master's Why I am not rebasing or fixing the 4 red shards:
Recommendation: close PR #5422. Its work is done — it landed on master via |
[ework] auto-fix stalled: unused-exports — stopping for human review |
[bot] (ai: vllm-qwen/qwen3.8-27b) Re-verified live: state unchanged (open, dirty, 4 failed, sha |
[ework] auto-fix stalled: unused-exports — stopping for human review |
f977355 to
e1f31ad
Compare
Summary
The web panel's compression-blocks treemap did not follow the dark theme. Node fills were pinned to hardcoded light hexes (
#fff,#f2f7ff,#f6f3ff,#fffaf0,#f7f8fa) while node text usesvar(--text)— so in dark mode the map rendered light text on white/light fills and became essentially unreadable. The rest of the panel already supports dark mode; the treemap was simply left behind.Change
--tm-{base,t1,t2,t3,tn}-fillto all three palette blocks insrc/web/styles.ts(light + OS-dark +?theme=darkpin)..g-node/.g-node.tier-* rectrules'fill:at those vars. Strokes and text are untouched (already theme-aware / legible in both schemes).tests/web-blocks-tree.test.ts: each node rule must use avar(--tm-*-fill)fill (no hardcoded hex), and both dark palettes must define all five vars.Behavior change (flagged)
--tm-*-fillvalues are byte-identical to the previous hardcoded hexes, so light-mode rendering is identical.#182338, tier-2#241a38, tier-3#2c2416, neutral#1c2129) so the light node text stays legible. Previously the dark-mode treemap was unreadable.Tests
Targeted
tests/web-blocks-tree.test.tsgreen locally (13/13, including the new guard) on the rebased head; full suite + typecheck run on CI.Closes #5417