Skip to content

fix(checklist): add success toasts and delete dialog loading state to task mutations - #243

Draft
dccakes wants to merge 1 commit into
mainfrom
claude/sharp-feynman-hl9ycy
Draft

dccakes wants to merge 1 commit into
mainfrom
claude/sharp-feynman-hl9ycy

Conversation

@dccakes

@dccakes dccakes commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Daily Product Improvement

Summary

Added toast.success() feedback to createTask, updateTask, and deleteTask mutations on the Checklist page, and upgraded the delete confirm dialog to show a Loader2 spinner with "Deleting…" label while the deletion is in flight — matching the pattern already used on the Events and Budget screens.


Recommendations Reviewed

Area: Checklist — checklist-page-client.tsx
Issue: createTask, updateTask, and deleteTask mutations fire silently on success. The delete confirm dialog shows no loading state while the request is in flight.
Recommendation: Add toast.success() on each mutation's onSuccess callback; add Loader2 spinner + "Deleting…" label to the confirm dialog AlertDialogAction.
Type: UX/UI
Priority: High
Effort: Small


Area: Dashboard — planning-overview.tsx BudgetCard / VendorsCard
Issue: Both cards render the "nothing set up yet" empty state before data loads, causing a flash of incorrect content on slow connections. (Covered by open PR #233.)
Type: UX/UI | Priority: High | Effort: Small


Area: Checklist loading state — checklist/loading.tsx
Issue: Loading skeleton omits the DashboardTopbar, causing it to disappear during page transitions. (Covered by open PR #238.)
Type: UX/UI | Priority: Medium | Effort: Small


Area: Checklist card header — checklist-page-client.tsx
Issue: "Back to dashboard" nav link sits inside the card title next to "Add task", mixing navigation with primary actions. (Covered by open PR #240.)
Type: UX/UI | Priority: Medium | Effort: Small


Area: Events — event-card.tsx
Issue: "RSVP Questions" and "Edit" dropdown items share the same Pencil icon. (Covered by open PR #229.)
Type: UX/UI | Priority: Low | Effort: Small


Area: Checklist — missing error.tsx
Issue: No error boundary for the checklist route; three parallel API calls have no recovery UI if any fail.
Recommendation: Add a checklist/error.tsx modelled on budget/error.tsx.
Type: Frontend cleanup | Priority: Medium | Effort: Small


Area: Guest list — missing error.tsx and unstyled null-data fallback
Issue: No error boundary; null dashboardData renders a plain unstyled <h1> with no retry path.
Recommendation: Add guest-list/error.tsx and replace the inline null-data branch with a styled error treatment.
Type: UX/UI | Priority: Medium | Effort: Small


Area: Budget — category-card.tsx
Issue: Expense row edit/delete buttons are bare <button> text links with no padding or minimum touch target, making them hard to tap on mobile.
Recommendation: Swap to Button component with size='sm' or add explicit min-h-[44px] wrapper.
Type: UX/UI (accessibility) | Priority: Medium | Effort: Small


Area: Budget and Vendors pages — budget/page.tsx, vendors/page.tsx
Issue: try/catch blocks call redirect('/') on API error, silently bypassing the existing error.tsx boundaries.
Recommendation: Remove the try/catch redirect pattern and let errors bubble to error.tsx.
Type: Frontend cleanup | Priority: Medium | Effort: Small


Area: Vendors — vendor-category-section.tsx
Issue: "No vendors added yet" empty state is unreachable — the component is only rendered for categories with at least one vendor.
Recommendation: Remove the dead branch.
Type: Frontend cleanup | Priority: Low | Effort: Small


Area: Cross-cutting — five screens
Issue: Five near-identical empty state components with no shared abstraction (~150 lines of duplicated markup).
Recommendation: Extract a shared EmptyState primitive.
Type: Frontend cleanup | Priority: Low | Effort: Large


Selected Improvement

Add toast.success() to createTask, updateTask, and deleteTask onSuccess callbacks, and add a Loader2 spinner + "Deleting…" text to the delete task confirm dialog, all within checklist-page-client.tsx.

Why This Was Selected

Every other screen (Events, Budget, Vendors) provides success feedback on mutations and shows a loading spinner in destructive confirm dialogs. Checklist was the only screen missing both. The fix is entirely within one file, requires no design decisions, follows patterns already established in the codebase, and is the highest-frequency daily action in the product.

Changes Made

  • createTask.onSuccess: added toast.success('Task created')
  • updateTask.onSuccess: added toast.success('Task updated')
  • deleteTask.onSuccess: added toast.success('Task deleted')
  • Delete confirm AlertDialogAction: added disabled={deleteTask.isPending}, Loader2 spinner, and "Deleting…" / "Delete" conditional label
  • Delete confirm AlertDialogCancel: added disabled={deleteTask.isPending} to prevent concurrent actions
  • Imported Loader2 from lucide-react
  • Updated unit test: confirm button label changed from "Confirm delete" to "Delete"

Files Changed

  • src/app/(authenicated)/checklist/_components/checklist-page-client.tsx
  • tests/unit/components/checklist/checklist-page-client.test.tsx

Verification

  • TypeScript: tsc --noEmit — no errors
  • Biome: biome check on changed file — no issues
  • Unit tests: all 2023 tests pass (including the updated checklist test)

Future Recommendations

Add checklist/error.tsx and guest-list/error.tsx

  • Priority: Medium | Effort: Small
  • Reason not included: Separate concern from today's mutation feedback fix; would be a clean standalone PR
  • Should become GitHub issue: No (small enough for a daily run)

Fix budget/vendors redirect('/') on error — bypass of error.tsx boundaries

  • Priority: Medium | Effort: Small
  • Reason not included: Touches two page files and is a different concern
  • Should become GitHub issue: No

Budget expense row touch targets too small on mobile

  • Priority: Medium | Effort: Small
  • Reason not included: Different screen and component
  • Should become GitHub issue: No

Extract shared EmptyState primitive

  • Priority: Low | Effort: Large
  • Reason not included: Large refactor touching five screens
  • Should become GitHub issue: Yes — spans multiple screens, needs design consistency review

GitHub Issues Created or Proposed

No issues created. All unimplemented recommendations are either Small (suitable for future daily runs) or flagged above. The shared EmptyState refactor is the only one worth a separate issue; it is proposed here for a future run to file.


Generated by Claude Code

… task mutations

createTask, updateTask, and deleteTask fired silently on success, unlike every
other screen in the app. Add toast.success() to each and add a Loader2 spinner
with Deleting... label to the confirm delete dialog, matching the events screen
pattern. Update the confirm button label from 'Confirm delete' to 'Delete' and
update the corresponding unit test.

Co-Authored-By: AgenticDiego <noreply@carvallo.io>
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
scv Error Error Aug 8, 2026 2:27pm

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Jest Test Coverage

Coverage Summary

Lines Statements Branches Functions
Coverage: 81%
81.72% (35137/42996) 82.9% (3733/4503) 67.97% (1036/1524)

This branch had an error being deployed

1 failed deployment
Preview — 9b66647a Deployed Aug 8, 2026 by vercel[bot]
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