Skip to content

Fix proper sentry initialization#10116

Merged
kevinyang372 merged 7 commits intomasterfrom
kevin/fix-proper-sentry-initialization
May 5, 2026
Merged

Fix proper sentry initialization#10116
kevinyang372 merged 7 commits intomasterfrom
kevin/fix-proper-sentry-initialization

Conversation

@kevinyang372
Copy link
Copy Markdown
Member

@kevinyang372 kevinyang372 commented May 5, 2026

@cla-bot cla-bot Bot added the cla-signed label May 5, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 5, 2026

@kevinyang372

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kevinyang372 kevinyang372 requested a review from alokedesai May 5, 2026 02:16
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR moves the remote-server daemon through the full app initialization path and adds protocol plumbing for Sentry identity and crash-reporting preference updates.

Security

  • The client-side crash-reporting preference stored for future daemon handshakes is only initialized once, so later connects can send a stale opt-in/opt-out state.

Concerns

  • Re-enabling daemon crash reporting after it was disabled initializes Sentry without reapplying the client-supplied user identity, despite the new protocol fields.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/terminal/writeable_pty/remote_server_controller.rs Outdated
Comment thread app/src/remote_server/server_model.rs
Comment thread app/src/remote_server/server_model.rs Outdated
Comment thread app/src/remote_server/server_model.rs Outdated
Comment on lines +596 to +606
fn apply_sentry_user_id(&self, ctx: &mut warpui::AppContext) {
if !self.auth.sentry_user_id.is_empty() {
crate::crash_reporting::set_user_id(
crate::auth::UserUid::new(&self.auth.sentry_user_id),
if self.auth.sentry_user_email.is_empty() {
None
} else {
Some(self.auth.sentry_user_email.clone())
},
ctx,
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we not directly populdate the AuthManager / AuthStateProvider upon receiving the initialize message? I doubt this is the only model that we need for remote code that reads those two models

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a follow-up Moira is already working on. I will keep it minimal for now but this can hook into her work

Comment on lines +109 to +111
// privacy settings so that future daemon handshakes send the
// current value rather than a stale snapshot.
let privacy_settings = PrivacySettings::handle(ctx);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's not just future daemon handshakes thuogh...we'll need to send an explicit message to the server when the user changes their crash reporting setting right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This code path is for initial connection -- the explicit notification on settings change is handled in app/src/remote_server/mod.rs

Although I agree this is unnecessarily complicated here, I cleaned up the code path to compute this on the fly instead

@kevinyang372 kevinyang372 force-pushed the kevin/fix-proper-sentry-initialization branch from 65dc295 to ffd2dad Compare May 5, 2026 17:55
@kevinyang372 kevinyang372 requested a review from alokedesai May 5, 2026 17:59
Comment thread app/src/remote_server/server_model.rs Outdated
Comment thread app/src/remote_server/ssh_transport.rs Outdated
Comment thread crates/remote_server/src/auth.rs Outdated
Comment thread crates/remote_server/src/client/mod.rs Outdated
@kevinyang372 kevinyang372 merged commit a792340 into master May 5, 2026
25 checks passed
@kevinyang372 kevinyang372 deleted the kevin/fix-proper-sentry-initialization branch May 5, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants