Skip to content

feat(#201): TUI session config-review screen#472

Open
windoliver wants to merge 10 commits into
mainfrom
feat/201-tui-config-review
Open

feat(#201): TUI session config-review screen#472
windoliver wants to merge 10 commits into
mainfrom
feat/201-tui-config-review

Conversation

@windoliver
Copy link
Copy Markdown
Owner

Summary

Adds a Config Review screen between preset-select and goal-input so operators can edit a session's resolved config before launch (closes #201; follow-up to #198/#199/#200).

Flow: preset-select → config-review → goal-input → launch-preview → running

  • Editable (Tasks-faithful scope): mode (evaluation⇄exploration), stop-condition thresholds (maxRoundsWithoutImprovement, budget.maxContributions, budget.maxWallClockSeconds, targetMetric.value), concurrency (maxActiveClaims, maxClaimsPerAgent).
  • Read-only summaries: topology, metrics, gates.
  • All editing logic is a pure module (config-edit.ts) with validation mirroring the contract Zod bounds (budget-drop, required targetMetric.value, non-finite rejection, immutable updates). The screen is a thin view over it.
  • Edited GroveContract threads through ScreenState.editedConfigcreateSession({config}).
  • Server fix: POST /api/sessions now honors a client-supplied config (was silently stripped, so edits never persisted on the HTTP/Nexus backend). Purely additive — requests without config are unchanged.

Keys: j/k navigate · e edit · space toggle mode · d reset · Enter continue · Esc back.

Test Plan

  • tsc --noEmit clean
  • bun test src/tui — 1787 pass / 0 fail
  • config-edit unit tests (16) — bounds, budget-drop, immutability, non-finite rejection
  • screen-manager flow + persistence tests (load-bearing: reverting the wiring makes them fail)
  • sessions route tests incl. new regression that client config (maxActiveClaims 9) overrides preset default (4) and persists
  • Manual TUI smoke on Nexus: grove up (bare-init) → pick preset → edit a threshold → confirm → verify edited value lands in the session record

Follow-up (not in this PR)

Server accepts the client config opaquely (matching existing topology handling, namespace-auth-gated). A camelCase GroveContract Zod schema + handler validation would close the gap where a malformed client config could reach #199 enforcement unvalidated — worth a separate issue.

Spec: docs/superpowers/specs/2026-05-30-tui-config-review-design.md · Plan: docs/superpowers/plans/2026-05-30-tui-config-review.md

windoliver added 10 commits May 30, 2026 11:38
ConfigReview screen between preset-select and goal-input. Editable:
mode toggle, stop-condition thresholds, concurrency limits. Read-only:
topology/metrics/gates summaries. Edited GroveContract threaded through
ScreenState.editedConfig into createSession (persistence via #198).
The primary `grove up → n → pick preset` flow set newSessionPreset →
ScreenManager mounted at initialState screen "goal-input", bypassing
config-review (only reachable via Esc-back). Now the welcome pick enters
at "config-review"; ScreenManager's state initializer resolves the picked
preset's baseline config (falls back to goal-input when none resolvable).
handleConfigReviewBack is depth-aware for the entry-screen case.

Found via live grove-TUI E2E of #201.
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.

feat: TUI session config screen — edit metrics, gates, mode before session start

1 participant