Skip to content

feat(recommendation): interactive TUI for get and list - #2279

Open
jariy17 wants to merge 2 commits into
refactorfrom
feat/recommendation-tui
Open

feat(recommendation): interactive TUI for get and list#2279
jariy17 wants to merge 2 commits into
refactorfrom
feat/recommendation-tui

Conversation

@jariy17

@jariy17 jariy17 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What

Adds an interactive TUI for the eval recommendation get and list commands, mirroring how batch-evaluation does it.

  • list/screen.tsxRecommendationListScreen: paginated table picker (name / type / status / updated UTC), selecting a row navigates to the get view.
  • get/screen.tsxRecommendationGetJsonScreen: raw-JSON detail view (no metadata hub, matching batch-evaluation).
  • screen.tsxRecommendationScreen: parent router menu.
  • Router now opens the TUI on a bare recommendation invocation (withTuiOnEmptyFlagsAndArgs + renderTui) and marks get/list as TUI-supported; start/delete stay command-line-only.
  • eval menu now lists recommendation as a TUI group; routes wired in Root.tsx.

Notes

  • Used PaginatedTablePicker directly in the list screen rather than extracting a RecommendationPicker component — list is the only picker consumer (unlike BatchEvaluationPicker, reused by the start flows).
  • Updated CliOnlyScreen.test.tsx: the eval menu no longer lists recommendation as CLI-only, and the "all subcommands CLI-only" example now points at ondemand.

Test

  • bun run typecheck clean
  • bun test src/handlers/eval src/router src/components → 671 pass, 0 fail

Mirror batch-evaluation: list renders a paginated table picker that
navigates into the raw-JSON get view, and a bare `recommendation`
invocation opens the list→get TUI. start/delete stay command-line-only.
@github-actions github-actions Bot added the size/m PR size: M label Sep 10, 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 10, 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 claude-security-reviewing Claude Code /security-review in progress agentcore-harness-reviewing AgentCore Harness review in progress labels Sep 10, 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

Clean, focused change that mirrors the existing batch-evaluation TUI pattern one-for-one. I checked the parts most likely to drift:

  • Routes in Root.tsx (parent, list, bare-get redirect, get/:id) match the batch-evaluation shape.
  • Router wiring in handlers/eval/recommendation/index.tsx (withTuiOnEmptyFlagsAndArgs + renderTui + supportedTuiCommands("get", "list")) matches batch-evaluation.
  • listRecommendations(token, pageSize, undefined, opts) argument order matches Core.listRecommendations(nextToken, maxResults, statusFilter, options).
  • RecommendationRow/toRow fields (name, type, status, updatedAt) all exist on the SDK RecommendationSummary (confirmed against the get golden fixture).
  • The CliOnlyScreen.test.tsx updates are factually correct: ondemand really does only expose evaluate and simulate, and recommendation correctly drops off the eval menu's CLI-only list now that it has a screen.
  • eval/index.tsx adds recommendation to supportedTuiCommands consistent with the new screen.

No excessive mocking; screens use real query-client behavior around core.eval.*. No telemetry gap unique to this PR — the sibling batch-evaluation screens don't instrument either.

Non-blocking observation: batch-evaluation has a companion batch-evaluation.screen.test.tsx covering the picker/menu/get UI, but no equivalent recommendation.screen.test.tsx was added. The compiled-tree walk in CliOnlyScreen.test.tsx gives some indirect coverage, and the fixture test covers the CLI path, so this is a suggestion rather than a required change — worth adding in a follow-up for parity.

Good to merge.

@jariy17
jariy17 marked this pull request as ready for review September 10, 2026 23:57
@codecov-commenter

codecov-commenter commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.05%. Comparing base (d9ab959) to head (f213da3).
⚠️ Report is 11 commits behind head on refactor.

Additional details and impacted files
@@            Coverage Diff             @@
##           refactor    #2279    +/-   ##
==========================================
  Coverage     97.04%   97.05%            
==========================================
  Files           566      569     +3     
  Lines         39409    39511   +102     
==========================================
+ Hits          38244    38346   +102     
  Misses         1165     1165            

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

…ffix

Add screen tests covering the picker, JSON detail, empty and error/retry
states. Bug bash surfaced that the type column (width 22) truncated the
verbose enum values (SYSTEM_PROMPT_RECOMMENDATION /
TOOL_DESCRIPTION_RECOMMENDATION); strip the shared `_RECOMMENDATION`
suffix so the value fits and reads cleanly.
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 11, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 11, 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 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants