Skip to content

[FE-29] Build unified Toast abstraction wrapping Sonner to replace dual-library usage #1008

@devwums

Description

@devwums

Problem

The codebase imports both react-hot-toast and sonner — two competing toast libraries coexist with inconsistent styling and usage patterns.

Proposed Solution

Create frontend/cntr/Toast/toast.ts — a unified toast abstraction wrapping sonner. Exports: showSuccess(message: string): void, showError(message: string): void, showInfo(message: string): void, showLoading(message: string): string | number, dismissToast(id: string | number): void. All 5 functions route through Sonner with ManageHub styling defaults. All implementation must live inside frontend/cntr/.

Acceptance Criteria

  • File at frontend/cntr/Toast/toast.ts
  • All 5 functions exported as named exports
  • All use sonner — not react-hot-toast
  • showError has no auto-dismiss (duration: Infinity)
  • showSuccess and showInfo auto-dismiss after 4000ms
  • Test in frontend/cntr/Toast/toast.test.ts verifying each function calls the correct sonner method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions