Skip to content

web(#2929): de-conflict the rest bucket color from the unattributed parent - #2959

Merged
ranxianglei merged 3 commits into
masterfrom
2026-10-14_rest-chip-gray
Oct 13, 2026
Merged

ranxianglei merged 3 commits into
masterfrom
2026-10-14_rest-chip-gray

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Follow-up to #2934 (merged d738886).

In the trajectory legend's bordered ⊇ group, the rest sub-item swatch was painted #8250df — the same purple as the parent 'unattributed repay' marker — so 'other' read as 'unattributed' rather than as its own dust bucket. Card chips had already moved to light gray (e76b35f); the chart-side copies were missed.

This points all three chart-side rest renderers at #9aa1a8:

  • CAUSE_COLOR.rest (band fill + spine stroke at client.ts:870/874)
  • the grouped sub-swatch under the unattributed frame
  • the no-seam fallback standalone swatch

No logic, no i18n, no other buckets touched. DOM probe on the real 2500-sample session confirms: unattributed = rgb(130,80,223) purple, other = rgb(154,161,168) gray.

The chart legend's 'rest' swatch shared the parent group's purple
(#8250df == det.cause_unattrib), so 其余 was indistinguishable from
未归因回补 itself. Point CAUSE_COLOR.rest and the two standalone
legend swatches at #9aa1a8 — the same light gray the economics card
chips already use (#2934/e76b35f9), keeping card<->chart consistent.
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-14_rest-chip-gray (857517e)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3349-pr.2959.f16f1be

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr2959.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Reviewed the branch (2026-10-14_rest-chip-gray) against the issue's three-renderer checklist. Found and fixed one missed copy.

Finding: b83cd37ed updated 2 of the 3 chart-side rest renderers. The third — the no-seam fallback standalone swatch — was still #8250df at src/web/client.ts:1279:

} else {
    parts.push(legendItem("background:#8250df", t("det.cause_ttl")));  // ← still purple
}

That branch renders when the ledger predates #1606 (no ledger.seam object), where the single rest swatch carries the det.cause_ttl key (= CAUSE_KEY.rest). Your DOM probe ran on a 2500-sample session that has seam data, so only the grouped ⊇ path rendered and this branch stayed invisible. Fixed directly as additive commit b4645f5f6 (1 line, same scope).

Verified on the branch:

  • CAUSE_COLOR.rest = "#9aa1a8" covers BOTH band fill and spine stroke (trajectorySvg uses CAUSE_COLOR[c] for each) ✓
  • grouped sub-swatch under the unattributed frame → #9aa1a8 ✓
  • no-seam fallback → #9aa1a8 (via b4645f5f6) ✓
  • remaining #8250df occurrences are intentional and untouched: the restart-bucket chip (line 1190, different bucket) and the unattributed PARENT marker (line 1274); card chips were already gray since fix(#2929): fold claim window covers the post-fold cold tail #2934 (line 1381)
  • diff stays 1 file / 2 commits / +3 −3; no logic, no i18n, no other buckets

CI (at time of writing): all static/guard gates green (static-gates ×4 OS, lane/kernel/pi-subagents guards, lock-sync, config-surface-guard, docs-surface checks, build-artifact); test jobs re-running on the new head.


结构化八问:

  1. 是什么问题:trajectory 图例里 rest(other)桶的颜色与父项「unattributed」同为紫色,视觉上无法区分。
  2. 什么原因导致的:fix(#2929): fold claim window covers the post-fold cold tail #2934 只把卡片 chip 改成浅灰,漏了图表侧的三份拷贝;本 PR 改了其中两份,第三份(无 seam 回退分支,老版本 ledger 无 ledger.seam 时渲染)因 DOM probe 只覆盖了有 seam 数据的会话而漏掉。
  3. 影响范围与严重程度:纯视觉。仅影响查看 web 会话页 trajectory 图例的用户;老 ledger(无 seam)场景下 rest 色块显示为紫色、易被误读为 unattributed。无功能影响。
  4. 怎么修复的:把 rest 桶的全部渲染点统一到 #9aa1a8——CAUSE_COLOR.rest 一处改动同时覆盖 band fill 与 spine stroke;父项标记保持紫色不动,形成「紫父 + 灰子」的从属关系。
  5. 是否有回归问题:无。逐项核对过文件内全部颜色引用:restart 桶(line 1190)与 unattributed 父标记(line 1274)的紫色是有意保留;卡片 chip 早已是灰;无逻辑/i18n/wire 变更。
  6. 是否破坏缓存:不涉及(纯前端渲染常量,不触碰任何缓存/重试/游标)。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:代码已对齐 issue 声明的全部三个渲染点,等 CI 全绿即可合并(合并由你操作:https://github.com/ranxianglei/billion-context/pull/2959)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 CI closed out — fully green, merge-ready. Follow-up to my review above:

Main CI (run on b4645f5f6): all green — test ×4 OS (ubuntu 22/24, windows 22/24) passed; every guard/static gate passed (static-gates, lane-guard, kernel-guard, lock-sync, config-surface-guard, pi-subagents-guard, unused-exports, docs-coverage, version-guard, docs-sync). PR is mergeable, no conflicts (only behind master, which is not a blocker).

build-artifact job — failed once, self-healed:

  • Attempt 1 died with E409 Cannot publish over previously staged version "0.0.3337-pr.2959.b2ee723" — but probing the registry showed the publish had actually landed server-side (version doc + tarball both exist and download); the npm CLI got the 409 on the conflicting commit step and reported failure. Transient registry race, not a content problem.
  • I re-ran the failed job; the workflow's own re-attempt suffix kicked in and attempt 2 published cleanly as 0.0.3337-pr.2959.b2ee723-a2 (job green).
  • Install either exact version to try the fix: npm install -g billion-context@0.0.3337-pr.2959.b2ee723-a2. The rolling pr tag has since moved on to another PR's newer build — normal rolling behavior, your immutable per-PR versions are unaffected.
  • Note for the record (no separate issue filed — this is a [PR] thread): the E409 class means "publish partially landed, CLI reported failure". The -a<attempt> suffix already covers recovery via re-run, so no change needed; flagging in case you ever want the job to verify-and-skip when the version already exists instead of failing.

八问(收工版):

  1. 是什么问题:rest 桶颜色与 unattributed 父项撞色(纯视觉)。
  2. 什么原因导致的:fix(#2929): fold claim window covers the post-fold cold tail #2934 只改了卡片 chip,图表侧三份拷贝本 PR 漏改一份(无 seam 回退分支)。
  3. 影响范围与严重程度:仅 web trajectory 图例视觉;老 ledger(无 seam)场景 rest 显示为紫,易误读。无功能影响。
  4. 怎么修复的:rest 桶全部渲染点统一到 #9aa1a8,父标记保持紫色。
  5. 是否有回归问题:无——全文件颜色引用逐项核对,restart 桶与父标记紫色有意保留;CI 全绿(含 4 平台测试)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:可合并。合并由你操作:#2959

Top-of-page surfaces (overview table, hit row) speak in % while the
economics card only gave absolutes — inconsistent for a card whose job
is 'where did this go'. Now:

- each tile value gets its share of TOTAL INPUT — same denominator as
  the cache-hit % above (new content 1.3%, post-fold rebuild 0.5%,
  unattributed repay 1.5%);
- the unattributed tile's chips get their share of that tile's parent
  total instead (41% provider-side / 32% rest / 15% rewind / 11% seam),
  since 'what eats the 2.6M' is the split users actually compare;
- zero values render no percentage; abortCorrelated stays a bare count
  marker (it carries no token charge).

Pure numeric formatting — no i18n keys, no ledger changes.
@ranxianglei
ranxianglei merged commit e462620 into master Oct 13, 2026
18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.352-master.e462620 (rolling master tag).

npm install -g billion-context@0.0.352-master.e462620  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

@ranxianglei ranxianglei mentioned this pull request Oct 13, 2026
@ranxianglei
ranxianglei deleted the 2026-10-14_rest-chip-gray branch October 15, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant