Skip to content

Fix: Replace browser alert() popups with Toast Notification System across the appΒ #83

@Ananya-CM

Description

@Ananya-CM

πŸ› Bug / Enhancement

Area: UI / User Experience β€” Global
Type: UX Fix
Priority: High β€” affects every user interaction


πŸ“Œ Description

FlowForge currently uses native browser alert()
popups for ALL user feedback messages. This is a
significant UX problem because browser alerts:

  • Are visually jarring and break the polished UI
  • Completely block the page β€” user cannot interact
    with anything until dismissed
  • Are unstyled β€” look nothing like the app theme
  • Are considered bad practice in all modern web apps

Every production web app (Notion, Linear, Vercel)
uses a toast/snackbar notification system instead.


πŸ” Proof β€” alert() Found in Source Code

In frontend/app/login/page.tsx:

alert("Supabase is not configured.");
alert("Please enter your email and password.");
if (error) alert(error.message);

These blocking popups fire on the most common
user actions β€” login attempts and errors.


❌ Current Behaviour

  1. User clicks Login without filling fields
  2. Browser freezes and shows a native OS popup
  3. User must click OK before doing anything
  4. Popup has zero styling β€” completely out of
    place with the rest of the app

βœ… Expected Behaviour

  1. User clicks Login without filling fields
  2. A styled toast notification slides in
    smoothly from the top-right corner
  3. Shows the error in the app's theme colors
  4. Auto-dismisses after 3-4 seconds
  5. User can still interact with the page

πŸ’‘ Proposed Implementation

New Files to Create

1. frontend/app/context/ToastContext.tsx

  • Global showToast(message, type) function
  • Manages toast queue and auto-dismiss timer
  • Types: success | error | info

2. frontend/app/components/Toast.tsx

  • Fixed notification at top-right of screen
  • Styled with CSS variables matching app theme
  • Smooth slide-in / fade-out animation
  • Manual close button

Files to Modify

3. frontend/app/layout.tsx

  • Wrap app with <ToastProvider>

4. frontend/app/login/page.tsx

  • Replace all alert() calls with showToast()

πŸ“‚ Summary of Changes

frontend/app/
β”œβ”€β”€ context/
β”‚ └── ToastContext.tsx ← new
β”œβ”€β”€ components/
β”‚ └── Toast.tsx ← new
β”œβ”€β”€ layout.tsx ← minor edit
└── login/
└── page.tsx ← replace alert()


πŸ–₯️ Steps to Reproduce

  1. Go to http://localhost:3000/login
  2. Click "Sign in" without entering anything
  3. Observe the jarring native browser alert popup
  4. Compare with the polished homepage design

@Shriii19
I'd like to work on this issue.
Could you please assign it to me?

nsoc26

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions