FE-845: TUI chrome resolutions pass II#203
Conversation
PR SummaryMedium Risk Overview Exports Reviewed by Cursor Bugbot for commit 60451fb. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR continues FE-845 chrome polish by wiring real runtime posture switching into the Pi extension command surface, adding TUI picker overlays for strategy/lens selection, and extending Tier-2 + unit test coverage to prove the command → transcript runtime state → chrome/tooling projections path.
Changes:
- Exported runtime axis vocabularies and implemented
/brunch:lens,/brunch:strategy, and/brunch:modecommands (with picker overlays when invoked without args). - Added new runtime posture picker component(s) and associated tests.
- Extended Tier-2 harness and chrome/TUI tests to validate runtime switch behavior and chrome footer projection.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/session/runtime-state.ts | Exports runtime axis vocabularies for validation at adapter/command surfaces. |
| src/dev/tier-2-harness.test.ts | Adds a real-boot test proving the registered runtime switch command path. |
| src/app/brunch-tui.test.ts | Updates command registration assertions to reflect new non-stub runtime commands. |
| src/.pi/extensions/commands/index.ts | Implements runtime switch commands and wires them into Brunch command registration. |
| src/.pi/components/runtime-posture/strategy-picker.ts | Adds a re-export wrapper for the strategy picker component. |
| src/.pi/components/runtime-posture/axis-picker.ts | Adds the reusable runtime axis picker overlay component used by commands. |
| src/.pi/tests/support/tui-theme.ts | Introduces a test theme to make ANSI rendering assertions stable. |
| src/.pi/tests/runtime-switch-command.test.ts | Adds unit tests for runtime switch command validation and entry appending. |
| src/.pi/tests/runtime-axis-picker.test.ts | Adds unit tests for picker rendering, cycling, and commit/cancel behavior. |
| src/.pi/tests/chrome.test.ts | Ensures chrome footer prefers projected runtime telemetry over launch-time fallback. |
| memory/cards/tooling--runtime-state-commands.md | Adds a work card documenting the runtime state command slice and verification approach. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| appendBrunchAgentRuntimeSwitch( | ||
| { | ||
| getEntries: () => ctx.sessionManager.getEntries(), | ||
| appendCustomEntry: (customType, data) => { | ||
| pi.appendEntry(customType, data); | ||
| return ''; | ||
| }, | ||
| }, | ||
| nextState, | ||
| 'user', | ||
| ); |
| if (selection === current.operationalMode) { | ||
| ctx.ui.notify('Brunch mode is already elicit.', 'info'); | ||
| return; | ||
| } |
| ctx.ui.notify( | ||
| 'Only elicit mode is available in this Brunch build; execute mode is not implemented.', | ||
| 'error', | ||
| ); |
| - Seam: Brunch TUI chrome + Pi extension commands over transcript-backed runtime state (`src/.pi/extensions/{commands,runtime,chrome}` → `src/session/runtime-state.ts` → `src/projections/session/*`). | ||
| - Nearby frontier: this is not yet a named `memory/PLAN.md` frontier; it is FE-845 branch work. It should build on the active lower-stack `dx-tier-2-harness` frontier (`ln/fe-847-dx-introspection-tier-2`) for real-boot/faux-turn proof rather than inventing a local fake harness. | ||
| - Volatile state: user declared Pi update suppression and new-session header recovery sufficiently done; keyboard shortcut lookup overlay and `src/.pi/components/tui-lab/` posture UI experiments are deferred for later implementation, not part of this card. | ||
| - TUI interaction model for this slice: go straight through namespaced slash commands as the first user-facing surface (`/brunch:strategy`, `/brunch:lens`, mode read/no-op). Use notifications/errors for feedback; do not introduce a custom selector/overlay yet. |
| Custom TUI controls are explicitly out of scope. The experimental `src/.pi/components/tui-lab/` segment/chip components are promising for a follow-on posture picker or overlay, but this slice should not couple runtime authority to that exploratory UI. | ||
|
|
| └── explicit non-scope | ||
| ├── update suppression/header recovery remain treated as already accomplished | ||
| ├── keyboard shortcut lookup overlay is documented as deferred, not implemented here | ||
| └── tui-lab posture picker/overlay is deferred to a following slice |
| import { | ||
| AGENT_LENS_IDS, | ||
| AGENT_STRATEGY_IDS, | ||
| type AgentLensSelection, | ||
| type AgentStrategySelection, | ||
| } from '../../../session/runtime-state.js'; | ||
| import { | ||
| nextSegmentIndex, | ||
| previousSegmentIndex, | ||
| renderSegmentTrack, | ||
| safeLines, | ||
| type LabTheme, | ||
| type TrackSegment, | ||
| } from '../tui-lab/index.js'; | ||
|
|
||
| interface Component { | ||
| render(width: number): string[]; | ||
| handleInput?(data: string): void; | ||
| invalidate(): void; | ||
| } |
da0360b to
b944790
Compare
f36df77 to
13c0aca
Compare
b944790 to
61eaa48
Compare
13c0aca to
50e5001
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 61eaa48. Configure here.
61eaa48 to
a28d57f
Compare
8e0d89d to
f100a96
Compare
a28d57f to
bfa2b32
Compare
bfa2b32 to
60451fb
Compare


Stack Context
This PR continues the FE-845 chrome polish work on top of the Tier-2 introspection branch.
What?