Skip to content

feat(evaluation) 12/15: UI API client for the evaluation endpoints - #823

Open
Ahmath-Gadji wants to merge 1 commit into
eval/11-api-routesfrom
eval/12-ui-api-client
Open

feat(evaluation) 12/15: UI API client for the evaluation endpoints#823
Ahmath-Gadji wants to merge 1 commit into
eval/11-api-routesfrom
eval/12-ui-api-client

Conversation

@Ahmath-Gadji

@Ahmath-Gadji Ahmath-Gadji commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Part 12 of 15 of the split of #811. Targets eval/11-api-routes (#822). First of three UI parts: data layer → components → page.

What

ui/src/lib/api/evaluation.ts — typed wrappers over the seven /evaluation routes, with interfaces mirroring part 11's response schemas one-for-one.

Notable

  • Two shared definitions live here rather than in the views. isActiveStatus / ACTIVE_RUN_STATUSES gives "can this run still change?" one definition instead of a status list repeated in each view, and EVAL_POLL_MS gives the poll cadence one home — both the run list and the run detail poll while a run is in flight, and they should not be able to drift apart.
  • createEvalDataset appends corpus repeatedly, which is how FastAPI reads list[UploadFile].
  • status-badge learns EVALUATING so a run in its promptfoo phase renders like every other in-flight status rather than falling through to the default styling.

Testing

tsc -b clean; eslint reports only the one warning that is already on develop (react-hooks/exhaustive-deps in an unrelated file). No behaviour yet — nothing imports this until part 13.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EnjoyBacon7, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: df60db59-990f-4f80-a614-fa6b630a8651

📥 Commits

Reviewing files that changed from the base of the PR and between a229934 and 3217048.

📒 Files selected for processing (2)
  • ui/src/components/shared/status-badge.tsx
  • ui/src/lib/api/evaluation.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch eval/12-ui-api-client

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ahmath-Gadji

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 56 minutes.

Typed wrappers over the seven `/evaluation` routes, with interfaces
mirroring the response schemas one-for-one, and two things the two eval
views would otherwise each define:

- `isActiveStatus` / `ACTIVE_RUN_STATUSES`, so "can this run still change?"
  has one definition rather than a repeated status list;
- `EVAL_POLL_MS`, the refetch cadence while a run is in flight.

`status-badge` learns EVALUATING so a run in its promptfoo phase renders
like every other in-flight status instead of falling through to the
default.
@EnjoyBacon7
EnjoyBacon7 force-pushed the eval/12-ui-api-client branch from f7a57bb to 3217048 Compare July 28, 2026 10:25
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.

2 participants