Skip to content

Conversation

@duckduckhero
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Jun 20, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This update introduces a new PDF export utility and refactors the sharing workflow in the desktop app, adding a modular share button with PDF export and Slack sharing UI. It also replaces the inline search-and-replace UI in the transcript view with a toggleable search header, updates session state management for pre-meeting notes, and enhances the note enhancement logic.

Changes

Files/Paths Change Summary
apps/desktop/.cargo/config.toml Added Cargo config for Apple Silicon, optimizing builds for "aarch64-apple-darwin" and Apple M1 CPU.
apps/desktop/package.json Added dependencies: @react-pdf/renderer, diff, html-pdf, html2canvas, html2pdf.js, jspdf, and related type definitions.
apps/desktop/src-tauri/capabilities/default.json Added file system write permission for downloads and dialog permission for save dialogs.
apps/desktop/src/components/editor-area/index.tsx Updated useEnhanceMutation to accept preMeetingNote and compute a diff for enhancement input; logs added.
apps/desktop/src/components/right-panel/components/search-header.tsx Added new SearchHeader component for search-and-replace UI with navigation, replace all, and keyboard shortcuts.
apps/desktop/src/components/right-panel/views/transcript-view.tsx Removed inline SearchAndReplace component; integrated SearchHeader with toggle via button and Ctrl/Cmd+F shortcut; updated header rendering and RenderEmpty prop signature.
apps/desktop/src/components/toolbar/bars/main-toolbar.tsx Moved ShareButton to the left section for notes; removed commented-out right section instance.
apps/desktop/src/components/toolbar/buttons/share-button.tsx Refactored ShareButton to render a new ShareButtonInNote with popover UI for PDF export and Slack sharing (modal UI and logic added, Slack sharing commented out in UI); removed old share panel.
apps/desktop/src/components/toolbar/utils/pdf-export.ts Added new utility for exporting session data to PDF, parsing enhanced HTML, formatting with markdown-like styles, and saving to Downloads using Tauri APIs.
crates/template/assets/enhance.system.jinja Clarified that "Raw Note" input is plain text and added explanation sentence in "About Raw Notes."
packages/utils/src/stores/ongoing-session.ts Enhanced start method to log session ID and update preMeetingNote if raw_memo_html exists and is not empty.
packages/utils/src/stores/session.ts Added updatePreMeetingNote action to update and persist pre_meeting_memo_html in session state.

Sequence Diagram(s)

1. PDF Export Flow

sequenceDiagram
    participant User
    participant ShareButtonInNote
    participant pdf-export util
    participant TauriFS

    User->>ShareButtonInNote: Click "Export as PDF"
    ShareButtonInNote->>pdf-export util: exportToPDF(session)
    pdf-export util->>TauriFS: Write PDF file to Downloads
    TauriFS-->>pdf-export util: Success/Error
    pdf-export util-->>ShareButtonInNote: PDF path or error
    ShareButtonInNote-->>User: Show success/error message
Loading

2. Search Header Activation in Transcript View

sequenceDiagram
    participant User
    participant TranscriptView
    participant SearchHeader
    participant EditorRef

    User->>TranscriptView: Press Ctrl/Cmd+F or click search button
    TranscriptView->>SearchHeader: Render SearchHeader
    SearchHeader->>EditorRef: Set search term, navigate, replace, etc.
    User->>SearchHeader: Interact with search/replace UI
    SearchHeader->>TranscriptView: Call onClose (if closed)
Loading

3. Enhance Mutation Input Preparation

sequenceDiagram
    participant EditorArea
    participant useEnhanceMutation
    participant extractTextFromHtml
    participant diffWords

    EditorArea->>useEnhanceMutation: Call with preMeetingNote, rawContent
    useEnhanceMutation->>extractTextFromHtml: Convert preMeetingNote to text
    useEnhanceMutation->>extractTextFromHtml: Convert rawContent to text
    useEnhanceMutation->>diffWords: Compute diff (preMeetingNote, rawContent)
    diffWords-->>useEnhanceMutation: Diff result
    useEnhanceMutation->>useEnhanceMutation: Build finalInput (added words)
    useEnhanceMutation->>Enhance LLM: Send prompt with finalInput
Loading

Possibly related PRs

  • fastrepl/hyprnote#946: Backend changes adding and persisting the pre_meeting_memo_html field, directly supporting the new frontend session state and enhancement logic.
  • fastrepl/hyprnote#935: Updates to useEnhanceMutation in the same file, focusing on enhancement callbacks; both PRs modify the mutation logic for enhancements.
  • fastrepl/hyprnote#873: Introduced the original inline search-and-replace UI in the transcript view, which this PR now 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 a75767f and d988859.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • apps/desktop/.cargo/config.toml (1 hunks)
  • apps/desktop/package.json (3 hunks)
  • apps/desktop/src-tauri/capabilities/default.json (1 hunks)
  • apps/desktop/src/components/editor-area/index.tsx (5 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)
✨ 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.

@duckduckhero duckduckhero deleted the fix-duck-0620 branch June 20, 2025 05:43
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