-
Notifications
You must be signed in to change notification settings - Fork 415
Fix transcript performance issues #1643
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
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR restructures the desktop application's transcript rendering pipeline with virtualized scrolling, refactors editor state management to use store-based initialization, simplifies the streaming status component, adds debug seed data generation, and applies consistent patterns for debounced editor updates across TipTap and note editors. Changes
Sequence Diagram(s)sequenceDiagram
participant Store
participant Component as Enhanced/Raw Editor
participant NoteEditor
participant User
rect rgb(240, 248, 255)
Note over Store,User: Store-based Initialization Pattern
Component->>Store: useStore() on mount
Store-->>Component: Store instance
Component->>Component: useEffect trigger
Component->>Store: getCell("sessions", sessionId, "content_field")
Store-->>Component: Initial content value
Component->>Component: setInitialContent(value)
end
rect rgb(245, 245, 220)
Note over Component,NoteEditor: Render & Sync
Component->>NoteEditor: Pass initialContent + handleChange
NoteEditor->>User: Display editor
User->>NoteEditor: Edit content
NoteEditor->>Component: onUpdate → handleChange(markdown)
Component->>Store: setPartialRow() [via callback]
Store-->>Component: Store updated
end
sequenceDiagram
participant RenderTranscript
participant VirtualizedSegments as Virtualizer
participant SegmentRenderer
participant WordSpan
participant AudioContext as useAudioPlayer
rect rgb(240, 248, 255)
Note over RenderTranscript,AudioContext: Transcript Rendering with Virtualization
RenderTranscript->>RenderTranscript: useFinalWords()
RenderTranscript->>RenderTranscript: useFinalSpeakerHints()
RenderTranscript->>RenderTranscript: buildSegments()
RenderTranscript->>VirtualizedSegments: Pass segments + metadata
end
rect rgb(255, 250, 205)
Note over VirtualizedSegments,WordSpan: Dynamic Rendering
VirtualizedSegments->>VirtualizedSegments: Compute visible items
loop For each visible segment
VirtualizedSegments->>SegmentRenderer: Render segment
SegmentRenderer->>AudioContext: Query currentMs, seek
loop For each word in segment
SegmentRenderer->>WordSpan: Pass word + highlight state
WordSpan->>WordSpan: getWordHighlightState(editable, audioExists, currentMs, timing)
WordSpan-->>SegmentRenderer: Render with highlight/operations
end
end
end
rect rgb(220, 240, 220)
Note over WordSpan,AudioContext: User Interaction
WordSpan->>WordSpan: User clicks word
WordSpan->>AudioContext: seekAndPlay(wordStartMs)
AudioContext-->>WordSpan: Audio seeks & plays
end
sequenceDiagram
participant StreamingView
participant Status
participant useAITaskTask as Hook
participant Task
rect rgb(255, 245, 240)
Note over StreamingView,Status: Before: Prop-driven Status
StreamingView->>Hook: useAITaskTask(taskId)
Hook-->>StreamingView: {cancel, isGenerating, ...}
StreamingView->>Status: Pass taskId, cancel, isGenerating
end
rect rgb(240, 255, 240)
Note over StreamingView,Status: After: Self-contained Status
StreamingView->>Status: Pass taskId only
Status->>Hook: useAITaskTask(taskId)
Hook-->>Status: {cancel, isGenerating, currentStep, ...}
Status->>Status: Render button if isGenerating
Status->>Task: onClick → cancel()
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~40 minutes Areas requiring extra attention:
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (23)
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. Comment |
No description provided.