(janitor/dedupe): share default user notification preferences - #5843
Open
kilo-code-bot[bot] wants to merge 1 commit into
Open
(janitor/dedupe): share default user notification preferences#5843kilo-code-bot[bot] wants to merge 1 commit into
kilo-code-bot[bot] wants to merge 1 commit into
Conversation
The all-enabled UserNotificationPreferences default was declared three times across the notifications service (twice as DEFAULT_PREFERENCES and once inlined). Consolidate on a single exported constant owned by cloud-agent-session-push.ts, which already owns the UserNotificationPreferences type.
Contributor
Author
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 82.6K · Output: 5.2K · Cached: 187.1K Review guidance: REVIEW.md from base branch |
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
The all-enabled
UserNotificationPreferencesdefault value was declared three times across the notifications service — twice as a localDEFAULT_PREFERENCESconstant and once as an inlined object literal. This consolidates them onto a single exportedDEFAULT_USER_NOTIFICATION_PREFERENCESconstant.cloud-agent-session-push.tsalready owns theUserNotificationPreferencestype (andsanitizeTitle), so it is the natural authoritative owner for the default value. The two other modules already import from it, so no dependency changes are introduced.Scope
cloud-agent-session-push.ts: exportsDEFAULT_USER_NOTIFICATION_PREFERENCESand replaces its inlined default object.agent-session-notification-push.ts: removes its localDEFAULT_PREFERENCES, imports the shared constant.internal-dispatch-push.ts: removes its localDEFAULT_PREFERENCES, imports the shared constant.No behavioral change.
Verification
pnpm --filter notifications typecheck— cleanpnpm --filter notifications test— 217 passedoxlintonservices/notifications/src— 0 warnings, 0 errorsoxfmt --list-differenton changed files — clean