fix(tui): omit redundant CLI-only menu dividers - #2493
aidandaly24 wants to merge 2 commits into
Conversation
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
The change is small and correct: when every filtered option belongs to CLI_ONLY_SECTION, CommandMenuBody maps each option's section to undefined, which scrollWindow.startsSection treats as "no divider". This cleanly handles both the always-all-CLI menus (e.g. /agentcore/log, /agentcore/payment/*) and the transient case where filtering narrows the visible options down to only CLI-only entries — verified by the new tests.
A few things I checked and am satisfied with:
useMemodependency array is right ([filtered]).- Empty
filteredstill producessections = [], soscrollWindowreturns no rows — no divider regressions. CLI_ONLY_SECTION = "cli"is a sentinel used both for classification and as the divider's suppressed title; no router declares a real section titled"cli"today, and if one ever did the collision predates this change.- Tests exercise real command routes and assert on rendered frames rather than mocking internals — consistent with the repo's testing guidance.
- Purely visual TUI polish, no new user-facing action worth telemetry.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2493 +/- ##
=========================================
Coverage 97.39% 97.39%
=========================================
Files 642 642
Lines 46801 46804 +3
=========================================
+ Hits 45584 45587 +3
Misses 1217 1217 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Fix the duplicate horizontal dividers below the command filter in CLI-only menus, including project log/traces, Harness and Runtime traces, and payment menus.
The filter already has a divider. When all visible commands belonged to the CLI-only group, the menu also emitted an untitled section divider even though there was no preceding group to separate.
Omit that redundant section marker before computing the scroll window. This removes the extra line and its row cost while preserving mixed-group separators, titled section headers, command ordering, and navigation. No shared divider or scrolling API changes.
Screenshots
Before and after, captured from the real CLI through the TUI harness at 100 columns by 16 rows:
Related Issue
Not applicable. No issue created for this small UX fix.
Documentation PR
Not applicable. No commands or configuration changed.
Type of Change
Testing
bun testbun run test:e2e, or explained why they are not applicablebun run typecheckbun run lint:checkbun run format:checkbun run buildsrc/assets/, I updated affected snapshots withbun test <test-file> --update-snapshotsand committed thembun test: 3,961 passed, 0 failed. Focused menu/navigation/scrolling tests: 159 passed, 0 failed. Typecheck, lint, formatting, and build passed.The 11 new regression cases failed before the fix and passed afterward. They cover affected menus, filtering away and restoring the preceding group, and an 8-row terminal where the redundant divider previously hid the second option. Existing mixed-menu separators, titled headers, and all CLI-only help/navigation flows remain covered.
Real-AWS end-to-end tests are not applicable: this only changes menu section presentation. Log and payment menus were exercised and visually checked through the TUI harness using an empty, undeployed project.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.