feat(panel): unify token breakdown order and flatten tooltip cards

This commit is contained in:
fish
2026-11-21 00:41:53 +09:00
parent 55320df9b7
commit 6411e49ac4
13 changed files with 200 additions and 95 deletions
@@ -103,6 +103,10 @@ test('FourSegmentBar supports percentage scaling while keeping 100% default for
thinkingTokens: 100,
});
const segsFull = barFull.el.querySelectorAll('.progress-seg');
assert.deepEqual(
segsFull.map((el) => el.className.split(/\s+/).find((c) => c.startsWith('seg-'))),
['seg-input', 'seg-cached', 'seg-thinking', 'seg-output']
);
const sumFull = segsFull.reduce((acc, el) => acc + parsePctVar(el), 0);
assert.ok(Math.abs(sumFull - 100) < 0.05);
+12
View File
@@ -279,6 +279,18 @@ test('applyAppearanceToRoot and SettingsGeneralTab toggle data-modern-ui + data-
builtStyles,
/\[data-modern-ui="true"\]\s+\.trend-tooltip\.is-tracking\s*\{[^}]*150ms/
);
assert.match(
builtStyles,
/\.trend-tip-sub\s*\{[^}]*background:\s*transparent;/
);
assert.match(
builtStyles,
/\.trend-tip-cost\s*\{[^}]*background:\s*transparent;/
);
assert.match(
builtStyles,
/\[data-modern-ui="true"\]\s+\.trend-tip-sub,\s*\[data-modern-ui="true"\]\s+\.trend-tip-cost\s*\{[^}]*background:\s*transparent;/
);
assert.match(
builtStyles,
/\[data-modern-ui="true"\]\.wm-multi-panel\s+\.live-task-card[\s\S]*?background:\s*transparent;/
+1 -1
View File
@@ -2341,7 +2341,7 @@ test('Compiled app.js mounts dual Shadow DOM hosts, tracks /c/<uuid> routes, pro
assert.equal(smodelCards[0].querySelector('.smodel-name').textContent, 'gemini-4-hydrogen');
assert.equal(smodelCards[0].querySelector('.smodel-calls-pill').textContent, '1次 · 50%');
assert.match(smodelCards[0].querySelector('.smodel-perf').textContent, /均速 92\.3 tok\/s · 首字 5\.6s · 缓存 93\.3%/);
assert.match(smodelCards[0].querySelector('.smodel-split').textContent, /入 2\.5k · 缓 34\.6k · 思 420 · 正 265/);
assert.match(smodelCards[0].querySelector('.smodel-split').textContent, /输入 2\.5k.*缓存 34\.6k.*思考 420.*输出 265/);
// Simulate live telemetry poll where a subagent spawns on 'Gemini 3 Flash' (changing activeModelLabel)
// while the user remains inside 总汇总 -> fit model MUST NOT jump!