Skip to content

Reduce recording start editor renders#5902

Merged
ComputelessComputer merged 1 commit into
mainfrom
fix/reduce-recording-start-editor-renders
Jul 4, 2026
Merged

Reduce recording start editor renders#5902
ComputelessComputer merged 1 commit into
mainfrom
fix/reduce-recording-start-editor-renders

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Keep expensive recording-start hooks out of inactive render branches and read audio existence through a narrow query hook instead of the full playback context.


This is part 1 of 2 in a stack made with GitButler:


Note

Low Risk
Mostly UI performance refactors with equivalent behavior; session tab and timeline selection logic are moderately touched but not security- or data-critical paths.

Overview
Cuts unnecessary React work when starting or viewing sessions by narrowing subscriptions and splitting render branches.

Session note tab: useAudioExists reads the same React Query cache as the player but without subscribing to WaveSurfer/playback context. Auto-start listening runs in a small AutoStartListening child instead of the main tab body. TabContentNoteInner builds editor tabs and the active view from explicit state (createEditorTabs, computeCurrentNoteTab, transcript/insights flags) instead of useEditorTabs / useCurrentNoteTab, which pulled in heavier hooks via the audio player context.

Listen FAB: While a session is connecting, only StopListeningButton mounts (stop action); start/configure hooks stay in StartListeningButton when idle.

Sidebar timeline: Timeline items receive a stable getFlatItemKeys() (ref-backed) for shift-range selection instead of a new flatItemKeys array each parent render. ItemBase is memoized with a custom props equality check to limit row re-renders.

Reviewed by Cursor Bugbot for commit ced4850. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify

netlify Bot commented Jul 4, 2026

Copy link
Copy Markdown

Deploy Preview for old-char ready!

Name Link
🔨 Latest commit 3766866
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a488f23449a20000822e9ce
😎 Deploy Preview https://deploy-preview-5902--old-char.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3ac6142. Configure here.

Comment thread apps/desktop/src/session/index.tsx
@ComputelessComputer ComputelessComputer force-pushed the fix/reduce-recording-start-editor-renders branch 5 times, most recently from 61cad47 to 3766866 Compare July 4, 2026 04:42
@ComputelessComputer ComputelessComputer changed the base branch from main to fix/stabilize-timeline-item-renders July 4, 2026 04:42
@ComputelessComputer ComputelessComputer force-pushed the fix/stabilize-timeline-item-renders branch from a93c5e4 to aac4b5f Compare July 4, 2026 05:05
@ComputelessComputer ComputelessComputer force-pushed the fix/reduce-recording-start-editor-renders branch from 3766866 to 36db835 Compare July 4, 2026 05:05
@ComputelessComputer ComputelessComputer force-pushed the fix/stabilize-timeline-item-renders branch from aac4b5f to 6c29dde Compare July 4, 2026 05:33
@ComputelessComputer ComputelessComputer force-pushed the fix/reduce-recording-start-editor-renders branch from 36db835 to a6bb5e1 Compare July 4, 2026 05:33
@ComputelessComputer ComputelessComputer force-pushed the fix/stabilize-timeline-item-renders branch from 6c29dde to 8ce43c9 Compare July 4, 2026 05:57
@ComputelessComputer ComputelessComputer force-pushed the fix/reduce-recording-start-editor-renders branch from a6bb5e1 to 9bc8430 Compare July 4, 2026 05:57
@ComputelessComputer ComputelessComputer force-pushed the fix/stabilize-timeline-item-renders branch from 8ce43c9 to 37eb8cf Compare July 4, 2026 06:16
@ComputelessComputer ComputelessComputer force-pushed the fix/reduce-recording-start-editor-renders branch from 9bc8430 to e3045fc Compare July 4, 2026 06:16
Keep expensive recording-start hooks out of inactive render branches and read audio existence through a narrow query hook instead of the full playback context.
@ComputelessComputer ComputelessComputer force-pushed the fix/reduce-recording-start-editor-renders branch from e3045fc to ced4850 Compare July 4, 2026 06:35
@ComputelessComputer ComputelessComputer changed the base branch from fix/stabilize-timeline-item-renders to main July 4, 2026 06:35
@ComputelessComputer ComputelessComputer merged commit c3ddd68 into main Jul 4, 2026
6 of 7 checks passed
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.

1 participant