Skip to content

feat(client): migrate notifications from react-toastify to coss-ui toast - #3

Merged
OmAmberkar merged 2 commits into
OmAmberkar:mainfrom
Sumitr995:main
Aug 15, 2026
Merged

OmAmberkar merged 2 commits into
OmAmberkar:mainfrom
Sumitr995:main

Conversation

@Sumitr995

Copy link
Copy Markdown
Collaborator
  • init shadcn CLI in JS mode (components.json tsx:false, @ alias, cn helper)

  • re-map index.css tokens to site palette; add Matrix toast keyframes

  • wire ToastProvider + AnchoredToastProvider in App.jsx (bottom-right)

  • route all toasts through components/notification.js (showToast + toast helpers); migrate Login/Register/Profile imports

  • remove react-toastify dependency

- init shadcn CLI in JS mode (components.json tsx:false, @ alias, cn helper)

- re-map index.css tokens to site palette; add Matrix toast keyframes

- wire ToastProvider + AnchoredToastProvider in App.jsx (top-center)

- route all toasts through components/notification.js (showToast + toast helpers); migrate Login/Register/Profile imports

- remove react-toastify dependency
Copilot AI lite review requested due to automatic review settings August 6, 2026 11:16
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@Sumitr995 is attempting to deploy a commit to the omamberkar's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the client’s notification system away from react-toastify to a new toast implementation built on @base-ui/react (aligned with the “coss-ui toast” / shadcn setup), while also introducing shadcn-related tooling and design tokens to support the new UI components.

Changes:

  • Replace react-toastify usage with a centralized toast API (components/notification.js) backed by @base-ui/react/toast, and wire providers into App.jsx.
  • Add shadcn/base UI utilities and components (toast, button, spinner, cn() helper) plus Vite @ alias support.
  • Update global styles/tokens and add toast animation keyframes.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
client/vite.config.js Adds @ alias resolution for Vite to support new absolute imports.
client/src/pages/Register.jsx Switches toast import to the new notification wrapper.
client/src/pages/Profile.jsx Switches toast import to the new notification wrapper.
client/src/pages/Login.jsx Switches toast import to the new notification wrapper.
client/src/lib/utils.js Adds cn() helper for class merging (clsx + tailwind-merge).
client/src/index.css Adds shadcn/tw-animate imports, updates tokens, and introduces toast animation keyframes.
client/src/components/ui/toast.jsx Introduces Base UI toast providers and rendering (standard + anchored).
client/src/components/ui/spinner.jsx Adds a lucide-based spinner component used by buttons/toasts.
client/src/components/ui/button.jsx Adds a Base UI-compatible button with variants and loading state.
client/src/components/notification.js Replaces react-toastify wrapper with toastManager-backed helpers (showToast, toast.*).
client/src/App.jsx Replaces ToastContainer with ToastProvider + AnchoredToastProvider.
client/package.json Adds Base UI + shadcn dependencies and removes react-toastify.
client/jsconfig.json Adds @/* path mapping for JS tooling/editor support.
client/components.json Adds shadcn CLI configuration and registry/alias mappings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/src/components/ui/toast.jsx Resolved
Comment thread client/src/index.css Resolved
Copilot AI review requested due to automatic review settings August 6, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.

Suppressed comments (3)

client/src/components/ui/toast.jsx:62

  • z-60 and max-w-90 are not part of Tailwind's default utility set (and there is no Tailwind config in this repo to extend them), so these classes will be ignored and the viewport may end up with the wrong stacking/width. Use arbitrary values (or standard utilities) so the generated CSS is guaranteed.
        className={cn(
          "fixed z-60 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]",
          // Vertical positioning

client/src/components/ui/toast.jsx:225

  • Same issue as the non-anchored toast: toast.actionProps isn't spread into Toast.Action, so any handlers/attributes provided for the action are dropped.
                    {toast.actionProps && (
                      <Toast.Action className={buttonVariants({ size: "xs" })} data-slot="toast-action">
                        {toast.actionProps.children}
                      </Toast.Action>

client/src/components/ui/toast.jsx:150

  • toast.actionProps is checked and its children are rendered, but the props themselves (e.g., onClick/aria attributes) are never passed to Toast.Action, so actions won't behave as intended. Spread toast.actionProps into Toast.Action (and do the same in the anchored variant).

This issue also appears on line 222 of the same file.

                {toast.actionProps && (
                  <Toast.Action className={buttonVariants({ size: "xs" })} data-slot="toast-action">
                    {toast.actionProps.children}
                  </Toast.Action>

@vercel

vercel Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
query-tracker Ready Ready Preview Aug 9, 2026 6:02am

@OmAmberkar
OmAmberkar enabled auto-merge August 9, 2026 06:01
@Sumitr995
Sumitr995 marked this pull request as draft August 9, 2026 19:49
auto-merge was automatically disabled August 9, 2026 19:49

Pull request was converted to draft

@Sumitr995
Sumitr995 marked this pull request as ready for review August 9, 2026 19:50
@OmAmberkar
OmAmberkar enabled auto-merge August 11, 2026 13:54
@Sumitr995 Sumitr995 closed this Aug 13, 2026
auto-merge was automatically disabled August 13, 2026 12:56

Pull request was closed

@OmAmberkar

Copy link
Copy Markdown
Owner

The login and register was not functioning, need to work on that part with the proper fix before merge

@Sumitr995 Sumitr995 reopened this Aug 15, 2026
@OmAmberkar
OmAmberkar enabled auto-merge August 15, 2026 09:04
@OmAmberkar
OmAmberkar disabled auto-merge August 15, 2026 10:40
@OmAmberkar
OmAmberkar enabled auto-merge August 15, 2026 10:40
@OmAmberkar
OmAmberkar self-requested a review August 15, 2026 10:43
@OmAmberkar
OmAmberkar disabled auto-merge August 15, 2026 11:07
@OmAmberkar
OmAmberkar merged commit 4fcd29c into OmAmberkar:main Aug 15, 2026
19 checks passed

This branch was successfully deployed

1 active deployment
Preview — cef98373 Deployed Aug 9, 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.

3 participants