Skip to content

feat: add readonly batch insights TUI - #2078

Merged
jariy17 merged 1 commit into
refactorfrom
batch-insights-TUI
Aug 24, 2026
Merged

feat: add readonly batch insights TUI#2078
jariy17 merged 1 commit into
refactorfrom
batch-insights-TUI

Conversation

@nborges-aws

@nborges-aws nborges-aws commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Description

Adds an interactive, read-only TUI for the eval batch-insights command tree. get and list commands now expose TUI flows; run remains CLI only.

Screens

Path Screen
eval batch-insights RouterScreen menu
eval batch-insights list / eval batch-insights get Insights-filtered BatchEvaluationPicker using PaginatedTablePicker
eval batch-insights get/:batchEvaluationId Service-side insight report in JsonDetail

Type of Change

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

Testing

Added batch-insights.screen.test.tsx covering screen behavior

  • 27 focused tests pass
  • bun run test (1757 pass, 0 fail)
  • bun run typecheck
  • bun run lint:check
  • bun run format:check
  • If I modified src/assets/, I ran the snapshot update command and committed the results

Checklist

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

Stack created with GitHub Stacks CLIGive Feedback 💬

@github-actions github-actions Bot added agentcore-harness-reviewing AgentCore Harness review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Aug 24, 2026
@codecov-commenter

codecov-commenter commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (refactor@3d8bd3c). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             refactor    #2078   +/-   ##
===========================================
  Coverage            ?   97.41%           
===========================================
  Files               ?      407           
  Lines               ?    24407           
  Branches            ?        0           
===========================================
  Hits                ?    23776           
  Misses              ?      631           
  Partials            ?        0           

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

@@ -41,6 +41,11 @@ function toRow(summary: BatchEvaluationSummary): BatchEvaluationRow {
export interface BatchEvaluationPickerProps extends ScreenProps {

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.

Can you explain why we are reusing BatchEvaluationPicker constructs for BatchInsights. They are two different resource that will diverge in the future.

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.

The CLI experience and semantics are separate, but they aren't two different resources. Batch evals and insights have the same listBatchEvaluations API, response model, and display fields. Insights is just a filtered projection of BatchEvaluations, and has its own screen, routes, validations, etc.

If the resources diverge to separate APIs in the future, we'll need a significant refactor to the insights logic regardless of them sharing resources or not. Separating this constructs now creates more code to maintain upfront, and does not save us any effort in the future.

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.

I remember Swarmim said they were two different resources and I think we should seperate them but I'm fine just rename all shared compoenent like BatchEvalautionPicker to BatchEvaluation/InsightPicker so we know that its used for both.

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.

Our CLI experience does match the idea that they are two different resources to the customer/product side (screens, commands, routes, etc.). When I say they're the same resource I mean on the service/API abstraction side.

The name BatchEvaluationPicker is accurate to the service resource it loads. It requests and renders all batch evaluations, which includes insights. I feel like renaming it to include insights implies that the picker operates on two service resources, when it doesn't. The picker does exactly what it is named for: gives all batch insights.

src/handlers/eval/batch-insights/list/screen.tsx has to filter out insights from the full list of batch evaluations. So that logic is distinct to the insights flow. I think the idea that insights is getting batch evals, and filtering down is accurate with whats really happening. Naming it otherwise would be misleading to whats actually happening

@jariy17
jariy17 requested a review from notgitika August 24, 2026 15:44
notgitika
notgitika previously approved these changes Aug 24, 2026
breadcrumb={breadcrumb}
description={description}
queryKey={["batch-evaluations", opts.region]}
queryKey={[queryKeyPrefix, opts.region]}

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.

nice!

@notgitika

Copy link
Copy Markdown
Contributor

This is great! Approved.

Base automatically changed from batch-eval-insights to refactor August 24, 2026 17:45

@jariy17 jariy17 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.

Nico and I have discussed. We have decided to have dedicated BatchInsights function in evalClient. And rename BatchEvaluationPicker to BatchEvaluationAndInsightsPicker.

@jariy17
jariy17 merged commit ad6c3c5 into refactor Aug 24, 2026
10 checks passed
@jariy17
jariy17 deleted the batch-insights-TUI branch August 24, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants