mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-27 01:19:25 +08:00
feat(panel): refine session picker, summary cards, and curve dots
- Declutter session dropdown rows by moving workspace tags to search and hover tooltips, compacting inline UUIDs and multi-agent step counts, separating the auto-follow option, and aligning right-hand step columns - Align StepsDetailView model summary cards with ConsumptionView breakdown rows using share pills and right-aligned call counts, and restyle the session anomaly strip with a status dot and neutral pill tags - Replace baseline anomaly rug ticks in SessionLineChart with borderless on-curve spline dots backed by anomaly-aware downsampling and exact cubic y-evaluation - Compact the second row of ConsumptionView overview metrics by removing redundant sub-captions and matching the top-row label-over-hero-number hierarchy
This commit is contained in:
@@ -1779,8 +1779,18 @@ test('Feature 13: TopSessionHeader exposes project/workspace tags on sessions an
|
||||
header.refs.convSelect.open();
|
||||
|
||||
const optionEls = header.refs.convSelect.el.querySelectorAll('.select-option');
|
||||
const billingOpt = optionEls.find((el) => (el.textContent || '').includes('billing-service'));
|
||||
assert.ok(billingOpt, 'Session dropdown option displays workspaceName tag');
|
||||
const billingOpt = optionEls.find((el) => el.getAttribute('data-value') === 'proj-conv-1');
|
||||
assert.ok(billingOpt, 'Session dropdown renders proj-conv-1 option');
|
||||
assert.equal(
|
||||
(billingOpt.textContent || '').includes('billing-service'),
|
||||
false,
|
||||
'Session dropdown hides noisy workspaceName from visible row text'
|
||||
);
|
||||
assert.match(
|
||||
billingOpt.getAttribute('title') || '',
|
||||
/billing-service/,
|
||||
'Session dropdown preserves workspace path in hover tooltip'
|
||||
);
|
||||
|
||||
const searchInput = header.refs.convSelect.el.querySelector('.select-search-input');
|
||||
assert.ok(searchInput, 'Search input present for >6 sessions');
|
||||
@@ -1790,7 +1800,8 @@ test('Feature 13: TopSessionHeader exposes project/workspace tags on sessions an
|
||||
.querySelectorAll('.select-option')
|
||||
.filter((el) => !el.hasAttribute('hidden'));
|
||||
assert.equal(visibleOpts.length, 1);
|
||||
assert.match(visibleOpts[0].textContent, /web-dashboard/);
|
||||
assert.equal(visibleOpts[0].getAttribute('data-value'), 'proj-conv-2');
|
||||
assert.match(visibleOpts[0].getAttribute('title') || '', /web-dashboard/);
|
||||
});
|
||||
|
||||
test('Feature 14: compact vertical ActionMenu replaces export bars, backend exports files safely with reveal whitelist and toast feedback', async (t) => {
|
||||
|
||||
@@ -857,10 +857,11 @@ test('StepsDetailView total summary cards, session anomaly strip, click-to-filte
|
||||
metric: 'tps',
|
||||
});
|
||||
const lineAnomalyDots = lineChart.el.querySelectorAll('.sstep-anomaly-dot');
|
||||
assert.equal(lineAnomalyDots.length, 1, 'Line chart renders bottom rug tick marker even when steps > 64');
|
||||
assert.equal(lineAnomalyDots[0].tagName.toLowerCase(), 'line');
|
||||
assert.equal(lineAnomalyDots[0].classList.contains('sstep-anomaly-tick'), true);
|
||||
assert.equal(lineAnomalyDots.length, 1, 'Line chart renders on-curve anomaly dot even when steps > 64');
|
||||
assert.equal(lineAnomalyDots[0].tagName.toLowerCase(), 'circle');
|
||||
assert.equal(lineAnomalyDots[0].classList.contains('is-danger'), true);
|
||||
const dotCy = Number(lineAnomalyDots[0].getAttribute('cy'));
|
||||
assert.ok(dotCy > 10 && dotCy < 96, `Expected anomaly dot directly on curve (cy=${dotCy}), not at baseline`);
|
||||
|
||||
fitChart = createModelFitChart();
|
||||
fitChart.update({
|
||||
|
||||
@@ -2491,9 +2491,12 @@ test('Compiled app.js mounts dual Shadow DOM hosts, tracks /c/<uuid> routes, pro
|
||||
assert.equal(smodelCards.length, 2, 'Two minimalist model summary cards rendered');
|
||||
assert.equal(smodelCards[0].classList.contains('is-fit-active'), true);
|
||||
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('.cons-share-pill').textContent, /%/);
|
||||
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-foot').textContent,
|
||||
/输入 2\.5k.*缓存 34\.6k.*思考 420.*输出 265.*调用 1/
|
||||
);
|
||||
|
||||
// Simulate live telemetry poll where a subagent spawns on 'Gemini 3 Flash' (changing activeModelLabel)
|
||||
// while the user remains inside 总汇总 -> fit model MUST NOT jump!
|
||||
|
||||
Reference in New Issue
Block a user