Remove the unused push notification prompt and Firebase messaging stack - #34
Merged
manuelgeek merged 1 commit intoAug 5, 2026
Merged
Conversation
…g stack The site prompted every first-time visitor for notification permission, but no push notifications are ever sent. Remove the modal along with the rest of the dead stack: the FCM topic-subscription API route, the Firebase app init, the background-message service worker, the NOTIFICATIONS constant and its now-empty module, the modal artwork, the firebase dependency, and the unused NEXT_PUBLIC_FIREBASE_* and NEXT_PUBLIC_MESSAGING_TOPIC entries in .env.example. react-toastify stays; SessionFeedback still uses it. Closes #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #33.
The site asked every first-time visitor for notification permission, but I never actually send push notifications. It was a permission prompt for a channel with no traffic, and it was the first thing a visitor saw.
I removed the whole dead stack rather than just hiding the modal, since nothing else used any of it:
NotificationsPrompt.tsxand its render incomponents/layouts/default.tsxpages/api/notification.ts— the FCM topic-subscribe route, whose only caller was the modalfirebase/util/index.ts— Firebase init, only ever consumed by messagingpublic/firebase-messaging-sw.js— the background-message service workerutils/constants.ts— it held onlyNOTIFICATIONS, so the file was empty afterwardspublic/images/notif.svg— the modal artworkfirebasedependency, plus the six now-deadNEXT_PUBLIC_FIREBASE_*/NEXT_PUBLIC_MESSAGING_TOPICvars in.env.exampleKept
react-toastify—SessionFeedbackstill uses it.utils/helpers.tsstays too, sinceisClienthas three other consumers.Verified with
yarn lint(clean) andyarn build(succeeds). Theyarn.lockdiff is a Firebase-only prune.Based on
feat/home-redesign-planrather thandev, since I branched off it — merge #24 first and this retargets cleanly.One thing to note: visitors who already granted permission still have
firebase-messaging-sw.jsregistered in their browser. Deleting the file stops new registrations, but existing ones linger until they expire. Harmless given nothing is being sent — happy to add an explicit unregister if you'd rather flush them.