Skip to content

fix(tui): omit redundant CLI-only menu dividers - #2493

Open
aidandaly24 wants to merge 2 commits into
aws:refactorfrom
aidandaly24:fix/tui-redundant-cli-divider
Open

aidandaly24 wants to merge 2 commits into
aws:refactorfrom
aidandaly24:fix/tui-redundant-cli-divider

Conversation

@aidandaly24

Copy link
Copy Markdown
Contributor

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:

Menu Before After
Log Log before: two dividers below the filter Log after: one divider below the filter
Payments Payments before: two dividers below the filter Payments after: one divider below the filter

Related Issue

Not applicable. No issue created for this small UX fix.

Documentation PR

Not applicable. No commands or configuration changed.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

  • I ran bun test
  • I ran the relevant end-to-end tests with bun run test:e2e, or explained why they are not applicable
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run build
  • If I modified src/assets/, I updated affected snapshots with bun test <test-file> --update-snapshots and committed them

bun 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

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@github-actions github-actions Bot added the size/s PR size: S label Sep 30, 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 30, 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 30, 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

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:

  • useMemo dependency array is right ([filtered]).
  • Empty filtered still produces sections = [], so scrollWindow returns 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.

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.39%. Comparing base (238e54e) to head (af62c02).
⚠️ Report is 3 commits behind head on refactor.

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.
📢 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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants