Skip to content

chore(client): use Sentry User Feedback API for client feedback#2739

Open
fortuna wants to merge 15 commits into
masterfrom
jules-sentry-feedback-14779291792962734435
Open

chore(client): use Sentry User Feedback API for client feedback#2739
fortuna wants to merge 15 commits into
masterfrom
jules-sentry-feedback-14779291792962734435

Conversation

@fortuna

@fortuna fortuna commented Apr 3, 2026

Copy link
Copy Markdown
Collaborator

I moved away from hacking the event reporting feature to using the proper user feedback feature.

At first, I was forced to use a deprecated method, so I upgraded Sentry to latest. That in turn forced me to upgrade Electron to 23+, so I upgraded to 30. See https://www.electronjs.org/docs/latest/breaking-changes for info.

I had to explicitly disable the sandbox to match the previous default behavior, but we should get rid of that eventually.

I tested by submitting feedback in the Manager and Client on macOS.

Updates the `SentryErrorReporter.report` method in the web client to utilize Sentry's `captureUserFeedback` API, passing the required `eventId` from the captured event and including the user's name, email, and comments. This correctly integrates with Sentry's User Feedback system, removing the old workaround that redundantly captured an event, configured the global scope, captured a message, and cleared the scope.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@fortuna fortuna requested a review from a team as a code owner April 3, 2026 14:30
fortuna and others added 3 commits April 3, 2026 14:35
Updates the `SentryErrorReporter.report` method in the web client to utilize Sentry's `captureUserFeedback` API, passing the required `eventId` from the captured event and including the user's name, email, and comments. This correctly integrates with Sentry's User Feedback system, removing the old workaround that redundantly captured an event, configured the global scope, captured a message, and cleared the scope.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Updates the `SentryErrorReporter.report` method in the web client to utilize Sentry's `captureUserFeedback` API, passing the required `eventId` from the captured event and including the user's name, email, and comments. This correctly integrates with Sentry's User Feedback system, removing the old workaround that redundantly captured an event, configured the global scope, captured a message, and cleared the scope.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Updates the `SentryErrorReporter.report` method in the web client to utilize Sentry's `captureUserFeedback` API, passing the required `eventId` from the captured event and including the user's name, email, and comments. This correctly integrates with Sentry's User Feedback system, removing the old workaround that redundantly captured an event, configured the global scope, captured a message, and cleared the scope.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@fortuna fortuna marked this pull request as draft April 4, 2026 14:17
@fortuna fortuna changed the title Use Sentry User Feedback API for client feedback Use chore(client): Sentry User Feedback API for client feedback Apr 4, 2026
@fortuna fortuna changed the title Use chore(client): Sentry User Feedback API for client feedback chore(client): use Sentry User Feedback API for client feedback Apr 4, 2026
Comment thread client/web/shared/error_reporter.ts
fortuna and others added 2 commits April 4, 2026 14:27
Ensure that the Sentry scope is properly configured with the relevant tags and user email before calling the new Sentry User Feedback API (`captureUserFeedback`), and clear the scope after submission, restoring parity with the original method's context-setting logic.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Migrate feedback reporting logic to use Sentry v10 captureFeedback and modernize Electron base requirements.
@github-actions github-actions Bot added size/M and removed size/XS labels Apr 5, 2026
Ensure that the Sentry scope is properly configured with the relevant tags and user email before calling the new Sentry User Feedback API (`captureUserFeedback`), and clear the scope after submission, restoring parity with the original method's context-setting logic. Fix lint issues in `error_reporter.ts` by using inline type imports.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@github-actions github-actions Bot added size/XS and removed size/M labels Apr 5, 2026
fortuna and others added 2 commits April 5, 2026 04:24
Ensure that the Sentry scope is properly configured with the relevant tags and user email before calling the new Sentry User Feedback API (`captureUserFeedback`), and clear the scope after submission, restoring parity with the original method's context-setting logic. Fix lint issues in `error_reporter.ts` by using inline type imports.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@github-actions github-actions Bot added size/M and removed size/XS labels Apr 5, 2026
@fortuna fortuna marked this pull request as ready for review April 5, 2026 07:30
@fortuna fortuna requested a review from ohnorobo April 5, 2026 07:30
@fortuna fortuna requested review from Copilot and removed request for a team April 5, 2026 07:30

Copilot AI 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.

Pull request overview

This PR switches client/manager “Contact us” submissions from a custom Sentry event hack to Sentry’s dedicated User Feedback capture API, and upgrades the Sentry + Electron stack to support that.

Changes:

  • Replace Sentry.captureEvent(...) usage with Sentry.captureFeedback(...) across Manager and Client feedback flows.
  • Upgrade Sentry SDKs and Electron (and related build tooling) to newer versions; explicitly set sandbox: false to preserve prior behavior.
  • Move renderer breadcrumb URL redaction into the renderer’s Sentry.init({ beforeBreadcrumb }) rather than exposing a redaction helper from preload.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
