Skip to content

chore: promote main to master (toast feedback for admin mutations)#99

Merged
RikepilB merged 1 commit into
masterfrom
main
Jun 12, 2026
Merged

chore: promote main to master (toast feedback for admin mutations)#99
RikepilB merged 1 commit into
masterfrom
main

Conversation

@RikepilB

@RikepilB RikepilB commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Promotes PR #98 to production: sonner toast feedback for every previously-silent admin mutation (pipeline move, stages add/rename/delete/reorder, notes, integrations, resume-data editor, new template), plus two stage-rename bug fixes (double rename on Enter, Escape still saving).

CI green on #98: lint, typecheck, 196 tests, build, Vercel preview.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added toast notifications throughout the admin interface for resume data editing, notes management, integrations, pipeline operations, stage management, and template creation
    • All admin actions now display success confirmations and specific error messages
    • Enhanced loading states with visual feedback during async operations
    • Added input validation with immediate user feedback

…nd template actions (#98)

Every admin mutation that previously failed silently now reports success
and failure via sonner toasts:

- Pipeline board: moving an applicant toasts the destination stage on
  success; failures toast the server error and re-fetch so the card
  snaps back to its real column. Board load errors are surfaced too.
- Stages manager: add/rename/delete/reorder wrapped in try/catch with
  toasts; Add button gets a pending spinner; failed reorder reverts the
  optimistic order. Also fixes two rename bugs: Enter triggered rename
  twice (keydown + blur), and Escape saved anyway because unmounting
  the input fired blur.
- Notes: add/save/delete toast on success and failure.
- Integrations: create/delete/test/retry check res.ok and toast.
- Resume data editor: client-side JSON validation before the server
  roundtrip (prod masks server-action error messages), plus toasts.
- New template button: failure toast instead of silently doing nothing.
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scoutlane Ready Ready Preview, Comment Jun 12, 2026 12:12am

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b761bea5-7267-47bd-a57c-7e2e54fe21b5

📥 Commits

Reviewing files that changed from the base of the PR and between 4999be2 and dfeb4a1.

📒 Files selected for processing (7)
  • src/app/(admin)/admin/jobs/[id]/applicants/[applicantId]/_components/ApplicantResumeDataEditor.tsx
  • src/app/(admin)/admin/jobs/[id]/applicants/[applicantId]/_components/NotesSection.tsx
  • src/app/(admin)/admin/jobs/[id]/integrations/_components/IntegrationForm.tsx
  • src/app/(admin)/admin/jobs/[id]/integrations/_components/IntegrationList.tsx
  • src/app/(admin)/admin/jobs/[id]/pipeline/page.tsx
  • src/app/(admin)/admin/jobs/[id]/stages/_components/StagesManager.tsx
  • src/app/(admin)/admin/templates/_components/NewTemplateButton.tsx

📝 Walkthrough

Walkthrough

This PR systematically adds user-facing toast notifications to async operations across six admin features using sonner. Each component now validates input where applicable, wraps API calls in try/catch, displays success/error toasts, and refreshes routes only on successful completion. The changes include optimistic state updates for reordering, input cancellation via keyboard escape, and loading indicators during in-flight requests.

Changes

Toast notifications across admin features

Layer / File(s) Summary
Resume data editor with JSON validation and save toasts
src/app/(admin)/admin/jobs/[id]/applicants/[applicantId]/_components/ApplicantResumeDataEditor.tsx
Resume data editor imports toast and validates textarea content as JSON before saving. Save handler wraps saveApplicantResumeDataJson in try/catch, showing success/error toasts and refreshing only on successful persistence.
Notes CRUD operations with toast feedback
src/app/(admin)/admin/jobs/[id]/applicants/[applicantId]/_components/NotesSection.tsx
Notes section imports toast and wraps create, update, and delete handlers in try/catch. Each async operation shows success/error toasts; route refresh occurs only after successful completion.
Integration form submission with response parsing
src/app/(admin)/admin/jobs/[id]/integrations/_components/IntegrationForm.tsx
Integration form imports toast and changes submit logic from fire-and-forget to awaited fetch with error handling. Non-OK responses parse optional error messages for toasts; success path shows toast, resets form, and refreshes; connection errors are separately handled.
Integration delete and action handlers with error toasts
src/app/(admin)/admin/jobs/[id]/integrations/_components/IntegrationList.tsx
Integration list imports toast and wraps delete and post-action (test/retry) handlers in try/catch. Delete shows success/error toasts and refreshes only on success. Post actions emit action-specific toasts and only refresh after successful completion.
Pipeline data fetch and applicant move with error recovery
src/app/(admin)/admin/jobs/[id]/pipeline/page.tsx
Pipeline page imports toast and refactors fetchStages to use try/catch/finally, ensuring loading state clears and error toasts display on failure. Applicant move handler wraps moveApplicant in try/catch, shows conditional success toasts, re-fetches stages on both success and failure, and includes stages in callback dependencies.
Stages CRUD with input validation, optimistic updates, and loading UI
src/app/(admin)/admin/jobs/[id]/stages/_components/StagesManager.tsx
Stages manager imports toast and adds comprehensive async handling for stage operations. Rename input adds Escape/cancel via dataset flag. Create and rename handlers track adding state, validate/trim input, wrap service calls in try/catch/finally, show toasts, and refresh on success. Delete clears pending state in finally. Reorder performs optimistic local update then syncs; on failure reverts and shows error toast. Add button displays spinner and disables while adding.
Template creation with error handling
src/app/(admin)/admin/templates/_components/NewTemplateButton.tsx
New template button imports toast and wraps async template creation in try/catch. On success, navigates to the new template's admin route and refreshes; on failure, shows error toast instead of silently failing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A rabbit hops through stages bright,
Toast notifications, oh what a sight!
With try and catch, errors unfold,
Success messages in banners of gold,
No more silent fails in the dark of night! 🌟

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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.

@RikepilB RikepilB merged commit 7a42262 into master Jun 12, 2026
3 of 4 checks passed
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.

1 participant