mirror of
https://github.com/lWolvesl/antigravity-usage-monitor.git
synced 2026-11-27 01:19:25 +08:00
fix(panel): remove 0.9x zoom distortion on structure previews and align capsule font/mock schema
This commit is contained in:
+11
-5
@@ -12237,10 +12237,12 @@ function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides = {})
|
|||||||
isRunning: true,
|
isRunning: true,
|
||||||
stepCount: 16,
|
stepCount: 16,
|
||||||
speedSampleCount: 15,
|
speedSampleCount: 15,
|
||||||
|
speedSummary: { sampleCount: 15, excludedCount: 1 },
|
||||||
latestTokPerSec: 68.4,
|
latestTokPerSec: 68.4,
|
||||||
avgTokPerSec: 54.8,
|
avgTokPerSec: 54.8,
|
||||||
latestTtftSec: 1.15,
|
latestTtftSec: 1.15,
|
||||||
avgTtftSec: 1.62,
|
avgTtftSec: 1.62,
|
||||||
|
ttftSummary: { avgSec: 1.62, sampleCount: 15 },
|
||||||
latestStepCostUsd: 0.042,
|
latestStepCostUsd: 0.042,
|
||||||
sessionCostUsd: 1.16,
|
sessionCostUsd: 1.16,
|
||||||
latestCacheHitPct: 94.5,
|
latestCacheHitPct: 94.5,
|
||||||
@@ -12271,10 +12273,12 @@ function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides = {})
|
|||||||
isRunning: false,
|
isRunning: false,
|
||||||
stepCount: 8,
|
stepCount: 8,
|
||||||
speedSampleCount: 8,
|
speedSampleCount: 8,
|
||||||
|
speedSummary: { sampleCount: 8, excludedCount: 0 },
|
||||||
latestTokPerSec: 96.2,
|
latestTokPerSec: 96.2,
|
||||||
avgTokPerSec: 88.5,
|
avgTokPerSec: 88.5,
|
||||||
latestTtftSec: 0.68,
|
latestTtftSec: 0.68,
|
||||||
avgTtftSec: 0.82,
|
avgTtftSec: 0.82,
|
||||||
|
ttftSummary: { avgSec: 0.82, sampleCount: 8 },
|
||||||
latestStepCostUsd: 0.009,
|
latestStepCostUsd: 0.009,
|
||||||
sessionCostUsd: 0.12,
|
sessionCostUsd: 0.12,
|
||||||
latestCacheHitPct: 88.1,
|
latestCacheHitPct: 88.1,
|
||||||
@@ -12298,8 +12302,10 @@ function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides = {})
|
|||||||
...mainAgent,
|
...mainAgent,
|
||||||
stepCount: 24,
|
stepCount: 24,
|
||||||
speedSampleCount: 23,
|
speedSampleCount: 23,
|
||||||
|
speedSummary: { sampleCount: 23, excludedCount: 1 },
|
||||||
avgTokPerSec: 59.6,
|
avgTokPerSec: 59.6,
|
||||||
avgTtftSec: 1.38,
|
avgTtftSec: 1.38,
|
||||||
|
ttftSummary: { avgSec: 1.38, sampleCount: 23 },
|
||||||
sessionCostUsd: 1.28,
|
sessionCostUsd: 1.28,
|
||||||
sessionCacheHitPct: 88.9,
|
sessionCacheHitPct: 88.9,
|
||||||
inputTokens: 186400,
|
inputTokens: 186400,
|
||||||
@@ -12313,8 +12319,9 @@ function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides = {})
|
|||||||
return {
|
return {
|
||||||
settings: mergedSettings,
|
settings: mergedSettings,
|
||||||
account: {
|
account: {
|
||||||
planName: 'Google AI Pro',
|
tierName: 'Google AI Ultra',
|
||||||
aiCredits: 1200,
|
planName: 'Pro',
|
||||||
|
aiCredits: 0,
|
||||||
},
|
},
|
||||||
quotas: {
|
quotas: {
|
||||||
activePool: {
|
activePool: {
|
||||||
@@ -14007,7 +14014,7 @@ const SettingsStructureTab = defineComponent({
|
|||||||
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'hover',
|
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'hover',
|
||||||
initialModuleKeys: [],
|
initialModuleKeys: [],
|
||||||
});
|
});
|
||||||
const hoverPreviewCanvas = h('div', { className: 'structure-preview-canvas is-scaled' }, [
|
const hoverPreviewCanvas = h('div', { className: 'structure-preview-canvas' }, [
|
||||||
hoverPreviewTipEl,
|
hoverPreviewTipEl,
|
||||||
hoverPreviewEmptyEl,
|
hoverPreviewEmptyEl,
|
||||||
]);
|
]);
|
||||||
@@ -14099,7 +14106,7 @@ const SettingsStructureTab = defineComponent({
|
|||||||
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'overview',
|
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'overview',
|
||||||
initialModuleKeys: [],
|
initialModuleKeys: [],
|
||||||
});
|
});
|
||||||
const overviewPreviewCanvas = h('div', { className: 'structure-preview-canvas is-scaled' }, [
|
const overviewPreviewCanvas = h('div', { className: 'structure-preview-canvas' }, [
|
||||||
overviewPreviewContainerEl,
|
overviewPreviewContainerEl,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -15796,7 +15803,6 @@ const LiveOverviewView = defineComponent({
|
|||||||
setup({ onCleanup }) {
|
setup({ onCleanup }) {
|
||||||
const overviewInner = h('div', {
|
const overviewInner = h('div', {
|
||||||
className: 'overview-modules-host',
|
className: 'overview-modules-host',
|
||||||
style: 'display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: 2px;',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const widgetHost = createDynamicWidgetHost({
|
const widgetHost = createDynamicWidgetHost({
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>用量监控</title>
|
<title>用量监控</title>
|
||||||
<link rel="stylesheet" href="/styles.css?v=1794974101279">
|
<link rel="stylesheet" href="/styles.css?v=1794975028421">
|
||||||
<script src="/preload.js"></script>
|
<script src="/preload.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app-root"></div>
|
<div id="app-root"></div>
|
||||||
<script src="/app.js?v=1794974101279"></script>
|
<script src="/app.js?v=1794975028421"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -220,10 +220,12 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
|||||||
isRunning: true,
|
isRunning: true,
|
||||||
stepCount: 16,
|
stepCount: 16,
|
||||||
speedSampleCount: 15,
|
speedSampleCount: 15,
|
||||||
|
speedSummary: { sampleCount: 15, excludedCount: 1 },
|
||||||
latestTokPerSec: 68.4,
|
latestTokPerSec: 68.4,
|
||||||
avgTokPerSec: 54.8,
|
avgTokPerSec: 54.8,
|
||||||
latestTtftSec: 1.15,
|
latestTtftSec: 1.15,
|
||||||
avgTtftSec: 1.62,
|
avgTtftSec: 1.62,
|
||||||
|
ttftSummary: { avgSec: 1.62, sampleCount: 15 },
|
||||||
latestStepCostUsd: 0.042,
|
latestStepCostUsd: 0.042,
|
||||||
sessionCostUsd: 1.16,
|
sessionCostUsd: 1.16,
|
||||||
latestCacheHitPct: 94.5,
|
latestCacheHitPct: 94.5,
|
||||||
@@ -254,10 +256,12 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
|||||||
isRunning: false,
|
isRunning: false,
|
||||||
stepCount: 8,
|
stepCount: 8,
|
||||||
speedSampleCount: 8,
|
speedSampleCount: 8,
|
||||||
|
speedSummary: { sampleCount: 8, excludedCount: 0 },
|
||||||
latestTokPerSec: 96.2,
|
latestTokPerSec: 96.2,
|
||||||
avgTokPerSec: 88.5,
|
avgTokPerSec: 88.5,
|
||||||
latestTtftSec: 0.68,
|
latestTtftSec: 0.68,
|
||||||
avgTtftSec: 0.82,
|
avgTtftSec: 0.82,
|
||||||
|
ttftSummary: { avgSec: 0.82, sampleCount: 8 },
|
||||||
latestStepCostUsd: 0.009,
|
latestStepCostUsd: 0.009,
|
||||||
sessionCostUsd: 0.12,
|
sessionCostUsd: 0.12,
|
||||||
latestCacheHitPct: 88.1,
|
latestCacheHitPct: 88.1,
|
||||||
@@ -281,8 +285,10 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
|||||||
...mainAgent,
|
...mainAgent,
|
||||||
stepCount: 24,
|
stepCount: 24,
|
||||||
speedSampleCount: 23,
|
speedSampleCount: 23,
|
||||||
|
speedSummary: { sampleCount: 23, excludedCount: 1 },
|
||||||
avgTokPerSec: 59.6,
|
avgTokPerSec: 59.6,
|
||||||
avgTtftSec: 1.38,
|
avgTtftSec: 1.38,
|
||||||
|
ttftSummary: { avgSec: 1.38, sampleCount: 23 },
|
||||||
sessionCostUsd: 1.28,
|
sessionCostUsd: 1.28,
|
||||||
sessionCacheHitPct: 88.9,
|
sessionCacheHitPct: 88.9,
|
||||||
inputTokens: 186400,
|
inputTokens: 186400,
|
||||||
@@ -296,8 +302,9 @@ export function buildStructurePreviewTelemetry(baseSettings = {}, draftOverrides
|
|||||||
return {
|
return {
|
||||||
settings: mergedSettings,
|
settings: mergedSettings,
|
||||||
account: {
|
account: {
|
||||||
planName: 'Google AI Pro',
|
tierName: 'Google AI Ultra',
|
||||||
aiCredits: 1200,
|
planName: 'Pro',
|
||||||
|
aiCredits: 0,
|
||||||
},
|
},
|
||||||
quotas: {
|
quotas: {
|
||||||
activePool: {
|
activePool: {
|
||||||
|
|||||||
@@ -94,6 +94,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* --- 2. 多任务实时运行卡片列表与 4 格测速指标矩阵 (Live Running Tasks List & 4-Cell Telemetry Matrix) --- */
|
/* --- 2. 多任务实时运行卡片列表与 4 格测速指标矩阵 (Live Running Tasks List & 4-Cell Telemetry Matrix) --- */
|
||||||
|
.overview-modules-host {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-3);
|
||||||
|
min-width: 0;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.live-activity-list {
|
.live-activity-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -230,19 +230,15 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- 结构页真实 UI 实时预览画布(无套娃外框,直接呈现真实组件) --- */
|
/* --- 结构页真实 UI 实时预览画布(1:1 零缩放、零套娃外框,直接呈现真实组件) --- */
|
||||||
.structure-preview-canvas {
|
.structure-preview-canvas {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-2);
|
gap: var(--space-3);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.structure-preview-canvas.is-scaled {
|
|
||||||
zoom: 0.9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wm-hover-tip.is-preview {
|
.wm-hover-tip.is-preview {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: auto;
|
top: auto;
|
||||||
@@ -260,10 +256,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.overview-modules-host.is-preview {
|
.overview-modules-host.is-preview {
|
||||||
display: flex;
|
padding-bottom: 0;
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--space-2);
|
|
||||||
min-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.structure-preview-empty,
|
.structure-preview-empty,
|
||||||
@@ -296,6 +289,10 @@
|
|||||||
background: var(--surface-bg);
|
background: var(--surface-bg);
|
||||||
border: 1px solid var(--border-hairline);
|
border: 1px solid var(--border-hairline);
|
||||||
border-radius: var(--radius-xs);
|
border-radius: var(--radius-xs);
|
||||||
|
font-family: "Google Sans Flex", "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ export const LiveOverviewView = defineComponent({
|
|||||||
setup({ onCleanup }) {
|
setup({ onCleanup }) {
|
||||||
const overviewInner = h('div', {
|
const overviewInner = h('div', {
|
||||||
className: 'overview-modules-host',
|
className: 'overview-modules-host',
|
||||||
style: 'display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: 2px;',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const widgetHost = createDynamicWidgetHost({
|
const widgetHost = createDynamicWidgetHost({
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ export const SettingsStructureTab = defineComponent({
|
|||||||
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'hover',
|
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'hover',
|
||||||
initialModuleKeys: [],
|
initialModuleKeys: [],
|
||||||
});
|
});
|
||||||
const hoverPreviewCanvas = h('div', { className: 'structure-preview-canvas is-scaled' }, [
|
const hoverPreviewCanvas = h('div', { className: 'structure-preview-canvas' }, [
|
||||||
hoverPreviewTipEl,
|
hoverPreviewTipEl,
|
||||||
hoverPreviewEmptyEl,
|
hoverPreviewEmptyEl,
|
||||||
]);
|
]);
|
||||||
@@ -541,7 +541,7 @@ export const SettingsStructureTab = defineComponent({
|
|||||||
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'overview',
|
isVisibleFn: () => isStructureVisible() && activeThirdTab === 'overview',
|
||||||
initialModuleKeys: [],
|
initialModuleKeys: [],
|
||||||
});
|
});
|
||||||
const overviewPreviewCanvas = h('div', { className: 'structure-preview-canvas is-scaled' }, [
|
const overviewPreviewCanvas = h('div', { className: 'structure-preview-canvas' }, [
|
||||||
overviewPreviewContainerEl,
|
overviewPreviewContainerEl,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
+15
-10
@@ -1341,6 +1341,14 @@ html[data-standalone="true"] .app-shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* --- 2. 多任务实时运行卡片列表与 4 格测速指标矩阵 (Live Running Tasks List & 4-Cell Telemetry Matrix) --- */
|
/* --- 2. 多任务实时运行卡片列表与 4 格测速指标矩阵 (Live Running Tasks List & 4-Cell Telemetry Matrix) --- */
|
||||||
|
.overview-modules-host {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-3);
|
||||||
|
min-width: 0;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.live-activity-list {
|
.live-activity-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -3584,19 +3592,15 @@ html[data-standalone="true"] .app-shell {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- 结构页真实 UI 实时预览画布(无套娃外框,直接呈现真实组件) --- */
|
/* --- 结构页真实 UI 实时预览画布(1:1 零缩放、零套娃外框,直接呈现真实组件) --- */
|
||||||
.structure-preview-canvas {
|
.structure-preview-canvas {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-2);
|
gap: var(--space-3);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.structure-preview-canvas.is-scaled {
|
|
||||||
zoom: 0.9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wm-hover-tip.is-preview {
|
.wm-hover-tip.is-preview {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: auto;
|
top: auto;
|
||||||
@@ -3614,10 +3618,7 @@ html[data-standalone="true"] .app-shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.overview-modules-host.is-preview {
|
.overview-modules-host.is-preview {
|
||||||
display: flex;
|
padding-bottom: 0;
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--space-2);
|
|
||||||
min-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.structure-preview-empty,
|
.structure-preview-empty,
|
||||||
@@ -3650,6 +3651,10 @@ html[data-standalone="true"] .app-shell {
|
|||||||
background: var(--surface-bg);
|
background: var(--surface-bg);
|
||||||
border: 1px solid var(--border-hairline);
|
border: 1px solid var(--border-hairline);
|
||||||
border-radius: var(--radius-xs);
|
border-radius: var(--radius-xs);
|
||||||
|
font-family: "Google Sans Flex", "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -818,4 +818,6 @@ test('post-compaction context preserves static channels + checkpoint summary, ca
|
|||||||
assert.match(stylesCss, /\.long-pill-nav\s*\{[^}]*container-type:\s*inline-size;[^}]*minmax\(0,\s*1fr\)[^}]*overflow:\s*hidden;/s);
|
assert.match(stylesCss, /\.long-pill-nav\s*\{[^}]*container-type:\s*inline-size;[^}]*minmax\(0,\s*1fr\)[^}]*overflow:\s*hidden;/s);
|
||||||
assert.match(stylesCss, /\.pill-tab\s*\{[^}]*min-width:\s*0;/s);
|
assert.match(stylesCss, /\.pill-tab\s*\{[^}]*min-width:\s*0;/s);
|
||||||
assert.match(stylesCss, /@container\s*\(max-width:\s*30em\)\s*\{[\s\S]*?\.pill-tab-badge\s*\{\s*display:\s*none\s*!important;/);
|
assert.match(stylesCss, /@container\s*\(max-width:\s*30em\)\s*\{[\s\S]*?\.pill-tab-badge\s*\{\s*display:\s*none\s*!important;/);
|
||||||
|
assert.doesNotMatch(stylesCss, /\.structure-preview-canvas[^{]*\{[^}]*zoom:/, 'Structure preview must stay 1:1 without zoom distortion');
|
||||||
|
assert.match(stylesCss, /\.preview-capsule-bar\s*\{[^}]*"Google Sans Flex"/s);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1943,6 +1943,21 @@ test('Compiled app.js mounts dual Shadow DOM hosts, tracks /c/<uuid> routes, pro
|
|||||||
assert.equal(sec2.hasAttribute('hidden'), false);
|
assert.equal(sec2.hasAttribute('hidden'), false);
|
||||||
const overviewPreviewHostEl = sec2.querySelector('.overview-modules-host');
|
const overviewPreviewHostEl = sec2.querySelector('.overview-modules-host');
|
||||||
assert.equal(overviewPreviewHostEl.children.length, 4, 'Overview preview mounts all 4 real overview widgets');
|
assert.equal(overviewPreviewHostEl.children.length, 4, 'Overview preview mounts all 4 real overview widgets');
|
||||||
|
assert.equal(
|
||||||
|
sec2.querySelector('.structure-preview-canvas').classList.contains('is-scaled'),
|
||||||
|
false,
|
||||||
|
'Overview preview canvas renders 1:1 without zoom scaling'
|
||||||
|
);
|
||||||
|
const previewCellSubs = Array.from(overviewPreviewHostEl.children[0].querySelectorAll('.cell-sub')).map(
|
||||||
|
(el) => el.textContent
|
||||||
|
);
|
||||||
|
assert.ok(previewCellSubs.includes('均值 1.4s'), 'Preview TTFT card shows populated mean TTFT');
|
||||||
|
assert.ok(previewCellSubs.includes('有效 23/24 步'), 'Preview Avg TPS card shows populated valid sample ratio');
|
||||||
|
assert.equal(
|
||||||
|
overviewPreviewHostEl.children[2].querySelector('.panel-meta').textContent,
|
||||||
|
'Google AI Ultra · Pro',
|
||||||
|
'Preview quota badge matches real tier · plan format'
|
||||||
|
);
|
||||||
|
|
||||||
const [ovModWrap, ovMetricWrap] = sec2.querySelectorAll('.editable-slot-wrap');
|
const [ovModWrap, ovMetricWrap] = sec2.querySelectorAll('.editable-slot-wrap');
|
||||||
// Move row 2 ('quotas') up above 'context' -> ['metrics', 'quotas', 'context', 'live_tasks']
|
// Move row 2 ('quotas') up above 'context' -> ['metrics', 'quotas', 'context', 'live_tasks']
|
||||||
|
|||||||
Reference in New Issue
Block a user