Skip to content

FE-845: TUI chrome resolutions pass II#203

Merged
lunelson merged 1 commit into
nextfrom
ln/fe-845-brunch-chrome-pass-ii
Jun 11, 2026
Merged

FE-845: TUI chrome resolutions pass II#203
lunelson merged 1 commit into
nextfrom
ln/fe-845-brunch-chrome-pass-ii

Conversation

@lunelson

@lunelson lunelson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Stack Context

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

What?

  • Adds runtime posture slash commands and picker components.
  • Covers runtime axis/strategy selection in Pi extension and TUI tests.
  • Connects the runtime state commands to the dev Tier-2 harness.

This was referenced Jun 11, 2026

lunelson commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lunelson lunelson marked this pull request as ready for review June 11, 2026 10:13
Copilot AI review requested due to automatic review settings June 11, 2026 10:13
@cursor

cursor Bot commented Jun 11, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes cross session transcript authority, extension commands, active tool policy, and TUI overlays; mistakes could desync posture from provider turns or append invalid runtime facts.

Overview
Replaces stub /brunch:strategy, /brunch:lens, and /brunch:mode with real Pi extension handlers that validate axis values against shared runtime-state vocabularies, append brunch.agent_runtime_state switch entries (source: user), refresh active tools, and notify the user. No-arg strategy / lens open overlay pickers built on tui-lab segment UI; mode only reports elicit or rejects unsupported values.

Exports OPERATIONAL_MODE_IDS, AGENT_STRATEGY_IDS, and AGENT_LENS_IDS for command validation. Adds unit tests for commands, pickers, and chrome footer lines that prefer projected agentState over launch-time chrome fallbacks, plus a Tier-2 test that runs brunch:lens through a real runBrunchTui boot. Documents the slice in memory/cards/tooling--runtime-state-commands.md.

Reviewed by Cursor Bugbot for commit 60451fb. Bugbot is set up for automated code reviews on this repo. Configure here.

@lunelson lunelson changed the title FE-845: Wire runtime posture slash commands FE-845: TUI chrome resolutions pass II Jun 11, 2026
Comment thread src/.pi/extensions/commands/index.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:mode commands (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.

Comment on lines +109 to +119
appendBrunchAgentRuntimeSwitch(
{
getEntries: () => ctx.sessionManager.getEntries(),
appendCustomEntry: (customType, data) => {
pi.appendEntry(customType, data);
return '';
},
},
nextState,
'user',
);
Comment on lines +242 to +245
if (selection === current.operationalMode) {
ctx.ui.notify('Brunch mode is already elicit.', 'info');
return;
}
Comment on lines +246 to +249
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.
Comment on lines +45 to +46
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.

Comment on lines +80 to +83
└── 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
Comment on lines +1 to +20
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;
}

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread src/.pi/extensions/commands/index.ts
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from 61eaa48 to a28d57f Compare June 11, 2026 14:36
@lunelson lunelson force-pushed the ln/fe-847-dx-introspection-tier-2 branch 2 times, most recently from 8e0d89d to f100a96 Compare June 11, 2026 14:38
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from a28d57f to bfa2b32 Compare June 11, 2026 14:38
Base automatically changed from ln/fe-847-dx-introspection-tier-2 to next June 11, 2026 14:39
@lunelson lunelson force-pushed the ln/fe-845-brunch-chrome-pass-ii branch from bfa2b32 to 60451fb Compare June 11, 2026 14:40
@lunelson lunelson merged commit 577f0d1 into next Jun 11, 2026
6 checks passed
@lunelson lunelson deleted the ln/fe-845-brunch-chrome-pass-ii branch June 11, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants