Skip to content

send push notifications when done summarizing #1219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

plyght
Copy link
Collaborator

@plyght plyght commented Jul 27, 2025

fixes #1178

Copy link

coderabbitai bot commented Jul 27, 2025

📝 Walkthrough

"""

Walkthrough

A new feature was added to display a native notification when a meeting summarization is completed by a local AI. This involved introducing new Tauri commands and associated Rust and TypeScript bindings, updating the notification plugin store and extension traits, adding UI controls for enabling/disabling summarization notifications in settings, and invoking the notification from the editor area after summarization, excluding onboarding sessions.

Changes

Files/Paths Change Summary
apps/desktop/src/components/editor-area/index.tsx Import and invoke notificationCommands.showSummarizationCompleteNotification after local summarization completion.
apps/desktop/src/components/settings/views/notifications.tsx Add summarization notification setting to UI and form state; add query and mutation hooks to get/set this setting.
apps/desktop/src/locales/en/messages.po Add new English translation entries for summarization notification UI strings and update source references.
apps/desktop/src/locales/ko/messages.po Add new Korean translation entries (untranslated) for summarization notification UI strings and update source references.
plugins/notification/js/bindings.gen.ts Add async commands: showSummarizationCompleteNotification, getSummarizationNotification, setSummarizationNotification.
plugins/notification/src/commands.rs Add Tauri commands for showing notification and getting/setting summarization notification enabled state.
plugins/notification/src/ext.rs Extend NotificationPluginExt trait with methods to get/set summarization notification flag and to show notification.
plugins/notification/src/lib.rs Register new summarization notification commands in plugin's command list.
plugins/notification/src/store.rs Add new SummarizationNotification variant to StoreKey enum for storing notification enabled state.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant EditorArea (React)
    participant NotificationPlugin (TS/Rust)
    participant OS Notification

    User->>EditorArea (React): Complete summarization (local AI)
    EditorArea (React)->>NotificationPlugin (TS): showSummarizationCompleteNotification()
    NotificationPlugin (TS)->>NotificationPlugin (Rust): show_summarization_complete_notification
    NotificationPlugin (Rust)->>OS Notification: Display "Meeting Summary Complete"
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes
"""

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch plyght/summary-done-noti

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/desktop/src/components/editor-area/index.tsx (1)

463-463: Consider removing the explanatory comment.

The comment explains "what" the code does rather than "why". Per coding guidelines, comments should be minimal and focus on "why" not "what".

-        // Show native notification for local AI model summarization completion
         if (sessionId !== onboardingSessionId) {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9fe0332 and 44990b4.

📒 Files selected for processing (5)
  • apps/desktop/src/components/editor-area/index.tsx (2 hunks)
  • plugins/notification/js/bindings.gen.ts (1 hunks)
  • plugins/notification/src/commands.rs (1 hunks)
  • plugins/notification/src/ext.rs (2 hunks)
  • plugins/notification/src/lib.rs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}

⚙️ CodeRabbit Configuration File

**/*.{js,ts,tsx,rs}: 1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

Files:

  • plugins/notification/src/lib.rs
  • apps/desktop/src/components/editor-area/index.tsx
  • plugins/notification/js/bindings.gen.ts
  • plugins/notification/src/commands.rs
  • plugins/notification/src/ext.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ci (windows, windows-latest)
  • GitHub Check: ci (macos, macos-latest)
🔇 Additional comments (6)
plugins/notification/js/bindings.gen.ts (1)

43-45: LGTM! Generated bindings are consistent and correct.

The new showSummarizationCompleteNotification function follows the established pattern of other commands and properly invokes the corresponding Tauri plugin command.

plugins/notification/src/lib.rs (1)

39-39: LGTM! Command properly registered.

The new show_summarization_complete_notification command is correctly added to the plugin's command collection, following the established pattern.

plugins/notification/src/commands.rs (1)

102-109: LGTM! Command implementation follows established patterns.

The new show_summarization_complete_notification command is correctly implemented with proper annotations, error handling, and consistent structure matching other commands in the file.

apps/desktop/src/components/editor-area/index.tsx (1)

16-16: LGTM! Clean import following established patterns.

The import of notificationCommands is consistent with other plugin imports in the file.

plugins/notification/src/ext.rs (2)

28-28: LGTM! Trait method declaration is consistent.

The new show_summarization_complete_notification method follows the established pattern of other trait methods.


168-179: LGTM! Notification implementation is well-structured.

The notification implementation follows established patterns with:

  • Proper tracing instrumentation
  • Appropriate notification content and timeout
  • Consistent use of hypr_notification2::show()
  • Proper error handling pattern

The notification message clearly communicates the completion of local AI summarization.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/desktop/src/locales/ko/messages.po (1)

1212-1214: New notification strings added but require Korean translation.

The new summarization notification messages are currently untranslated (empty msgstr values). This is expected for new features but should be addressed for Korean localization.

Would you like me to open an issue to track the Korean translation for these new notification strings?

Also applies to: 1260-1262

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee01bdd and 9bacc2d.

📒 Files selected for processing (9)
  • apps/desktop/src/components/editor-area/index.tsx (2 hunks)
  • apps/desktop/src/components/settings/views/notifications.tsx (5 hunks)
  • apps/desktop/src/locales/en/messages.po (3 hunks)
  • apps/desktop/src/locales/ko/messages.po (3 hunks)
  • plugins/notification/js/bindings.gen.ts (1 hunks)
  • plugins/notification/src/commands.rs (1 hunks)
  • plugins/notification/src/ext.rs (4 hunks)
  • plugins/notification/src/lib.rs (1 hunks)
  • plugins/notification/src/store.rs (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/desktop/src/locales/en/messages.po
🚧 Files skipped from review as they are similar to previous changes (5)
  • apps/desktop/src/components/editor-area/index.tsx
  • plugins/notification/src/lib.rs
  • plugins/notification/js/bindings.gen.ts
  • plugins/notification/src/ext.rs
  • plugins/notification/src/commands.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,ts,tsx,rs}

⚙️ CodeRabbit Configuration File

**/*.{js,ts,tsx,rs}: 1. No error handling.
2. No unused imports, variables, or functions.
3. For comments, keep it minimal. It should be about "Why", not "What".

Files:

  • plugins/notification/src/store.rs
  • apps/desktop/src/components/settings/views/notifications.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ci (macos, macos-latest)
  • GitHub Check: ci (windows, windows-latest)
🔇 Additional comments (5)
plugins/notification/src/store.rs (1)

7-7: LGTM! Clean addition following established patterns.

The new SummarizationNotification variant is consistent with existing notification types and correctly derives all necessary traits for the store functionality.

apps/desktop/src/components/settings/views/notifications.tsx (4)

15-15: Implementation follows established patterns well.

The summarization notification feature is implemented consistently with existing notification types (detect and event), using the same schema structure, React Query patterns, and mutation handling.

Also applies to: 31-34, 41-41, 87-95


41-41: Verify the default value choice for summarization notifications.

The summarization notification defaults to true while other notifications default to false. This could be intentional to encourage users to enable this feature, but please confirm this is the desired UX behavior.


171-197: UI implementation is consistent and well-structured.

The new summarization notification toggle follows the same FormField pattern as existing toggles, maintaining UI consistency and accessibility standards.


105-107: Proper integration with form watching and lifecycle management.

The summarization field is correctly integrated into the form watch subscription and the mutation is properly included in the useEffect dependencies array.

Also applies to: 111-111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send push notifications after summarizing is done
1 participant