Skip to content

feat(tui): command-line-only screens for every command without a TUI - #2194

Merged
notgitika merged 2 commits into
aws:refactorfrom
notgitika:feat/cli-only-screens-everywhere
Sep 3, 2026
Merged

feat(tui): command-line-only screens for every command without a TUI#2194
notgitika merged 2 commits into
aws:refactorfrom
notgitika:feat/cli-only-screens-everywhere

Conversation

@notgitika

@notgitika notgitika commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2177, for everything outside project.

Every menu now lists its subcommands without a screen below a command line only divider, and selecting one opens its help via the existing CliOnlyScreen. Previously these were either hidden from the menu (create/update/delete, runtime logs/traces, most eval mutators — 67 commands) or listed but exited the TUI with a help dump (feedback, config, update, eval ondemand/recommendation, batch-evaluation evaluate/simulate).

  • RouterScreen always partitions; the showCliOnly prop is gone.
  • One * route → CommandFallbackScreen replaces the project/* wildcard and HelpScreen (deleted).
  • root, eval, batch-evaluation declare their screen-backed children via supportedTuiCommands, like the other routers already do, so the menu labels them correctly. feedback/config/update never used the TUI middleware, so no CLI behaviour changes.
  • menuEntries test helper reads a menu frame into {screens, cliOnly}; the existing "offers only read-only commands" tests now assert placement instead of absence.
  • New CliOnlyScreen.test.tsx walks the compiled Commander tree and checks every command-line-only command (currently 94) opens its menu or help and esc returns to the parent.
  • KeyValueTable's parent is now a column box so long option terms don't wrap on wide terminals.

bun test 2944 pass; tsc, oxlint, prettier clean.

Every menu lists its subcommands without a screen below a "command line
only" divider, and selecting one opens its help (CliOnlyScreen) instead
of hiding it or exiting the TUI. One wildcard route replaces the
project-only fallback and HelpScreen.
@github-actions github-actions Bot added the size/l PR size: L label Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 3, 2026
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AgentCore Harness Review

Verdict: Looks good

Nice consolidation. Collapsing the two agentcore/project/* + * fallback routes into a single CommandFallbackScreen, deleting HelpScreen, and removing the showCliOnly toggle in favor of always showing CLI-only children below a divider makes the routing and menu behavior noticeably simpler. The added supportedTuiCommands(...) calls on the root, eval, and per-service routers correctly encode which children have screens, and the tests match the resulting ordering.

A few things I sanity-checked and they hold up:

  • CommandFallbackScreen no longer needs basePath: resolveCommand stops at unknown segments and commandPath() reconstructs the correct route, so /agentcore/gateway/no-such-command still lands on the gateway menu (covered by the new test).
  • The menuEntries helper's regex (/^\s{1,3}(?:❯ )?\s*([a-z][a-z0-9-]*)\s{2,}\S/) is fine given every registered command has both a lowercase name and a non-empty description; the padEnd(nameWidth) = longest + 3 ensures ≥2 spaces before the description even for the longest name.
  • The generated CLI_ONLY matrix (>50 cases) exercises the escape-to-parent path across the whole tree, which nicely guards future additions.

No changes requested.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 3, 2026
@codecov-commenter

codecov-commenter commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.08%. Comparing base (c796be3) to head (4f80a57).
⚠️ Report is 3 commits behind head on refactor.

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #2194   +/-   ##
=========================================
  Coverage     97.08%   97.08%           
=========================================
  Files           544      544           
  Lines         37768    37772    +4     
=========================================
+ Hits          36666    36671    +5     
+ Misses         1102     1101    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexanderRichey AlexanderRichey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! But we hav some merge conflicts and I'm not sure we want to remove the HelpScreen fallback.

Comment thread src/components/Root.tsx
<CommandFallbackScreen ctx={ctx} core={core} basePath={["agentcore", "project"]} />
}
/>
<Route path="*" element={<HelpScreen ctx={ctx} core={core} />} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we sure we want to remove the HelpScreen fallback?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm good question. I think we should preserve it because if an unknown or a new route is introduced, we should have that as a fallback. Let me revert it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added help screen back

…creens-everywhere

# Conflicts:
#	src/handlers/eval/batch-evaluation/index.tsx
#	src/handlers/eval/index.tsx
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Sep 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 3, 2026
@notgitika
notgitika merged commit 831025c into aws:refactor Sep 3, 2026
19 of 24 checks passed
@notgitika
notgitika deleted the feat/cli-only-screens-everywhere branch September 3, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants