feat(notifications): add scoped channel preferences - #298
Closed
micheal000010000-hub wants to merge 2 commits into
Closed
feat(notifications): add scoped channel preferences#298micheal000010000-hub wants to merge 2 commits into
micheal000010000-hub wants to merge 2 commits into
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Member
|
@micheal000010000-hub This issue was closed by an earlier PR. |
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
Adds workspace/project notification preference scopes and splits each notification type into separate in-app and email toggles. Preference resolution now falls back from project to workspace to global defaults.
Linked issues
Closes #203
Type of change
feat:) — user-visible new capabilitySurface
apps/api/)apps/web/)apps/api/migrations/)What changed
*_in_appand*_emailnotification preferences.Why this approach
This reuses the existing
user_notification_preferencesscope fields and adds channel-specific columns instead of creating a separate preference table. Existing boolean fields remain compatible while newer clients use the explicit in-app/email fields.Database / migrations
apps/api/migrations/000007_notification_preference_channels.up.sqlAND matching.down.sqldatabase.RunMigrationson startupBreaking changes
Test plan
npm --prefix apps/web run typechecknpm --prefix apps/web run lintnpm --prefix apps/web run format:checkcd apps/api && go vet ./...cd apps/api && go test ./...Note:
npm run validatereached the Go step, then failed locally because Snap-confined Go cannot run inside the sandbox. The equivalent Go steps were run directly and passed.Screenshots / recordings (UI changes)
Rollout notes
New notification preference columns are default-enabled and backfilled from the existing global booleans. No env vars or manual backfill required.
AI assistance
Codex— and AI-assisted commits include aCo-Authored-By:trailerChecklist
--no-verifybypass)internal/config/config.goand documented above.envvalues committed