feat: error DM notifications, BCC, and district email config#27
Open
kurt-croix wants to merge 4 commits into
Open
feat: error DM notifications, BCC, and district email config#27kurt-croix wants to merge 4 commits into
kurt-croix wants to merge 4 commits into
Conversation
kurt-croix
commented
Apr 29, 2026
Owner
- Add ADMIN_NPUB constant for error notification recipient
- Add sendErrorDM: NIP-17 gift-wrapped kind 14 DM to admin on report/email failures
- Add BCC to admin on every report email via nostr-mail bridge (experimental)
- Update DISTRICT_EMAIL_MAP with real special road district contacts:
- Richmond → susan_coats@sbcglobal.net
- Camden → vasmithey@gmail.com
- Orrick → dnailfarms@gmail.com
- Lawson → shookdld@aol.com
- Hardin → kodell2008411@gmail.com
- Dev mode (localhost) overrides all district emails to croix4clerk@pm.me
- ReportForm sends error DM when email or report publish fails
kurt-croix
force-pushed
the
feat/error-dm-bcc-district-emails
branch
3 times, most recently
from
April 29, 2026 18:46
501f335 to
b52cfb1
Compare
- Add /district-emails.json in public dir — editable on server without rebuild - Add loadDistrictEmailConfig() for runtime config loading - Add getDistrictEmail() to resolve district → email from config - Add ADMIN_NPUB constant for error notification recipient - Add sendErrorDM: NIP-17 gift-wrapped kind 14 DM to admin on failures - Add BCC to admin on every report email via nostr-mail bridge - Update real district contacts in JSON config - Dev mode (localhost) overrides all emails to croix4clerk@pm.me - ReportForm sends error DM when email or report publish fails
kurt-croix
force-pushed
the
feat/error-dm-bcc-district-emails
branch
from
April 29, 2026 18:55
b52cfb1 to
c569ff4
Compare
Coverage by area: - lib/: 97.7% lines - hooks/: 86.5% lines - pages/: 85.1% lines - components/: 64.3% lines Test files added: - tests/lib/ (6): utils, geohash, jurisdiction, dmUtils, dmConstants, genUserName - tests/hooks/ (15): useLocalStorage, useIsMobile, useToast, useRoadReports, useConversationMessages, useAuthor, useReportMutations, useComments, useAppContext, useWallet, useNostrPublish, useNWC, useUploadFile, useLoginActions, useLoggedInAccounts, useCurrentUser - tests/pages/ (6): NotFound, NIP19Page, Index, ReportDetail, ReportList, SplashPage - tests/components/ (8): ReportCard, AppProvider, NoteContent, NostrSync, ErrorBoundary, LoginArea, LoginDialog, SignupDialog Also adds @testing-library/user-event dev dependency.
- Run unit tests (vitest) before build/deploy - Add tsc --noEmit type check - Add PR trigger on master - Add tests/** to path triggers - Build job now depends on test job passing
- Replace runtime fetch of /district-emails.json with build-time YAML import via Vite ?raw + js-yaml - Add config.yaml at project root with district email contacts - Remove public/district-emails.json - Remove loadDistrictEmailConfig() from App.tsx (no longer needed) - Update districtEmails tests for new import pattern
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.