Skip to content

(janitor/dedupe): share default user notification preferences - #5843

Open
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dedupe-notification-default-preferences
Open

(janitor/dedupe): share default user notification preferences#5843
kilo-code-bot[bot] wants to merge 1 commit into
mainfrom
janitor/dedupe-notification-default-preferences

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

The all-enabled UserNotificationPreferences default value was declared three times across the notifications service — twice as a local DEFAULT_PREFERENCES constant and once as an inlined object literal. This consolidates them onto a single exported DEFAULT_USER_NOTIFICATION_PREFERENCES constant.

cloud-agent-session-push.ts already owns the UserNotificationPreferences type (and sanitizeTitle), 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: exports DEFAULT_USER_NOTIFICATION_PREFERENCES and replaces its inlined default object.
  • agent-session-notification-push.ts: removes its local DEFAULT_PREFERENCES, imports the shared constant.
  • internal-dispatch-push.ts: removes its local DEFAULT_PREFERENCES, imports the shared constant.

No behavioral change.

Verification

  • pnpm --filter notifications typecheck — clean
  • pnpm --filter notifications test — 217 passed
  • oxlint on services/notifications/src — 0 warnings, 0 errors
  • oxfmt --list-different on changed files — clean

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.
@kilo-code-bot kilo-code-bot Bot added the janitor Automated dead-code/duplication cleanup label Sep 3, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • services/notifications/src/lib/agent-session-notification-push.ts
  • services/notifications/src/lib/cloud-agent-session-push.ts
  • services/notifications/src/lib/internal-dispatch-push.ts

Reviewed by grok-4.6 · Input: 82.6K · Output: 5.2K · Cached: 187.1K

Review guidance: REVIEW.md from base branch main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

janitor Automated dead-code/duplication cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants