Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

do not request to enable browser notifications on localhost (#1057)

Will Hutchinsond25c01fd9409
diff --git a/js/app/AGENTS.md b/js/app/AGENTS.md
index df72287465..9dabf822b3 100644
--- a/js/app/AGENTS.md
+++ b/js/app/AGENTS.md
@@ -49,7 +49,6 @@ The app uses cookie-based authentication (`credentials: 'include'`) since `ENABL
}
```
This second navigation will work because the route interception is now active and auth requests succeed.
-5. Always dismiss/disallow browser notification prompts by default unless otherwise specified
**Why this is needed:** The app checks authentication via API calls to `.macro.com` endpoints using `credentials: 'include'`. Without valid cookies or an auth header, `useIsAuthenticated()` returns false and the `Soup` component redirects to `/` → `/signup`. The initial redirect happens before route interception can authenticate the first requests, but forcing a second navigation resolves this.
diff --git a/js/app/packages/notifications/components/BrowserNotificationModal.tsx b/js/app/packages/notifications/components/BrowserNotificationModal.tsx
index 57a4d2666d..0ae73f58bc 100644
--- a/js/app/packages/notifications/components/BrowserNotificationModal.tsx
+++ b/js/app/packages/notifications/components/BrowserNotificationModal.tsx
@@ -10,7 +10,7 @@ export const BrowserNotificationModal = () => {
if (!settings.isSupported) return null;
const shouldShow = createMemo(
- () => isAuthenticated() && settings.shouldPrompt()
+ () => !import.meta.env.DEV && isAuthenticated() && settings.shouldPrompt()
);
const handleEnable = async () => {