feat(panel): add worker hot-reload, sticky bridge lease, custom token combos, trimmed model IDs, and adaptive popover width

- Isolate SidecarApp /api/* backend runtime inside a hot-swappable Worker thread (sidecar-worker.mjs) with 3s disk-drift detection and queued request handoff so live plugin updates never drop the host-assigned SidecarApp port
- Persist and reuse sticky loopback bridge port/token leases across bridge-daemon and worker reloads, pre-bind the bridge server on boot, allow /api/cache/rebuild on the bridge, and self-heal poisoned CDP fallback states back to HTTP
- Add billing-aligned In / Out / Cache (tokens_io_cache) preset with per-segment USD hover breakdown and custom format DSL (tokens_custom + stepTokenComboFormat, e.g. context:new:cache, in:out:cache)
- Add 3-way model name format (short / upstream / upstream_compact) stripping gemini-, claude-, and gpt- prefixes while protecting compaction suffixes from ellipsis truncation
- Add adaptive content-fit popover width (auto up to viewport bounds on wide step tables) alongside custom fixed width (440-1080 px)
This commit is contained in:
fish
2026-11-16 16:55:56 +09:00
parent cd841b55cf
commit 3b36ade911
33 changed files with 3124 additions and 381 deletions
@@ -22,6 +22,7 @@ import {
formatAgentBadgeText,
formatAgentLabel,
getAgentBadgeClass,
normalizeClientStepTokenComboFormat,
} from '../../store/telemetryStore.js';
export function formatTurnPromptText(rawPrompt) {
@@ -45,17 +46,19 @@ export const StepTableWidget = defineComponent({
const stepsTheadRow = h('tr');
const stepsTbody = h('tbody');
function syncTableHeaderColumns(colKeys) {
function syncTableHeaderColumns(colKeys, headerCtx = {}) {
const locale = getEffectiveLocale();
const fmtKey = normalizeClientStepTokenComboFormat(headerCtx?.stepTokenComboFormat);
const ctx = { stepTokenComboFormat: fmtKey };
patchKeyedList(stepsTheadRow, colKeys, {
keyFn: (colKey) => colKey,
sigFn: (colKey) => `${locale}:${colKey}:${STEP_COLUMN_REGISTRY[colKey].thLabel()}`,
sigFn: (colKey) => `${locale}:${colKey}:${fmtKey}:${STEP_COLUMN_REGISTRY[colKey].thLabel(ctx)}`,
createRow: (colKey) => {
const th = h('th', { text: STEP_COLUMN_REGISTRY[colKey].thLabel() });
const th = h('th', { text: STEP_COLUMN_REGISTRY[colKey].thLabel(ctx) });
return { el: th, refs: { th } };
},
updateRow: (refs, colKey) => {
patchText(refs.th, STEP_COLUMN_REGISTRY[colKey].thLabel());
patchText(refs.th, STEP_COLUMN_REGISTRY[colKey].thLabel(ctx));
},
});
}
@@ -169,13 +172,16 @@ export const StepTableWidget = defineComponent({
showStepTurnRail = false,
showStepAgentBadge = true,
showStepSpeedColor = false,
stepTokenComboFormat = undefined,
displaySettings = {},
} = {}
) {
const colOrderSig = colKeys.join(',');
const normTokenFmt = normalizeClientStepTokenComboFormat(stepTokenComboFormat);
const renderOptions = JSON.stringify([
cascadeId, locale, colOrderSig, effectiveScopes, hasSubagents, isMergedMultiAgents,
showStepTurnRail, showStepAgentBadge, showStepSpeedColor, displaySettings.showUpstreamModel,
showStepTurnRail, showStepAgentBadge, showStepSpeedColor, normTokenFmt,
displaySettings.modelDisplayMode, displaySettings.showUpstreamModel,
displaySettings.orchestratorIdMode,
]);
if (lastRenderOptions === renderOptions && lastRenderedRows &&
@@ -184,13 +190,14 @@ export const StepTableWidget = defineComponent({
return;
}
const wantedSet = new Set(colKeys);
syncTableHeaderColumns(colKeys);
syncTableHeaderColumns(colKeys, { stepTokenComboFormat: normTokenFmt });
const showAgentBadge = Boolean(hasSubagents && showStepAgentBadge);
const cellCtx = {
hasSubagents,
showAgentBadge,
showStepSpeedColor,
stepTokenComboFormat: normTokenFmt,
effectiveScopes,
scopeSigKey: effectiveScopes.join(','),
displaySettings,