Skip to content

Conversation

@duckduckhero
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Jun 22, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This 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

File(s) Change Summary
apps/desktop/package.json Added dependencies: PDF rendering, HTML-to-PDF/image, diffing libraries, and related type packages.
apps/desktop/src-tauri/capabilities/default.json Added permissions for file write access in $APPDATA and save dialogs.
apps/desktop/src/components/editor-area/index.tsx Updated useEnhanceMutation to accept preMeetingNote, compute word-level diff, and send only added words for enhancement.
apps/desktop/src/components/right-panel/components/search-header.tsx Introduced new SearchHeader component for search and replace UI with keyboard navigation and editor integration.
apps/desktop/src/components/right-panel/views/transcript-view.tsx Replaced embedded SearchAndReplace with SearchHeader, added search activation logic, and simplified header actions.
apps/desktop/src/components/toolbar/bars/main-toolbar.tsx Moved ShareButton to left section for notes and removed commented-out code.
apps/desktop/src/components/toolbar/buttons/share-button.tsx Refactored to render ShareButtonInNote for notes, added PDF export with async mutation, user feedback, and analytics tracking.
apps/desktop/src/components/toolbar/utils/pdf-export.ts New module: Implements PDF export for enhanced notes, including metadata and HTML-to-text conversion, and saves to $APPDATA.
crates/template/assets/enhance.system.jinja Updated raw note input type description and added clarification.
packages/utils/src/stores/ongoing-session.ts Enhanced start method to log session ID and update pre-meeting note if available.
packages/utils/src/stores/session.ts Added updatePreMeetingNote method to session store for updating and persisting pre-meeting notes.

Sequence Diagram(s)

PDF Export Flow

sequenceDiagram
    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
Loading

Enhanced Note Mutation with Pre-Meeting Note Diff

sequenceDiagram
    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
Loading

Transcript Search Header Activation

sequenceDiagram
    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
Loading

Possibly related PRs

  • fastrepl/hyprnote#946: Backend and schema changes introducing the pre_meeting_memo_html field, which this PR uses in the frontend and session store.
  • fastrepl/hyprnote#972: Modifies useEnhanceMutation to add preMeetingNote, directly related to the mutation and diffing logic in this PR.
  • fastrepl/hyprnote#873: Introduced the original SearchAndReplace component in the transcript view, which this PR replaces with the new SearchHeader component.

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0a874d6 and 8cee4dd.

📒 Files selected for processing (3)
  • apps/desktop/src-tauri/capabilities/default.json (1 hunks)
  • apps/desktop/src/components/toolbar/buttons/share-button.tsx (2 hunks)
  • apps/desktop/src/components/toolbar/utils/pdf-export.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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 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: 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 diff library 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.log

This 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 code

There's substantial Slack sharing implementation that's currently unused. Consider either:

  1. Removing it if not planned for immediate use
  2. 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

📥 Commits

Reviewing files that changed from the base of the PR and between 17ac85f and 0a874d6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is 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.tsx
  • packages/utils/src/stores/session.ts
  • packages/utils/src/stores/ongoing-session.ts
  • apps/desktop/src/components/right-panel/components/search-header.tsx
  • apps/desktop/src/components/editor-area/index.tsx
  • apps/desktop/src/components/toolbar/utils/pdf-export.ts
  • apps/desktop/src/components/right-panel/views/transcript-view.tsx
  • apps/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 updatePreMeetingNote method 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 good

The 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 out

The 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 functionality

The 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 good

The PDF export handler properly manages loading state, error handling, and user feedback.

@yujonglee yujonglee changed the title [Test] Pre Meeting Notes Diff + New Search Bar + Export as PDF Pre Meeting Notes Diff + New Search Bar + Export as PDF Jun 23, 2025
@yujonglee yujonglee merged commit 5f91846 into fastrepl:main Jun 23, 2025
4 of 5 checks passed
This was referenced Jul 14, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jul 31, 2025
This was referenced Aug 20, 2025
@coderabbitai coderabbitai bot mentioned this pull request Oct 10, 2025
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.

2 participants