Skip to content

Evaluation: Make the evals run card responsive#148

Merged
Ayush8923 merged 4 commits intomainfrom
fix/evals-responsive
May 5, 2026
Merged

Evaluation: Make the evals run card responsive#148
Ayush8923 merged 4 commits intomainfrom
fix/evals-responsive

Conversation

@Ayush8923
Copy link
Copy Markdown
Collaborator

@Ayush8923 Ayush8923 commented May 5, 2026

Summary

On the Text Evaluations tab, the View Results button on each evaluation run card was being clipped off the right edge of the card whenever the right-side Run New Evaluation panel was open (450 px). At common viewport widths (~1280–1500 px), there wasn't enough horizontal room for the dataset name + cost row plus both action buttons on a single line, so users couldn't open a completed run from the list.

  • Before: Single-line row; View Results button clipped at narrow widths

  • After: Row wraps when needed, both buttons always visible regardless of right-panel state

  • Also, make the full responsive for tablet, desktop screens.

Summary by CodeRabbit

  • New Features
    • Add responsive creation flow: on small screens dataset/run forms open in a modal with a mobile "New" button; desktop keeps right‑panel forms.
  • Style
    • Improved responsive layouts across evaluation headers, cards, lists and skeletons with wrapping, spacing tweaks and text truncation to keep content readable.
  • Chores
    • Header buttons adapt label visibility by screen size for cleaner mobile UI.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@Ayush8923 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 2 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b3f771cc-ae76-4cc3-b75a-88fda15cbf12

📥 Commits

Reviewing files that changed from the base of the PR and between 71406cc and 3e1a024.

📒 Files selected for processing (3)
  • app/(main)/evaluations/page.tsx
  • app/components/evaluations/CreateDatasetForm.tsx
  • app/components/evaluations/DatasetsTab.tsx
📝 Walkthrough

Walkthrough

Refactors evaluation-related UIs for responsive layout and mobile workflows: adds wrapping/truncation to headers and cards, introduces mobile modals for creating datasets and running evaluations, exposes an optional onCreateNew callback for runs list, and updates several skeleton components for responsive sizing.

Changes

Evaluations UI & Skeletons (responsive/modal wiring)

Layer / File(s) Summary
API / Props
app/components/evaluations/EvalRunsList.tsx
EvalRunsListProps adds optional onCreateNew?: () => void and the component destructures onCreateNew.
Control / Wiring
app/components/evaluations/EvaluationsTab.tsx, app/components/evaluations/DatasetsTab.tsx
Adds isFormModalOpen state; EvalRunsList.onCreateNew opens modal; handleRun closes modal on success and refreshes list; CreateDatasetForm/RunEvaluationForm are rendered in a right panel on lg+ and inside a Modal on smaller screens.
Layout / Component
app/components/evaluations/EvalRunCard.tsx, app/(main)/evaluations/[id]/page.tsx
Post-score metadata/actions rows and header areas switched to wrapping/truncation layouts; responsive button label spans added; actions spacing/alignment adjusted (gap-2, ml-auto, truncation, max-w-40).
Skeletons / Placeholder UI
app/components/DatasetListSkeleton.tsx, app/components/ResultsTableSkeleton.tsx, app/components/RunsListSkeleton.tsx
Skeleton components updated for responsive spacing and sizing: flex-wrap usage, ml-auto alignment, min-w-[640px] wrapper and min-w-20 cells, and rounded placeholders changed to rounded-full where applicable.
Minor / Import / Cosmetic
app/components/evaluations/EvalRunsList.tsx (imports)
Button import reorganization and icon ordering adjustments.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant EvalRunsList
    participant EvaluationsTab
    participant Modal
    participant RunEvaluationForm
    participant API
    User->>EvalRunsList: Click "New" (mobile)
    EvalRunsList->>EvaluationsTab: invoke onCreateNew()
    EvaluationsTab->>Modal: open modal (isFormModalOpen = true)
    User->>Modal: fills RunEvaluationForm
    RunEvaluationForm->>API: submit evaluation request
    API-->>RunEvaluationForm: success
    RunEvaluationForm->>EvaluationsTab: notify success
    EvaluationsTab->>Modal: close modal (isFormModalOpen = false)
    EvaluationsTab->>EvalRunsList: refresh runs list
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • vprashrex
  • nishika26
  • Prajna1999

Poem

🐰 In folds and wraps my UI hops with glee,
Truncated names fit snug as can be,
A modal opens on small-screen delight,
Buttons aligned, placeholders shining bright —
Hooray, the evaluations dance just right!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: restructuring the evaluation run card UI for responsive wrapping behavior so action buttons remain visible at narrower viewports.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/evals-responsive

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 and usage tips.

@Ayush8923 Ayush8923 self-assigned this May 5, 2026
@Ayush8923 Ayush8923 requested a review from vprashrex May 5, 2026 15:05
@Ayush8923 Ayush8923 requested a review from nishika26 May 5, 2026 15:05
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/evaluations/EvalRunCard.tsx`:
- Around line 69-74: The two spans rendering truncated text (the span wrapping
job.dataset_name and the span wrapping assistantConfig.name in EvalRunCard.tsx)
are inline elements so the truncate/max-w-40 rules won't apply; change their
display to block or inline-block (e.g., add a Tailwind class like inline-block
or block to those specific span elements) so max-width takes effect and
text-overflow/ellipsis will work as intended while keeping the existing truncate
class and styling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32cd833c-8194-483f-a445-2d360fa8537f

📥 Commits

Reviewing files that changed from the base of the PR and between cde9771 and bb6ac9d.

📒 Files selected for processing (1)
  • app/components/evaluations/EvalRunCard.tsx

Comment thread app/components/evaluations/EvalRunCard.tsx Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/components/evaluations/DatasetsTab.tsx`:
- Around line 228-236: DatasetsTab's create action doesn't signal success so the
modal never auto-closes; update DatasetsTabProps to type handleCreateDataset as
() => Promise<boolean>, then in DatasetsTab add a local async wrapper (e.g.,
const handleCreate = async () => { const success = await handleCreateDataset();
if (success) { fetchDatasets(); setIsFormModalOpen(false); } }) and pass that
wrapper to CreateDatasetForm via formProps; also ensure the parent
implementation of handleCreateDataset returns a boolean success flag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41c3fcd7-7cdf-4d11-a87b-b6ebcf2295dc

📥 Commits

Reviewing files that changed from the base of the PR and between bb6ac9d and 71406cc.

📒 Files selected for processing (8)
  • app/(main)/evaluations/[id]/page.tsx
  • app/components/DatasetListSkeleton.tsx
  • app/components/ResultsTableSkeleton.tsx
  • app/components/RunsListSkeleton.tsx
  • app/components/evaluations/DatasetsTab.tsx
  • app/components/evaluations/EvalRunCard.tsx
  • app/components/evaluations/EvalRunsList.tsx
  • app/components/evaluations/EvaluationsTab.tsx
✅ Files skipped from review due to trivial changes (4)
  • app/components/ResultsTableSkeleton.tsx
  • app/(main)/evaluations/[id]/page.tsx
  • app/components/DatasetListSkeleton.tsx
  • app/components/RunsListSkeleton.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/components/evaluations/EvalRunCard.tsx

Comment thread app/components/evaluations/DatasetsTab.tsx
@Ayush8923 Ayush8923 merged commit 89d6fbd into main May 5, 2026
2 checks passed
@Ayush8923 Ayush8923 deleted the fix/evals-responsive branch May 5, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants