feat: user can edit notifications to receive#83
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds user notification preferences to the data model and APIs, introduces a UI to configure them, and gates task-completion notifications based on these preferences. Integrates Telegram linking prompt and modal, updates navigation badges for epics and tickets, tweaks epic page typography, and extends schemas and store to include notifications and telegramUsers. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant ND as NotificationsDrawer
participant US as userStore
participant OV as Overlay
participant MT as ModalAttachTelegram
U->>ND: Open Notifications Drawer
ND->>US: Read userStore.telegramUsers
ND->>ND: Compute atriumUser for botId
alt No linked Telegram
ND-->>U: Show Telegram prompt card
U->>ND: Click "Открыть форму"
ND->>OV: create(ModalAttachTelegram)
OV->>MT: Open with { userId, botId }
else Already linked
ND-->>U: Hide prompt
end
sequenceDiagram
autonumber
actor U as User
participant UM as UserMenu
participant OV as Overlay
participant MN as ModalUpdateUserNotifications
participant F as FormUpdateUserNotifications
participant US as userStore
participant API as /api/user/id/{id}
U->>UM: Open User Menu
U->>UM: Click "Настройка уведомлений"
UM->>OV: create(ModalUpdateUserNotifications)
OV->>MN: Open with { userId }
MN->>F: Mount form with userId
F->>US: Load user and current notifications
U->>F: Edit checkboxes and Submit
F->>API: PATCH { notifications }
API-->>F: 200 OK + updated user
F->>US: Update store with response
F-->>MN: emit submitted/success
MN->>OV: overlay.closeAll()
sequenceDiagram
autonumber
participant C as Client
participant API as POST /task/id/{taskId}/complete
participant Repo as Repository
participant Staff as Staff Users[]
participant Notif as NotificationsService
C->>API: Complete task
API->>Repo: Fetch staff excluding performer
loop For each staff user
API->>Staff: Inspect user.notifications
alt Includes 'task_completed_atrium'
API->>Notif: Create 'task_completed' notification (atrium)
Notif-->>API: Created
else Not included
API-->>API: Skip creation
end
end
API-->>C: Success
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (13)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|



Summary by CodeRabbit
New Features
Behavior Changes
UI/Style
Documentation