perf(panel): add incremental step transport, memoized aggregation, atomic cache writes, and hidden-view gating

- Project display-only step fields in /api/telemetry, skip unchanged step payloads via stepRevision, coalesce identical client refreshes, and share in-flight backend trajectory scans across same-account requests
- Reuse normalized step values and memoize up to two range aggregations in usage-aggregator gated by step timestamps, pricing revision, model overrides, timezone, and source identity; cache per-trajectory model facts and single-agent step preparation via WeakMap/WeakRef
- Persist trajectory checkpoints atomically in trajectory-cache-file.mjs via chunked writevSync + renameSync while reusing serialized step byte slices for unchanged conversations
- Render step turn-rail lines/dots via CSS pseudo-elements, allocate speed-reason nodes on demand, short-circuit unchanged table reconciliations, and cache per-series LOESS publication fits in SessionStepCharts
- Gate DOM updates and timers across closed overlay panels, hover popups, inactive settings tabs, and unchanged ConsumptionView payloads
- Distinguish canceled steps (CORTEX_STEP_STATUS_CANCELED) and untimed compaction steps from generic incomplete timing in speed-metrics and bilingual i18n labels
This commit is contained in:
fish
2026-11-15 23:33:08 +09:00
parent 03d3160ef0
commit 8968e03adb
33 changed files with 1692 additions and 920 deletions
+16 -10
View File
@@ -2669,29 +2669,37 @@ input {
--rail-dot: var(--accent-primary);
}
.turn-rail-line {
.turn-rail::before {
content: '';
position: absolute;
left: 3.25px;
width: 1.5px;
background: var(--rail-line);
}
.turn-rail.has-up.has-down .turn-rail-line {
.turn-rail:not(.has-up):not(.has-down)::before {
display: none;
}
.turn-rail.has-up.has-down::before {
top: 0;
bottom: 0;
}
.turn-rail.has-up:not(.has-down) .turn-rail-line {
.turn-rail.has-up:not(.has-down)::before {
top: 0;
bottom: 50%;
}
.turn-rail.has-down:not(.has-up) .turn-rail-line {
.turn-rail.has-down:not(.has-up)::before {
top: 50%;
bottom: 0;
}
.turn-rail-dot {
.turn-rail.is-cap::after,
.turn-rail.is-origin::after {
content: '';
box-sizing: border-box;
position: absolute;
top: 50%;
left: 4px;
@@ -2699,13 +2707,13 @@ input {
border-radius: var(--radius-pill);
}
.turn-rail-dot.is-cap {
.turn-rail.is-cap::after {
width: 3.5px;
height: 3.5px;
background: var(--rail-line);
}
.turn-rail-dot.is-origin {
.turn-rail.is-origin::after {
width: 6px;
height: 6px;
background: var(--surface-panel);
@@ -2713,13 +2721,11 @@ input {
box-shadow: 0 0 0 1px var(--surface-panel);
}
.turn-rail.is-latest .turn-rail-dot.is-origin {
.turn-rail.is-latest.is-origin::after {
background: var(--rail-dot);
}
.turn-rail[hidden],
.turn-rail-line[hidden],
.turn-rail-dot[hidden],
.turn-prompt-tip[hidden] {
display: none !important;
}