Skip to content

Fix proper sentry initialization#10116

Open
kevinyang372 wants to merge 3 commits intomasterfrom
kevin/fix-proper-sentry-initialization
Open

Fix proper sentry initialization#10116
kevinyang372 wants to merge 3 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
Comment thread app/src/remote_server/server_model.rs
auth_token: Option<String>,
/// User ID from the most recent `Initialize` handshake (Firebase UID).
#[cfg(feature = "crash_reporting")]
sentry_user_id: String,
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.

Why is this prefixed with sentry_? It's really just the user_id, no?

Comment on lines +157 to +159
sentry_user_id: String::new(),
#[cfg(feature = "crash_reporting")]
sentry_user_email: String::new(),
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.

if there's no user, this should be unset instead of an empty string

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

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?

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