Skip to content

fix: show toast notification when grouped export format is unavailable#29

Merged
vprashrex merged 1 commit intomainfrom
fix/grouped-format-error-toast
Jan 30, 2026
Merged

fix: show toast notification when grouped export format is unavailable#29
vprashrex merged 1 commit intomainfrom
fix/grouped-format-error-toast

Conversation

@vprashrex
Copy link
Copy Markdown
Collaborator

@vprashrex vprashrex commented Jan 30, 2026

Target Issue: #30

Summary:

  • Earlier, when the backend returned success: false with an error for the grouped format, the error was silently ignored.
  • Now, a toast message is shown and the format selector is reverted to Row.

Reason for the issue:

  • question_id is only created when a new dataset is uploaded.
  • Older datasets do not have a question_id, which caused the grouped format to fail silently.

How it looks:

image

Previously, when the backend returned success: false with an error
for grouped format, the error was silently ignored. Now displays
a toast message and reverts the format selector to Row.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

Added post-response error handling in the evaluation export flow that displays error messages via toast notifications and forces the export format to 'row' when the backend returns an error response.

Changes

Cohort / File(s) Summary
Error Handling in Evaluation Export
app/evaluations/[id]/page.tsx
Added post-response error handling that checks if data.success is false, displays error toast, and resets export format to 'row' before the existing data fallback logic executes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Evaluation: Group Export #25: Added the exportFormat state and export_format handling logic that this PR leverages for the error recovery flow in the same file.

Suggested reviewers

  • Prajna1999
  • AkhileshNegi

Poem

🐰 A hop, a skip, and errors caught,
When backends fail, we've got what's sought,
Toast messages bloom in fields so bright,
Error handling makes the export right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: adding a toast notification when the grouped export format is unavailable, which aligns with the core objective of the PR.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/grouped-format-error-toast

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.

@vprashrex vprashrex requested a review from Prajna1999 January 30, 2026 03:54
@vprashrex vprashrex self-assigned this Jan 30, 2026
@vprashrex vprashrex added the bug Something isn't working label Jan 30, 2026
@vprashrex vprashrex linked an issue Jan 30, 2026 that may be closed by this pull request
@vprashrex vprashrex merged commit 251b77b into main Jan 30, 2026
1 check passed
@Ayush8923 Ayush8923 deleted the fix/grouped-format-error-toast branch March 20, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing toast notification when grouped export format is unavailable

2 participants