new search/replace bar + added pre meeting notes #972
new search/replace bar + added pre meeting notes #972yujonglee merged 10 commits intofastrepl:fix-duckfrom
Conversation
📝 WalkthroughWalkthroughThis change introduces support for "Pre Meeting Notes" in the note enhancement workflow. It adds a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EditorArea
participant useEnhanceMutation
participant LanguageModel
participant SessionStore
User->>EditorArea: Trigger Enhance
EditorArea->>useEnhanceMutation: Call with preMeetingNote
useEnhanceMutation->>LanguageModel: Send user message (includes preEditor/preMeetingNote)
LanguageModel-->>useEnhanceMutation: Return enhanced note
useEnhanceMutation-->>EditorArea: Update UI with result
sequenceDiagram
participant User
participant TranscriptView
participant SearchHeader
participant EditorRef
User->>TranscriptView: Press Ctrl+F / Cmd+F
TranscriptView->>SearchHeader: Render with editorRef
User->>SearchHeader: Enter search/replace terms, navigate results
SearchHeader->>EditorRef: Update search/replace state and perform actions
User->>SearchHeader: Click close or press Escape
SearchHeader->>TranscriptView: Call onClose, hide search UI
Possibly related PRs
✨ 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
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (7)
packages/utils/src/stores/session.ts (1)
53-61: Implementation mirrors existing update-helpers – consider minor DRY refactorThe new block works, but you now have three nearly-identical setters (
updatePreMeetingNote,updateRawNote,updateEnhancedNote). A tiny utility likemakeFieldUpdater<'pre_meeting_memo_html' | 'raw_memo_html' | 'enhanced_memo_html'>(key)could cut the boilerplate and ensure future tweaks (e.g. throttling strategy) stay consistent.crates/template/assets/enhance.system.jinja (1)
21-23: Fix typos in the new Pre-Meeting-Note sectionMinor spelling issues hurt polish:
-Therefore, it is liekly to contain information that user wants to learn from the meeting (interview questions, decisiont to be made, etc.) +Therefore, it is likely to contain information the user wants to learn from the meeting (interview questions, decisions to be made, etc.)-However, the main focus should alwyas be the raw note as that was written during the actual meeting. +However, the main focus should always be the raw note because it was written during the actual meeting.apps/desktop/src/components/right-panel/components/search-header.tsx (2)
21-36: Clean-up the debounced callback on unmount
useDebouncedCallbackreturns a function that can be cancelled.
Cancelling inuseEffect’s clean-up guards against the “state update on unmounted component” warning when the panel is closed quickly.const debouncedSetSearchTerm = useDebouncedCallback( (value: string) => { … }, [editorRef], 300, ); + useEffect(() => () => debouncedSetSearchTerm.cancel?.(), []);
50-58: StalehandleClosereference inside outside-click listener
handleCloseis re-created every render, but the effect installs the listener only once, meaning the listener will always call the first version. WraphandleCloseinuseCallbackand list it in the dependency array, or inline the logic to avoid the stale closure edge-case.apps/desktop/src/components/right-panel/views/transcript-view.tsx (1)
85-94: Suppress the browser’s default find dialogWhen running in a hybrid (Tauri/Electron) shell the native Ctrl/Cmd-F may still appear. Prevent the default to guarantee only the custom search bar opens:
- if ((e.ctrlKey || e.metaKey) && e.key === "f") { + if ((e.ctrlKey || e.metaKey) && e.key === "f") { + e.preventDefault();apps/desktop/src/components/editor-area/index.tsx (1)
225-228: Verify HTML→prompt sanitisation.
preMeetingNote(HTML) is injected into the prompt aspreEditor.
If the LLM prompt expects markdown, consider converting or stripping tags to avoid extra tokens / hallucinations.packages/utils/src/stores/ongoing-session.ts (1)
58-60: Remove stray debug log.
console.log("start", sessionId);will leak internal IDs in prod logs and violates the “why-not-what” comment guideline.- console.log("start", sessionId);
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
apps/desktop/src/components/editor-area/index.tsx(3 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)crates/template/assets/enhance.system.jinja(2 hunks)crates/template/assets/enhance.user.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".
packages/utils/src/stores/session.tspackages/utils/src/stores/ongoing-session.tsapps/desktop/src/components/editor-area/index.tsxapps/desktop/src/components/right-panel/components/search-header.tsxapps/desktop/src/components/right-panel/views/transcript-view.tsx
🔇 Additional comments (3)
packages/utils/src/stores/session.ts (1)
17-18:updatePreMeetingNotecorrectly surfaced in the public actions typeAdding the action to the
Actionsinterface keeps the public store contract consistent with the existingupdate*Notehelpers.crates/template/assets/enhance.user.jinja (1)
7-9: New<pre_meeting_note>tag looks good – inclusion order matches the system prompt, so downstream templates remain deterministic.apps/desktop/src/components/editor-area/index.tsx (1)
172-180: Keep hook signature changes in sync across the codebase.
useEnhanceMutationnow requirespreMeetingNote. Make sure every call site (web / mobile / tests) has been updated, otherwise TypeScript compilation will fail or, worse, downstream code will silently pass an empty string.#!/bin/bash # Locate still-outdated invocations of useEnhanceMutation (expects 0 hits) rg --fixed-strings "useEnhanceMutation({" -A3 | grep -v "preMeetingNote"
No description provided.