Skip to content

feat(tui): compose auto-convenes the new panel#1747

Merged
pedrofuentes merged 2 commits into
mainfrom
feature/tui-compose-wizard
Jun 26, 2026
Merged

feat(tui): compose auto-convenes the new panel#1747
pedrofuentes merged 2 commits into
mainfrom
feature/tui-compose-wizard

Conversation

@pedrofuentes

Copy link
Copy Markdown
Owner

Summary

The auto-compose flow now finishes the job — after the user confirms the composed panel it navigates straight to the debate run with the topic prefilled, completing the type-a-topic→watch-a-debate wizard. Phase 10 TUI overhaul — PR-21.

Changes

PanelComposeScreen.tsx

  • confirmPreview now navigates to /convene/<panelName>/run with state: { topic, panelName } instead of /panels/:name
  • The typed topic is captured from topicRef.current before the async persist call so it is always available at navigation time
  • Preview hint updated from y save · n/e edit · Esc cancely Save & convene · n/e edit · Esc cancel
  • All other behavior (compose/preview/persist async, inFlight guard, n/e reset, Esc cancel, captured-input effect) is unchanged

panel-compose-screen.test.tsx

  • Added ConveneRunProbe component that reads useParams + useLocation.state to expose both the panel name and prefilled topic
  • Added /convene/:panel/run route to renderScreen helper
  • Updated the navigation test to assert CONVENE_RUN safe-panel + topic=pricing strategy (was DETAIL safe-panel)
  • Added "y Save & convene" hint assertion test

TDD verification

Commit Type Tests
fa70851 test(tui) 2 FAIL (navigation + hint)
1f2c7c6 feat(tui) 11/11 PASS; full TUI suite 865/865

pedrofuentes and others added 2 commits June 26, 2026 09:09
Assert that after typing a topic, composing, and pressing y the screen
navigates to /convene/<panelName>/run with state.topic equal to the typed
topic (not /panels/:name).  Also assert the 'y Save & convene' preview
hint text.

Co-authored-by: Copilot <175574315+pedrofuentes@users.noreply.github.com>
After the user confirms the composed panel preview with y, navigate to
/convene/<panelName>/run with state.topic set to the typed topic instead
of /panels/:name.  Update the preview hint to 'y Save & convene · n/e
edit · Esc cancel'.  The topic is captured from topicRef before the
async persist call so it is always available at navigation time.

Co-authored-by: Copilot <175574315+pedrofuentes@users.noreply.github.com>
@pedrofuentes

pedrofuentes commented Jun 26, 2026

Copy link
Copy Markdown
Owner Author

Status: APPROVED

Sentinel Review Report

Ref: feature/tui-compose-wizard → main
Report ID: sentinel-1747-1f2c7c6
Reviewed SHA: 1f2c7c6
Sentinel ruleset: v1
Reviewed at: 2026-06-26T09:20:48-07:00
Mode: standard
Review depth: Tier 2 (full)
Required action: MERGE
Persisted artifact: #1747 (comment)

Phase 1 — TDD / Test Evidence

  • Exact SHA bound: ✅ git rev-parse HEAD1f2c7c6d225c676f6c6d21b6e968d430c8c4f3db.
  • Tests exist & meaningful: ✅ panel-compose-screen.test.tsx asserts the new route and state: expect(lastFrame()).toContain("CONVENE_RUN safe-panel"); and expect(lastFrame()).toContain("topic=pricing strategy");; hint test asserts expect(lastFrame()).toContain("y Save & convene");.
  • Test-first history verified: ✅ git --no-pager log --oneline origin/main..HEAD shows fa70851 test(tui): add failing tests for compose→convene wizard before 1f2c7c6 feat(tui): compose auto-convenes the new panel.
  • Commit separation verified: ✅ git show --name-status fa70851 changed only M packages/cli/tests/unit/tui/panel-compose-screen.test.tsx; git show --name-status 1f2c7c6 changed only M packages/cli/src/tui/screens/PanelComposeScreen.tsx.
  • RED verified: ✅ running the new focused tests at fa70851 failed as expected: AssertionError: expected 'DETAIL safe-panel' to contain 'CONVENE_RUN safe-panel' and expected 'Auto-compose panel\nSafe Panel\nSafe …' to contain 'y Save & convene'.
  • GREEN verified: ✅ TUI suite on reviewed SHA: Test Files 93 passed (93) and Tests 865 passed (865).
  • Full suite green on SHA: ✅ npx --yes pnpm@10.30.1 exec vitest run --reporter=dot exited 0 with Test Files 356 passed | 1 skipped (357) and Tests 4483 passed | 1 skipped (4484).
  • Coverage: ✅ full coverage summary: statements: 91.97%, branches: 82.16%, functions: 92.6%, lines: 93.06% (meets configured thresholds 90/75/90/90).

