Repository navigation
Add CLI update prompts, system notices, and admin broadcast - #280
Merged
neuromechanist merged 2 commits intoMar 11, 2026
Merged
neuromechanist merged 2 commits into
neuromechanist merged 2 commits into
Conversation
- CLI update check: non-blocking npm registry check with 24h cache, yellow banner after command output, bun/bunx install detection - System notices: D1-backed notices with level/scope/expiry, admin CRUD commands, CLI display on preAction with dismissal tracking - Admin broadcast emails: markdown-to-HTML converter, Resend batch API in 100-recipient chunks, announcements email preference - Migrations 0016 (notices) and 0017 (broadcast_emails) Closes #279
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR280Version: 🤖 Updated on each push. |
- Add try-catch to GET /notices route for graceful degradation - Add verbose logging to empty catches in update-check and notices - Remove redundant NoticeRow interface in notices service - Add audit failure warning and missing data warning in broadcast - Remove redundant updateBannerPrinted guard in index.ts - Add .catch() to program.parseAsync() - Fix "all disabled" test to actually disable announcements - Add unit tests for markdownToEmailHtml and normalizeVersion
neuromechanist
deleted the
279-cli-update-prompts-and-admin-broadcast-notifications
branch
March 11, 2026 08:29
This was referenced Mar 11, 2026
Merged
Merged
This branch was previously deployed
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.
Summary
Implements #279 across three features:
~/.config/nemar/update-check.json). Displays a yellow banner after command output when a newer version is available. Detects bun vs bunx install method. Disabled withNEMAR_NO_UPDATE_CHECK=1.nemar admin notice list/set/clear. CLI fetches and displays active notices on startup with per-account dismissal tracking.nemar admin notify --to all|admins|members --subject "..." --body "..."sends markdown-formatted emails via Resend batch API (100-recipient chunks). Newannouncementsemail preference category (opt-out, defaults enabled). Audit trail inbroadcast_emailsD1 table.New files
src/lib/update-check.ts- CLI update check with cachesrc/lib/notices.ts- CLI notice display and dismissalbackend/src/services/notices.ts- Notice CRUD servicebackend/src/services/broadcast.ts- Broadcast service + markdown-to-HTML converterbackend/src/db/migrations/0016_notices.sql- Notices tablebackend/src/db/migrations/0017_broadcast_emails.sql- Broadcast audit tableModified files
src/index.ts- Update check hooks, notice preAction, parseAsyncsrc/lib/config.ts- Added dismissedNoticeIds fieldsrc/lib/api.ts- New API functions, announcements in EmailPreferencessrc/commands/admin.ts- Notice + notify commands, announcements in email-prefsbackend/src/services/email.ts- Added announcements to EmailPreferencesbackend/src/routes/admin.ts- Notice CRUD routes, broadcast endpointbackend/src/index.ts- GET /notices with optional authtest/email-preferences.test.ts- Updated expectations for announcements fieldTest plan