Skip to content

Conversation

@richiemcilroy
Copy link
Member

@richiemcilroy richiemcilroy commented Nov 17, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Corrected video playback canvas sizing in the editor.
    • Made system audio stop/errors non-fatal so recordings proceed gracefully.
  • Improvements

    • Refined window appearance on Windows by adjusting shadow behavior.
    • Improved microphone initialization so input is automatically and more reliably set on startup.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 17, 2025

Warning

Rate limit exceeded

@richiemcilroy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 23 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c1416d4 and 8602dc6.

📒 Files selected for processing (4)
  • apps/desktop/src-tauri/src/target_select_overlay.rs (1 hunks)
  • apps/desktop/src-tauri/src/tray.rs (6 hunks)
  • apps/desktop/src-tauri/src/windows.rs (2 hunks)
  • apps/desktop/src/routes/(window-chrome)/new-main/index.tsx (3 hunks)

Walkthrough

Platform-specific window shadowing, microphone initialization lifecycle refactor, video frame sizing recalculation, and non-fatal handling/logging for system-audio stop errors across recording pipeline.

Changes

Cohort / File(s) Summary
Window Configuration
apps/desktop/src-tauri/src/windows.rs
ShowCapWindow::InProgressRecording uses shadow(!cfg!(windows)) instead of unconditional shadow(true), disabling shadow on Windows while keeping it on other platforms.
Microphone Initialization
apps/desktop/src/routes/(window-chrome)/new-main/MicrophoneSelect.tsx, apps/desktop/src/routes/(window-chrome)/new-main/index.tsx
MicrophoneSelectBase replaced onMount with createEffect guarded by isInitialized() to preserve single-run init; index.tsx adds setMicInput.mutateAsync(rawOptions.micName) invocation on mount with error catch.
Player Video Rendering
apps/desktop/src/routes/editor/Player.tsx
Adds frameWidth()/frameHeight() accessors and availableWidth()/availableHeight() derived values; recalculates containerAspect, frameAspect, and size() using these; updates canvas style and attributes to use computed frame dimensions.
Audio Capture Error Handling
crates/recording/src/sources/screen_capture/windows.rs, crates/recording/src/studio_recording.rs
SystemAudioSource::stop logs a warning on pause errors and returns Ok(()) instead of propagating the error; Pipeline::stop matches joined system_audio result, logs warnings on stop failures, and continues with None for system_audio instead of returning an error.

Sequence Diagram(s)

sequenceDiagram
    participant Caller as Pipeline::stop
    participant SysAudio as SystemAudioSource::stop

    rect rgb(240,248,255)
    note right of Caller: Original flow (error-propagating)
    Caller->>SysAudio: stop()
    SysAudio-->>Caller: Err(Error) or Ok(())
    alt Err(Error)
        Caller->>Caller: propagate error (fail)
    else Ok(())
        Caller->>Caller: continue
    end
    end

    rect rgb(230,245,230)
    note right of Caller: New flow (log-and-continue)
    Caller->>SysAudio: stop()
    SysAudio-->>Caller: Err(Error) or Ok(())
    alt Err(Error)
        SysAudio->>Caller: logs warning
        Caller->>Caller: treat as Ok (use None for system_audio)
    else Ok(())
        Caller->>Caller: continue with result
    end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review Player.tsx sizing math and edge-case handling (zero dimensions, padding).
  • Check asynchronous init in MicrophoneSelect and index.tsx to ensure no double-init or race with camera setup.
  • Verify that non-fatal logging of system-audio stop does not mask important failures downstream.

Possibly related PRs

  • Audio fixes #1319 — Overlapping changes to Pipeline::stop and system_audio stop handling; likely touches the same recording shutdown behavior.

Suggested labels

codex

Suggested reviewers

  • Brendonovich

Poem

🐰 I nibble code in twilight's glow,
Shadows skip where Windows go,
Mics awake with careful start,
Frames align, each pixel's heart,
Warnings whispered, pipeline hops — hooray, we flow!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Fixes for 0.3.84 from testing' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes in the changeset. Provide a more specific title that identifies the main focus of the changes, such as 'Fix microphone initialization and window shadow handling' or similar to reflect the primary changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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