Phase 1.5 — Fast-path Evaluation

🔴 count: 0 | LOC: 9 non-test changed lines (≤150: Y) | Security paths: Y (TUI terminal-rendering surface) | New deps: N | Commit types qualify: N (feat)
→ Fast-path eligible: NO → Phase 2

Phase 2 — Execution Log

Dim Tool Call Agent ID / Ref Status
Quick scan task(agent_type="explore", name="sentinel-quick-scan") N/A (sync task tool returned no ID) Quick scan 🔴 count: 0
A1 task(agent_type="general-purpose", name="sentinel-dim-a1") N/A (sync task tool returned no ID) ✅ No findings
A2 task(agent_type="general-purpose", name="sentinel-dim-a2") N/A (sync task tool returned no ID) ✅ No findings
B task(agent_type="general-purpose", name="sentinel-dim-b") N/A (sync task tool returned no ID) ✅ No findings
C task(agent_type="general-purpose", name="sentinel-dim-c") N/A (sync task tool returned no ID) ✅ No adopted findings
D task(agent_type="general-purpose", name="sentinel-dim-d") N/A (sync task tool returned no ID) ✅ No adopted findings
E N/A N/A N/A (no dependency/supply-chain surface changed)
F task(agent_type="general-purpose", name="sentinel-dim-f") N/A (sync task tool returned no ID) ✅ No findings
Gates npx --yes pnpm@10.30.1 exec vitest run tests/unit/tui; npx --yes pnpm@10.30.1 lint; npx --yes pnpm@10.30.1 typecheck N/A ✅ TUI tests, lint, typecheck passed
Persistence gh pr comment 1747 --body-file .sentinel-report-1747.md PR comment ✅ persisted

Dispatch verification: A1, A2, B, C, D, and F were dispatched as distinct sub-agent tool calls in a single parallel invocation; E was skipped under the Dim E auto-skip rule because no dependency surface changed. This platform's sync task tool did not expose per-agent IDs, so each ID is recorded as N/A with that limitation.

Findings

  • 🔴 CRITICAL: 0
  • 🟡 IMPORTANT: 0 new / 0 known
  • 🟢 MINOR: 0

Details (ordered by severity)

  • None.

Follow-ups & Actions

  • APPROVED → MERGE: no new Sentinel findings to file.

Decision rationale

  • Reviewed HEAD exactly matches 1f2c7c6d225c676f6c6d21b6e968d430c8c4f3db and the worktree was clean after verification.
  • TDD evidence is complete: failing test-only commit preceded the implementation-only feat commit, and the same focused tests pass on HEAD.
  • Implementation captures the topic before async persist, uses encodeURIComponent(result.panelName), keeps the inFlight/Esc/reset/error paths intact, and renders untrusted terminal strings through existing toSingleLineDisplay sinks.
  • /convene/:panel/run is registered in AppRouter, and DebateStreamScreen reads location.state.topic before starting streamDebate.
  • Sub-agent notes about bypassing the convene prompt and raw topic trimming were not adopted as findings: direct auto-compose→run navigation and topicRef capture are the explicit user-approved PR purpose/spec, and no normal-use correctness, security, or operability failure was demonstrated.

@pedrofuentes pedrofuentes merged commit ba8a0a3 into main Jun 26, 2026
14 of 15 checks passed
@pedrofuentes pedrofuentes deleted the feature/tui-compose-wizard branch June 26, 2026 16:22
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.

1 participant