-
Notifications
You must be signed in to change notification settings - Fork 418
Pre Meeting Notes Diff + New Search Bar + Export as PDF #991
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
Conversation
…-0621-merge-main
…-0621-merge-main
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis update introduces a new PDF export feature for enhanced notes, refactors the search and replace UI in the transcript view, and enhances session state management with a pre-meeting note mechanism. Several dependencies for PDF and diffing functionality are added, and session store logic is updated to support pre-meeting notes. Configuration files are also updated to extend file system and dialog permissions. Changes
Sequence Diagram(s)PDF Export FlowsequenceDiagram
participant User
participant ShareButtonInNote
participant exportToPDF
participant TauriFS
User->>ShareButtonInNote: Click "Export as PDF"
ShareButtonInNote->>exportToPDF: Call with session data
exportToPDF->>exportToPDF: Fetch participants/event metadata
exportToPDF->>exportToPDF: Generate PDF from enhanced note HTML
exportToPDF->>TauriFS: Save PDF to $APPDATA directory
TauriFS-->>exportToPDF: Return filename
exportToPDF-->>ShareButtonInNote: Resolve with filename
ShareButtonInNote-->>User: Show success/failure alert
Enhanced Note Mutation with Pre-Meeting Note DiffsequenceDiagram
participant EditorArea
participant useEnhanceMutation
participant diffWords
participant LanguageModel
EditorArea->>useEnhanceMutation: Call with sessionId, preMeetingNote, rawContent
useEnhanceMutation->>diffWords: Compute word-level diff between preMeetingNote and rawContent
diffWords-->>useEnhanceMutation: Return added words
useEnhanceMutation->>LanguageModel: Send only added words for enhancement
LanguageModel-->>useEnhanceMutation: Return enhanced content
useEnhanceMutation-->>EditorArea: onSuccess callback with enhanced content
Transcript Search Header ActivationsequenceDiagram
participant User
participant TranscriptView
participant SearchHeader
participant EditorRef
User->>TranscriptView: Press Ctrl+F or click search button
TranscriptView->>SearchHeader: Render SearchHeader component
SearchHeader->>EditorRef: Set search/replace terms, navigate results
User->>SearchHeader: Enter search/replace terms, navigate, replace all
SearchHeader->>EditorRef: Update search state and results
Possibly related PRs
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (3)
✨ Finishing Touches
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. 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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 8
🧹 Nitpick comments (3)
apps/desktop/package.json (1)
51-51: Consider consolidating PDF libraries for optimal bundle size.Multiple PDF generation libraries are added (
jspdf,html2pdf.js,@react-pdf/renderer,html-pdf). While these may serve different use cases, consider whether all are necessary to avoid bundle bloat.The
difflibrary addition supports the word-level diffing functionality mentioned in the PR objectives.Also applies to: 73-77, 105-107
packages/utils/src/stores/ongoing-session.ts (1)
58-58: Remove debug console.logThis appears to be debugging code that should be removed before merging.
- console.log("start", sessionId);apps/desktop/src/components/toolbar/buttons/share-button.tsx (1)
62-120: Consider removing unused Slack sharing codeThere's substantial Slack sharing implementation that's currently unused. Consider either:
- Removing it if not planned for immediate use
- Moving it to a separate PR when ready to implement
This includes the modal state, form state variables, and the entire Slack share handler.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
apps/desktop/package.json(3 hunks)apps/desktop/src-tauri/capabilities/default.json(1 hunks)apps/desktop/src/components/editor-area/index.tsx(4 hunks)apps/desktop/src/components/right-panel/components/search-header.tsx(1 hunks)apps/desktop/src/components/right-panel/views/transcript-view.tsx(6 hunks)apps/desktop/src/components/toolbar/bars/main-toolbar.tsx(2 hunks)apps/desktop/src/components/toolbar/buttons/share-button.tsx(1 hunks)apps/desktop/src/components/toolbar/utils/pdf-export.ts(1 hunks)crates/template/assets/enhance.system.jinja(1 hunks)packages/utils/src/stores/ongoing-session.ts(2 hunks)packages/utils/src/stores/session.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{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".
**/*.{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".
apps/desktop/src/components/toolbar/bars/main-toolbar.tsxpackages/utils/src/stores/session.tspackages/utils/src/stores/ongoing-session.tsapps/desktop/src/components/right-panel/components/search-header.tsxapps/desktop/src/components/editor-area/index.tsxapps/desktop/src/components/toolbar/utils/pdf-export.tsapps/desktop/src/components/right-panel/views/transcript-view.tsxapps/desktop/src/components/toolbar/buttons/share-button.tsx
🪛 Biome (1.9.4)
apps/desktop/src/components/toolbar/buttons/share-button.tsx
[error] 75-82: This block statement doesn't serve any purpose and can be safely removed.
Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.
Safe fix: Remove redundant block.
(lint/complexity/noUselessLoneBlockStatements)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: ci (macos, macos-latest)
- GitHub Check: ci (windows, windows-latest)
- GitHub Check: ci
🔇 Additional comments (14)
apps/desktop/src/components/right-panel/views/transcript-view.tsx (6)
21-21: LGTM!Good import addition for the new SearchHeader component.
55-56: LGTM!Clean state management for the search functionality.
84-95: LGTM!Well-implemented keyboard shortcut handling with proper conditions to ensure search is only activated when appropriate (has transcript, session ID, and inactive session).
139-183: LGTM!Excellent conditional rendering logic that cleanly separates the search header from the regular header. The search header integration is well done.
205-208: LGTM!Good refactor to make RenderEmpty component more flexible by accepting panelWidth as a prop rather than calculating it internally.
160-170: LGTM!Clean implementation of the search button that properly integrates with the new search state management.
apps/desktop/src/components/toolbar/bars/main-toolbar.tsx (1)
7-7: LGTM! Clean addition of ShareButton to the toolbar.The ShareButton import and usage are properly implemented. The component is conditionally rendered in the left section when a note is active, following the established pattern of other toolbar buttons.
Also applies to: 54-54
crates/template/assets/enhance.system.jinja (1)
15-15: Good clarification of input type and raw note purpose.The change from "markdown" to "txt" accurately reflects the input format, and the added explanation clarifies that raw notes represent the user's pure meeting notes.
Also applies to: 20-20
apps/desktop/src-tauri/capabilities/default.json (1)
60-66: Well-scoped permissions for PDF export functionality.The file write permissions are appropriately restricted to the downloads directory, and the save dialog permission supports the new PDF export feature. The security scope is properly limited.
Also applies to: 75-75
packages/utils/src/stores/session.ts (1)
17-17: Consistent implementation following established patterns.The
updatePreMeetingNotemethod correctly follows the same pattern as other note update methods, using mutative for immutable state updates and triggering persistence. The implementation aligns well with the existing codebase architecture.Also applies to: 53-61
packages/utils/src/stores/ongoing-session.ts (1)
67-74: LGTM! Pre-meeting note integration looks goodThe implementation correctly captures the current session state and updates the pre-meeting note when it exists and is not empty.
apps/desktop/src/components/editor-area/index.tsx (1)
255-256: Good practice: Debug logs are commented outThe debug console.log statements are properly commented out, preventing unnecessary log pollution in production.
apps/desktop/src/components/toolbar/utils/pdf-export.ts (1)
1-354: Well-implemented PDF export functionalityThe PDF export implementation is comprehensive and well-structured with proper:
- HTML to structured text conversion preserving formatting
- Text wrapping and pagination handling
- Metadata inclusion (participants, events, dates)
- Async operations and file system interactions
apps/desktop/src/components/toolbar/buttons/share-button.tsx (1)
122-139: PDF export implementation looks goodThe PDF export handler properly manages loading state, error handling, and user feedback.
No description provided.