feat(recommendation): interactive TUI for get and list - #2279
Conversation
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.
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
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-getredirect,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 matchesCore.listRecommendations(nextToken, maxResults, statusFilter, options).RecommendationRow/toRowfields (name,type,status,updatedAt) all exist on the SDKRecommendationSummary(confirmed against the get golden fixture).- The
CliOnlyScreen.test.tsxupdates are factually correct:ondemandreally does only exposeevaluateandsimulate, andrecommendationcorrectly drops off the eval menu's CLI-only list now that it has a screen. eval/index.tsxaddsrecommendationtosupportedTuiCommandsconsistent 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
…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.
|
Claude Security Review: no high-confidence findings. (run) |
What
Adds an interactive TUI for the
eval recommendationgetandlistcommands, mirroring howbatch-evaluationdoes it.list/screen.tsx—RecommendationListScreen: paginated table picker (name / type / status / updated UTC), selecting a row navigates to the get view.get/screen.tsx—RecommendationGetJsonScreen: raw-JSON detail view (no metadata hub, matching batch-evaluation).screen.tsx—RecommendationScreen: parent router menu.recommendationinvocation (withTuiOnEmptyFlagsAndArgs+renderTui) and marksget/listas TUI-supported;start/deletestay command-line-only.evalmenu now listsrecommendationas a TUI group; routes wired inRoot.tsx.Notes
PaginatedTablePickerdirectly in the list screen rather than extracting aRecommendationPickercomponent —listis the only picker consumer (unlikeBatchEvaluationPicker, reused by the start flows).CliOnlyScreen.test.tsx: the eval menu no longer listsrecommendationas CLI-only, and the "all subcommands CLI-only" example now points atondemand.Test
bun run typecheckcleanbun test src/handlers/eval src/router src/components→ 671 pass, 0 fail