Skip to content

feat(tui): in-screen action menu on detail screens#1750

Merged
pedrofuentes merged 2 commits into
mainfrom
feature/tui-action-menu
Jun 26, 2026
Merged

feat(tui): in-screen action menu on detail screens#1750
pedrofuentes merged 2 commits into
mainfrom
feature/tui-action-menu

Conversation

@pedrofuentes

Copy link
Copy Markdown
Owner

New ActionMenu overlay; PanelDetail/ExpertDetail/SessionDetail open it with 'a' to list+dispatch their actions (which-key style), complementing the contextual footer; direct keys unchanged; Phase 10 TUI overhaul — PR-18

pedrofuentes and others added 2 commits June 26, 2026 09:22
Co-authored-by: Copilot <175574315+pedrofuentes@users.noreply.github.com>
Co-authored-by: Copilot <175574315+pedrofuentes@users.noreply.github.com>
@pedrofuentes

Copy link
Copy Markdown
Owner Author

Status: CONDITIONAL

Sentinel Review Report

Ref: feature/tui-action-menu → main
Report ID: sentinel-1750-926706c
Reviewed SHA: 926706c
Sentinel ruleset: v1
Reviewed at: 2026-06-26T16:40:02Z
Mode: standard
Review depth: Tier 2 (full)
Required action: FILE_ISSUES_AND_MERGE

Phase 1 — TDD / Test Evidence

  • Tests exist & meaningful: ✅ packages/cli/tests/unit/tui/action-menu.test.tsx covers item rendering, Enter selection, ↑/↓ and j/k navigation, Esc close, sanitization, and inactive gating; detail-screen tests cover opening the menu, dispatching representative menu selections through the same navigation paths as direct keys, and Esc close. One non-blocking regression-coverage gap is listed under Findings.
  • Test-first history verified: ✅ git --no-pager log --oneline origin/main..HEAD shows 52af65e test(tui): add failing tests for detail action menu before 926706c feat(tui): in-screen action menu on detail screens. git show --name-status 52af65e changes tests only; git show --name-status 926706c changes implementation only. ActionMenu was absent before the test commit, so the new action-menu.test.tsx could not pass without the implementation.
  • Full suite green on SHA: ✅ HEAD verified as 926706cd641b940b48dcb8c249aa8c1c8929eb8f. Local TUI suite passed: cd packages/cli && npx --yes pnpm@10.30.1 exec vitest run tests/unit/tuiTest Files 94 passed (94); Tests 883 passed (883). Local lint passed: npx --yes pnpm@10.30.1 lint. Local typecheck passed: npx --yes pnpm@10.30.1 typecheck.
  • Coverage: ✅ PR checks show Full-suite coverage passed for PR feat(tui): in-screen action menu on detail screens #1750 (gh pr checks 1750Full-suite coverage pass 3m43s).

Phase 1.5 — Fast-path Evaluation

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

Phase 2 — Execution Log

Dim Tool Call Agent ID / Ref Status
Fast scan task(agent_type="general-purpose", name="sentinel-fast-scan", model="claude-haiku-4.5") N/A (sync task tool returned no persistent agent ID) ✅ RED_COUNT: 0
A1 Security attack surface task(agent_type="general-purpose", name="sentinel-dim-a1", model="claude-sonnet-4.6") N/A (sync task tool returned no persistent agent ID) ✅ No findings
A2 Security defenses task(agent_type="general-purpose", name="sentinel-dim-a2", model="claude-sonnet-4.6") N/A (sync task tool returned no persistent agent ID) ✅ No findings
B Resilience task(agent_type="general-purpose", name="sentinel-dim-b", model="claude-sonnet-4.6") N/A (sync task tool returned no persistent agent ID) ✅ No adopted findings; subagent minor suggestions omitted under materiality/scope calibration
C Performance/architecture task(agent_type="general-purpose", name="sentinel-dim-c", model="claude-sonnet-4.6") N/A (sync task tool returned no persistent agent ID) ✅ No adopted findings; duplicate-boilerplate suggestion omitted as non-material
D Testing task(agent_type="general-purpose", name="sentinel-dim-d", model="claude-sonnet-4.6") N/A (sync task tool returned no persistent agent ID) ✅ 1 🟡 adopted
E Dependencies N/A N/A (auto-skip) ✅ No dependency/supply-chain surface changed
F Documentation/help task(agent_type="general-purpose", name="sentinel-dim-f", model="claude-haiku-4.5") N/A (sync task tool returned no persistent agent ID) ✅ 1 🟡 adopted
Report persistence gh pr comment 1750 --body-file .sentinel-report-1750-926706c.md PR #1750 comment ✅ Persisted full report to PR

Known sentinel:* issues #1698#1745 were treated as context only; no adopted finding duplicates a known issue.

Findings

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

Details (ordered by severity)

  1. [🟡 IMPORTANT] Missing negative test for template-panel a guard — packages/cli/src/tui/screens/PanelDetailScreen.tsx:79-81

    • Evidence:
      if (input === "a" && source === "saved") {
        setMenuOpen(true);
        return;
    • Impact: Trigger: a future edit removes && source === "saved" or otherwise opens the menu on template panels. Mechanism: the new tests only press a for saved panels, so that regression would remain green. Consequence: template panels would display saved-panel actions that cannot actually dispatch, creating incorrect UI behavior under normal usage.
    • Remediation: Add a unit test rendering PanelDetailScreen with state: { source: "template" }, press a, and assert the frame does not contain Actions (and remains on the template detail view).
  2. [🟡 IMPORTANT] New a action-menu shortcut is omitted from contextual help/footer legends — packages/cli/src/tui/screens/ExpertDetailScreen.tsx:191-193; packages/cli/src/tui/lib/shortcuts.ts:148-155

    • Evidence:
      if (input === "a") {
        setMenuOpen(true);
        return;
      { keys: "c", description: "Chat" },
      { keys: "e", description: "Edit" },
      { keys: "d", description: "Delete" },
    • Impact: Trigger: a user relies on the detail-screen footer or ? contextual help to discover available keys. Mechanism: the PR adds a handlers on Panel/Expert/Session detail screens but does not add an a Actions binding to the route shortcut legends (or equivalent on-screen footer text). Consequence: the new which-key-style menu is not discoverable from the TUI itself, undermining the feature's purpose.
    • Remediation: Add { keys: "a", description: "Actions" } to the panel, expert, and session detail route bindings in shortcuts.ts and/or include a actions in the corresponding footer hint text.

Follow-ups & Actions

Decision rationale

  • The reviewed SHA is bound and matches the supplied HEAD.
  • TDD choreography is compliant: tests-only commit precedes implementation-only commit; the new ActionMenu tests could not pass before the implementation.
  • Required local gates and PR coverage checks passed.
  • Full Phase 2 review found no 🔴 blockers, no secrets, no unsafe terminal rendering, no dependency changes, no any, and no named-export/return-type violations.
  • Two material non-blocking follow-ups remain: one regression-test gap and one contextual-help discoverability gap.

@pedrofuentes

Copy link
Copy Markdown
Owner Author

Sentinel CONDITIONAL (sentinel-1750-926706c) — 0 🔴, 2 🟡 filed as follow-ups: #1751, #1752. Merging.

@pedrofuentes pedrofuentes merged commit 3cd08fb into main Jun 26, 2026
15 checks passed
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