Skip to content

fix(remote): stop the settings effect from re-locking settings - #2

Merged
rileyhilliard merged 1 commit into
mainfrom
fix/remote-settings-deadlock
Oct 12, 2026
Merged

rileyhilliard merged 1 commit into
mainfrom
fix/remote-settings-deadlock

Conversation

@rileyhilliard

Copy link
Copy Markdown
Member

Enabling remote access from the Add Mac flow deadlocked the other Mac's main thread: SettingsEffects::committed runs under the settings mutex and called remote::refresh_metrics, which re-read settings(). Every settings reader then hung, so control status requests timed out ("unexpected end of file") and the metrics socket was never bound.

refresh_metrics now takes enabled from its caller. The SettingsEffects docs state the no-reentry rule, and debug builds panic on a settings read inside an effect, with a test covering it.

Enabling remote access from the Add Mac flow deadlocked the other Mac's
main thread: SettingsEffects::committed runs under the settings mutex and
called remote::refresh_metrics, which re-read settings(). Every settings
reader then hung, so control status requests timed out ("unexpected end
of file") and the metrics socket was never bound.

refresh_metrics now takes `enabled` from its caller. The SettingsEffects
docs state the no-reentry rule, and debug builds panic on a settings read
inside an effect, with a test covering it.
@rileyhilliard
rileyhilliard merged commit 1b2e535 into main Oct 12, 2026
5 of 6 checks passed
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 84026cb1-37d5-4d90-a7d1-6589ddb863f5

📥 Commits

Reviewing files that changed from the base of the PR and between f3b2b76 and 81d3cb8.


📒 Files selected for processing (4)
  • plan/PROGRESS.md
  • src-tauri/src/remote.rs
  • src-tauri/src/settings.rs
  • src-tauri/src/state.rs

 ______________________________
< Bugs bunny, at your service. >
 ------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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