feat(tui,dashboard,docs): add context command parity and context health panel

This commit is contained in:
William Valentin
2026-02-16 18:08:19 -08:00
parent 21d57d991c
commit 409ab04ca1
8 changed files with 146 additions and 4 deletions
+1
View File
@@ -70,3 +70,4 @@ automation:
- Heartbeat notification noise is controlled by `automation.heartbeat.notify_cooldown` (default `30m`).
- If `notify_cooldown` is invalid, Flynn falls back to `30m` and logs a warning.
- Re-running setup Automation detects an existing Operator Pack and asks whether to reconfigure.
- For context-pressure observability, monitor audit events `session.checkpoint` and `session.auto_compact`.
+8 -2
View File
@@ -3505,7 +3505,7 @@
"status": "completed",
"date": "2026-02-16",
"updated": "2026-02-17",
"summary": "Implemented proactive context-window management end-to-end: orchestrator now exposes estimated context budget, emits staged context alerts, writes checkpoint summaries to memory near threshold, and can auto-compact proactively. Gateway now emits `context_warning` stream events during `agent.send`, serves `system.contextUsage` snapshots, and dashboard usage UI includes context budget visibility. Added config schema support under `compaction.proactive`, mapped runtime wiring in both WS SessionBridge and channel routing paths, and updated protocol/docs/default config examples with focused tests. Follow-up added `/context` command fast-path visibility and dedicated audit events for proactive checkpoint writes and proactive auto-compaction.",
"summary": "Implemented proactive context-window management end-to-end: orchestrator now exposes estimated context budget, emits staged context alerts, writes checkpoint summaries to memory near threshold, and can auto-compact proactively. Gateway now emits `context_warning` stream events during `agent.send`, serves `system.contextUsage` snapshots, and dashboard usage UI includes context budget visibility. Added config schema support under `compaction.proactive`, mapped runtime wiring in both WS SessionBridge and channel routing paths, and updated protocol/docs/default config examples with focused tests. Follow-up added `/context` command fast-path visibility, TUI parser/help/autocomplete + handler parity for `/context`, dedicated audit events for proactive checkpoint writes and proactive auto-compaction, and operator/docs references for those events.",
"files_modified": [
"src/context/compaction.ts",
"src/backends/native/prompts.ts",
@@ -3525,6 +3525,11 @@
"src/daemon/services.ts",
"src/gateway/ui/pages/chat.js",
"src/gateway/ui/pages/usage.js",
"src/gateway/ui/pages/dashboard.js",
"src/frontends/tui/commands.ts",
"src/frontends/tui/commands.test.ts",
"src/frontends/tui/minimal.ts",
"src/frontends/tui/components/App.tsx",
"src/commands/builtin/index.ts",
"src/commands/types.ts",
"src/commands/index.ts",
@@ -3533,11 +3538,12 @@
"src/audit/logger.ts",
"docs/api/PROTOCOL.md",
"README.md",
"docs/operations/OPERATOR_PACK.md",
"docs/performance/TUNING.md",
"config/default.yaml",
"docs/plans/state.json"
],
"test_status": "pnpm test:run src/backends/native/orchestrator.test.ts src/config/schema.test.ts src/gateway/handlers/agent.test.ts src/gateway/handlers/handlers.test.ts src/gateway/protocol.test.ts src/commands/builtin/index.test.ts + pnpm typecheck passing"
"test_status": "pnpm test:run src/backends/native/orchestrator.test.ts src/config/schema.test.ts src/gateway/handlers/agent.test.ts src/gateway/handlers/handlers.test.ts src/gateway/protocol.test.ts src/commands/builtin/index.test.ts src/frontends/tui/commands.test.ts + pnpm typecheck passing"
}
},
"overall_progress": {