Skip to content

feat(tui): escape-stack helper + consistent shortcut labels#1748

Merged
pedrofuentes merged 2 commits into
mainfrom
feature/tui-escape-microcopy
Jun 26, 2026
Merged

feat(tui): escape-stack helper + consistent shortcut labels#1748
pedrofuentes merged 2 commits into
mainfrom
feature/tui-escape-microcopy

Conversation

@pedrofuentes

Copy link
Copy Markdown
Owner

Extracted the Esc precedence into a pure, tested resolveEscape helper (src/tui/router/resolve-escape.ts) now used by AppRouter (behavior-preserving, now explicit/testable): help-open → closeHelp; not-home → back; home → quit. The global handler stays gated so overlays/captured screens still claim Esc first.

Standardized contextual shortcut labels in shortcuts.ts for consistent footer/help wording (no key rebinding): session-export movement now uses the canonical ↑↓ glyph (ExportOverlay already accepts arrows) instead of the screen-specific j/k; panel-compose's ambiguous n/e "Edit" → "Revise" to disambiguate from form-field editing.

Tests: new resolve-escape.test.ts covers each escape branch; shortcuts.test.ts locks the standardized labels and movement-glyph consistency. Full tui suite green, lint + typecheck clean.

Phase 10 TUI overhaul — PR-12.

pedrofuentes and others added 2 commits June 26, 2026 09:11
Co-authored-by: Copilot <175574315+pedrofuentes@users.noreply.github.com>
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-escape-microcopy → main
Report ID: sentinel-1748-528979b
Reviewed SHA: 528979b
Sentinel ruleset: v1
Reviewed at: 2026-06-26T16:22:32Z
Mode: standard
Review depth: Tier 2 (full)
Required action: MERGE
Persisted artifact: #1748 (comment)

Phase 1 — TDD / Test Evidence

  • Head binding: ✅ git rev-parse HEAD returned 528979ba69d4c1c3aa29b636e348151253141b25.
  • Tests exist & meaningful: ✅ packages/cli/tests/unit/tui/resolve-escape.test.ts:6-18 asserts closeHelp (home and non-home), back, and quit; packages/cli/tests/unit/tui/shortcuts.test.ts:69-90 asserts ↑↓, rejects j/k, asserts Revise, and rejects stale Edit.
  • Red evidence: ✅ at 66c70af, resolve-escape.test.ts imports ../../../src/tui/router/resolve-escape.js while git cat-file -e 66c70af^:packages/cli/src/tui/router/resolve-escape.ts fails; the same tests assert ↑↓/Revise while the parent source still contains { keys: "j/k", description: "Move" } and { keys: "n/e", description: "Edit" }.
  • Test-first history verified: ✅ PR range origin/main..HEAD is 66c70af test(tui): ... followed by 528979b feat(tui): ...; git show --name-status 528979b contains only packages/cli/src/tui/lib/shortcuts.ts, packages/cli/src/tui/router/AppRouter.tsx, and packages/cli/src/tui/router/resolve-escape.ts.
  • Implementation correctness spot-check: ✅ resolveEscape is pure, named-exported, explicitly typed, readonly-context, and contains no any; AppRouter retains { isActive: mode !== "palette" && !captured } and preserves help → back → quit precedence; ExportOverlay.tsx:189-194 accepts arrow keys; PanelComposeScreen.tsx:104-105 resets on n/e so “Revise” matches behavior.
  • Full relevant suite green on SHA: ✅ cd packages/cli && npx --yes pnpm@10.30.1 exec vitest run tests/unit/tuiTest Files 94 passed (94), Tests 869 passed (869).
  • Additional gates: ✅ npx --yes pnpm@10.30.1 lint exited 0; ✅ npx --yes pnpm@10.30.1 typecheck exited 0.
  • Coverage: ✅ full npx --yes pnpm@10.30.1 test:coverage exited 0; summary: statements 91.97%, branches 82.17%, functions 92.61%, lines 93.06% (all above configured thresholds: 90/75/90/90).

Phase 1.5 — Fast-path Evaluation

🔴 count: 0 | LOC: 48 non-test/non-lock changed (≤150: Y) | Security paths: N | 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
Quick scan task(agent_type="general-purpose", model="claude-haiku-4.5", name="sentinel-fast-scan-pr1748") N/A (sync task returned no persistent ID) ✅ 🔴 count 0
A1 Security Attack Surface task(agent_type="general-purpose", model="claude-sonnet-4.6", name="sentinel-dim-a1-pr1748") N/A (sync task returned no persistent ID) ✅ No findings
A2 Security Hardening task(agent_type="general-purpose", model="claude-sonnet-4.6", name="sentinel-dim-a2-pr1748") N/A (sync task returned no persistent ID) ✅ No findings
B Resilience / Operability task(agent_type="general-purpose", model="claude-sonnet-4.6", name="sentinel-dim-b-pr1748") N/A (sync task returned no persistent ID) ✅ No adopted findings
C Performance / Architecture task(agent_type="general-purpose", model="claude-sonnet-4.6", name="sentinel-dim-c-pr1748") N/A (sync task returned no persistent ID) ✅ No findings
D Test Quality task(agent_type="general-purpose", model="claude-sonnet-4.6", name="sentinel-dim-d-pr1748") N/A (sync task returned no persistent ID) ✅ No adopted findings
E Dependencies N/A N/A ✅ Auto-skip: no package manifests, lockfiles, package-manager config, Dockerfiles, CI install steps, build scripts, or vendored code changed
F Documentation task(agent_type="general-purpose", model="claude-haiku-4.5", name="sentinel-dim-f-pr1748") N/A (sync task returned no persistent ID) ✅ No findings
Persist report gh pr comment 1748 --body-file .sentinel-report-pr1748.md then gh pr comment 1748 --edit-last --body-file .sentinel-report-pr1748.md #1748 (comment) ✅ Persisted to PR

Findings

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

Details (ordered by severity)

No findings.

Known sentinel:* issues #1698#1745 were treated as context and did not match any in-scope defect in this PR.

Follow-ups & Actions

  • APPROVED → MERGE: record sentinel-1748-528979b and reviewed SHA 528979ba69d4c1c3aa29b636e348151253141b25 in the merge commit.
  • No new 🟡/🟢 issues to file.

Decision rationale

  • TDD choreography is compliant: test-only commit 66c70af precedes implementation-only commit 528979b in the PR range.
  • The pure helper preserves the prior AppRouter Esc behavior while leaving the palette/captured input gate unchanged.
  • The shortcut label changes are static microcopy only and are backed by assertions plus passing footer/contextual-help coverage in the TUI suite.
  • Required gates passed on the reviewed SHA: TUI vitest, lint, typecheck, and full coverage.
  • Phase 2 found no material security, resilience, performance, testing, dependency, or documentation defects.

@pedrofuentes pedrofuentes merged commit 5ef521f 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