mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-05 06:59:42 +02:00
fix(usage): make plan-usage chip work end-to-end + session-status footer
End-to-end testing on the real install surfaced several issues the unit tests missed: - Injection gate excluded real sessions: gated on workingDir under CASES_DIR, but sessions run in linked cases / real repos. Drop the gate (match updateCaseModel, which writes settings.local.json unconditionally). - statusLine curl failed on HTTPS: prod is loopback HTTPS with a self-signed cert; `curl -s` returns 000. Use `curl -sk` (loopback only). applyStatusLineConfig now also updates an out-of-date ours-command so the fix propagates. - Footer hijacked by limits: the in-terminal statusline now shows CURRENT SESSION status — `Opus 4.8 (1M context) in:562,411 out:1,188 ctx:56%` — while the account-wide plan limits live only in the header chip. - Chip blank after reload: persist last-known to localStorage and restore on load (account-global, slow-moving; 12h freshness guard). - Readability + color: per-window green/yellow/red by usage (<60 / 60–84 / ≥85), bolder labels and values. - Drop the renderIndexHtml strip (client-side reveal only, response-viewer pattern) — fixes server-index-title test fragility to local settings. Footer fields flow through context_window.total_input_tokens/total_output_tokens (schema + parser). Tests updated; verified live (footer, chip, colors, reload persistence) on the real install. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1123,13 +1123,6 @@ export class WebServer extends EventEmitter {
|
||||
if (settings.showMultiMonitorButton === true) {
|
||||
html = html.replace(' btn-multimonitor--hidden', '');
|
||||
}
|
||||
// Plan-usage chip: carries `header-plan-usage--hidden` by default (App
|
||||
// Settings → Display → "Plan Usage Limits"); reveal by stripping the marker
|
||||
// class when the user enabled it, so the chip paints in the right state on
|
||||
// every normal reload (the client toggles the same class live on save).
|
||||
if (settings.showPlanUsageLimits === true) {
|
||||
html = html.replace(' header-plan-usage--hidden', '');
|
||||
}
|
||||
// Detached single-session ("solo") window: inject the target session id so
|
||||
// the client can enter solo mode even if a (network-first) service worker
|
||||
// later serves a cached shell. The client primarily detects solo mode from
|
||||
|
||||
Reference in New Issue
Block a user