server_manager/www/ui_components/outline-contact-us-dialog.ts Switch Manager contact-us dialog submission to captureFeedback.
server_manager/www/app.ts Add renderer-side breadcrumb URL redaction and switch feedback submit handler to captureFeedback.
server_manager/package.json Upgrade Sentry/Electron dependencies and bump Puppeteer Chromium revision.
server_manager/electron/util.ts Make URL redaction helper rely on global URL (no Node url import).
server_manager/electron/preload.ts Remove Sentry preload import and remove renderer-exposed redaction function.
server_manager/electron/index.ts Explicitly disable sandbox and tighten event typing for will-navigate.
client/web/views/contact_view/index.ts Update contact view to call sendFeedback (renamed reporter API).
client/web/views/contact_view/index.spec.ts Update tests to assert sendFeedback usage.
client/web/shared/error_reporter.ts Rename reporter API to sendFeedback and use Sentry feedback capture + updated integrations API.
client/web/app/main.electron.ts Update IPC event typings, use captureFeedback, and handle main() rejection.
client/web/app/main.cordova.ts Update Cordova reporter to call sendFeedback and keep native log reporting hook.
client/src/cordova/build.action.mjs Allow Xcode provisioning updates in release builds.
client/package.json Upgrade Sentry/Electron versions to match new feedback API usage.
client/electron/preload.ts Remove Sentry preload import.
client/electron/index.ts Explicitly disable sandbox and refactor will-navigate handler.
Comments suppressed due to low confidence (2)

client/web/app/main.cordova.ts:70

  • reportEvents is called with Sentry.lastEventId() || ''. After switching sendFeedback to captureFeedback, lastEventId() may be empty/unchanged, and passing an empty string causes the native Android/iOS plugins to tag user_event_id with '' (hurting de-duplication/cross-referencing). Consider ensuring a non-empty identifier (e.g., use the event id returned/created by Sentry for this feedback, or generate a UUID fallback) rather than ''.
    await super.sendFeedback(message, feedbackCategory, userEmail);
    // Sends previously captured logs and events to the error reporting framework.
    // Associates the report to the provided unique identifier.
    await pluginExec<void>('reportEvents', Sentry.lastEventId() || '');
  }

server_manager/electron/preload.ts:25

  • The preload script no longer exposes redactSentryBreadcrumbUrl via contextBridge, but server_manager/types/preload.d.ts still declares it as available in the renderer. This mismatch can let renderer code compile against an API that doesn’t exist at runtime. Update/remove the corresponding declaration (or re-expose the function) to keep the preload contract accurate.
import type {HttpRequest, HttpResponse} from '@outline/infrastructure/path_api';
import {contextBridge, ipcRenderer} from 'electron';

import * as digitalocean_oauth from './digitalocean_oauth';
import * as gcp_oauth from './gcp_oauth';

contextBridge.exposeInMainWorld(
  'fetchWithPin',
  (request: HttpRequest, fingerprint: string): Promise<HttpResponse> =>
    ipcRenderer.invoke('fetch-with-pin', request, fingerprint)
);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ohnorobo ohnorobo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like this has some issues with the Linux/Windows CI

I think this is a good change, but I worry about the chance of the electron upgrade introducing some new difficult-to-debug/platform-specific-interaction bug, particularly when we don't have QA testing to thoroughly check. So I would like to hold back on merging something like this until after we've finished a clean cross-platform 1.20.0 release.

'archive',
'-configuration',
'Release',
'-allowProvisioningUpdates',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why remove this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It’s being added.

@fortuna

fortuna commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator Author

I moved the manager change to #2743, so we can submit that without touching the client.

ohnorobo added a commit that referenced this pull request Apr 22, 2026
Replaces the multi-step "Contact Us" dialog with the existing simple
Feedback dialog, which submits via Sentry.captureFeedback. Email/ticket
support is no longer offered, so the elaborate triage wizard is dead
weight. Also drops the now-unused contactView feature flag and the
success/error toast helpers that only the Contact Us flow wired up.

Adds a TODO on the cross-platform client's contact-us view noting it
should be removed entirely once #2739 merges.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ohnorobo added a commit that referenced this pull request Apr 23, 2026
Replaces the multi-step "Contact Us" dialog with the existing simple
Feedback dialog, which submits via Sentry.captureFeedback. Email/ticket
support is no longer offered, so the elaborate triage wizard is dead
weight. Also drops the now-unused contactView feature flag and the
success/error toast helpers that only the Contact Us flow wired up.

Adds a TODO on the cross-platform client's contact-us view noting it
should be removed entirely once #2739 merges.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants