Commit cbc46d7
authored
feat: new bug reporting (#9658)
* feat: bug reporting services (Sentry feedback + Intercom proxy tickets)
Adds the service layer for the in-client bug report flow:
- SentryUserFeedbackService (Utility assembly, next to SentryReportHandler):
sends a Sentry User Feedback entry carrying the user's image as its single
attachment and the client log tail on a linked event, then returns a deep
link built from the feedback event id. The link is obtained through
HubAdapter.Instance because the core SentrySdk is internal in the bundled
Sentry.dll and the Unity facade discards the id.
- DCL.BugReporting (folded into DCL.ApiServices via asmref):
IntercomTicketClient posts to the intercom-proxy lambda through Signed
Fetch with the allowlisted Origin header; IntercomTicketPayload builds the
ticket_type_id + ticket_attributes body; BugReportService orchestrates
feedback first, ticket second, inlining the Sentry link in the ticket
description (the Evidence files attribute rejects API writes and stays
reserved for the image the lambda will inline later).
- SignedFetchPostAsync overload taking WebRequestHeadersInfo, and the
IntercomTickets entry in DecentralandUrl/DecentralandUrlsSource.
- EditMode tests for the payload shape and description composition.
The user image is not sent to the proxy yet: its upload envelope is pending
on the lambda side.
* fix: review feedback on bug reporting services
- Drop the SignedFetchPostAsync overload: PostAsync already accepts
headersInfo and signInfo (same pattern as PlacesAPIClient), so the
Intercom client signs and adds the Origin header through it directly.
- Pin the intercom proxy url to .org, the lambda has no zone deployment.
- Neutral diagnostics label in the ticket description.
- Check cancellation right after the feedback submission and before the
degradation warning: the feedback service is exception-free and reports
cancellation through its result rather than throwing.
- Document the proxy passthrough contract on IntercomTicketResponse.
* feat: bug reporting UI (modal MVC, plugin wiring, /bug chat command)
BugReportController/View popup driving BugReportService, feature-flag
gated BugReportPlugin registered from DynamicWorldContainer, and a /bug
chat command as the code-only entry point. The screenshot picker is an
unimplemented seam (IBugReportImageProvider): the section stays hidden
until the picker UX is decided. Prefab and Plugin Settings entry are
still authored in the editor.
* fix: qualify Arch.Core.World in BugReportPlugin
A World namespace is visible in the plugins assembly, so the bare type
name resolves to it (CS0118). Matches InWorldCameraPlugin's style.
* fix: drop unused UnityEngine using that made Avatar ambiguous in test
* refactor: bug report flow reduced to form + success popup
The design has no submitting or error states: submit shows the success
popup immediately and the upload runs detached on a controller-lifetime
token, logging failures through ReportHub.
* refactor: drop the /bug chat command
Not part of the required scope; the modal will get its entry point from
the UI instead.
* feat: bug report entry points and prefab scaffold
Sidebar gets a feature-gated bug report button below help that issues
the BugReportController popup. The attach button now opens the OS file
browser (File Browser PRO, as Communities does) through
OsFileBrowserBugReportImageProvider: png/jpg/jpeg, 10 MB cap, preview
texture destroyed on remove/close/dispose. A one-shot editor menu item
(Decentraland/UI/Scaffold BugReportView Prefab) builds the grey-box
BugReportView prefab with an overlay canvas root like BlockedScreen and
every serialized field wired; the generated prefab is included.
* feat: enable bug report feature by default in editor
* chore: add missing meta for Bug.png
* fix: block gameplay input while the bug report form is open
Typing in the description field was triggering shortcut-bound panels.
The controller now disables the Shortcuts, InWorldCamera, Camera and
Player input maps on show and restores them on close, following
FriendRequestController.
* fix: send only default pseudo-attributes on the intercom ticket
Intercom rejected the probe-derived attribute names (Issue Type, OS,
GPU, RAM, Client version) with 400 "Extra attributes provided that are
not found on ticket type" when going through the new proxy. Only the
_default_title_ and _default_description_ pseudo-attributes exist on
every ticket type, so the machine context, coordinates and Sentry link
now ride inside the description body.
* feat: ticket evidence image, session context and performance prompt
- send the attached image as top-level evidence for the proxy to host
and inline (3MB cap, an oversized image travels to Sentry only)
- add SDK version, Launcher Version and Meets Minimum Requirements
attributes, resolved at submit time through IBugReportSessionContext
- offer the bug report form when a hiccup or sustained low FPS is
detected: once per session, permanent opt-out, disabled until the
prompt prefab is assigned in the plugin settings
- MultilineInputField keeps Enter inserting new lines in the shared
TextInput prefab; description gains a focus-only char counter
- styled BugReportView prefab (addressable), sidebar button art and
success art, plugin settings entry
- editor-only Sentry DSN fallback from the DCL_SENTRY_DSN env var
* feat: debug button to trigger the performance issue prompt
- new Bug Report debug panel widget, registered by the prompt system:
Show Performance Prompt fires the popup with a synthetic 2.5s hiccup,
bypassing the detector and the one-per-session and opt-out guards
- scaffolded PerformanceIssuePrompt prefab, marked addressable and
assigned in the plugin settings, which switches the prompt on
* feat: preselect the Performance issue type on prompt-opened reports
- BugReportParams carries an optional prefilled issue type next to the
prefilled description; unknown or absent falls back to no selection
- the performance prompt passes the new BugReportIssueTypes.PERFORMANCE
constant, so the form opens ready to submit once consent is given
* feat: bug report entry points on the login and loading screens
- nullable BugReportButton on the auth and loading screen views, shown
only while the bug report feature is enabled
- the loading screen lives on the Overlay layer, above every popup, so
BugReportParams gained ShowAboveOverlays: the form stays a popup in
the window stack but re-applies its canvas draw order above overlays
- the performance issue prompt pauses detection while the loading
screen is on (IsLoadingScreenOn through the plugin): loading hiccups
used to consume the once-per-session prompt behind the overlay
* fix: always attach the client log and harden the report inputs
The logs toggle is a required agreement rather than a choice, so the
ShareLogs flag disappears from the draft, the input and the Sentry report:
every report ships the log.
Also:
- lower the description cap to 2500, since the proxy applies its 10,000
character limit to the HTML escaped and formatted text, not the raw one
- validate the picked image by decoding it and derive the content type from
the bytes instead of the file extension
- destroy the picked preview when the view is already gone
- refuse Sentry submission on an already cancelled token, and report success
once the feedback is captured, since a cancellation cannot recall it
- skip the performance prompt while the window is unfocused and on the first
frame after any pause, whose delta is not gameplay evidence
* feat: resolve the Intercom proxy url and origin per environment
The proxy is now deployed on dev (intercom-proxy.decentraland.zone) and
allowlists the web client origin of its own environment, so the client
resolves both the endpoint and the Origin header through {ENV} instead
of hardcoding .org.
* feat: route the debug performance hiccup through the real detection pipeline
The debug button now feeds a synthetic 2.5s frame to the detector on the
next unpaused Update instead of showing the prompt directly, so the
hiccup classification, the pause guards, the one-offer-per-session rule
and the don't-show-again opt-out are all exercised as in production.
* feat: repeat the performance prompt per detection and add an opt-out reset button
The prompt now re-offers on every detected issue until the user marks
"do not show again"; the one-per-session guard is gone. An in-flight
show is guarded so a second prompt cannot queue, and the persisted
opt-out is re-read when the prompt closes. A new debug button clears
the stored opt-out so the prompt can be tested again.
* fix: adapt the bug report test to the UserId profile constructor
* fix: initialize FeaturesRegistry in bug report tests and clear new lint warnings
The BugReportControllerShould fixture now sets up the FeaturesRegistry
singleton, which Profile name validation reads, so the profile-name test
no longer throws.
Lint fixes to bring the warning count back under the CI baseline:
- BugReporting views expose serialized properties as public, the view
Awake became an Initialize called by the controller, and
BugReportIssueType implements IEquatable
- AuthenticationScreenController events, fsm and audio are nullable;
CurrentRequestID renamed to CurrentRequestId
- SidebarView public camelCase properties renamed to PascalCase with
FormerlySerializedAs keeping the prefab wiring, call sites updated
- SidebarController passes UserId.Value instead of the nullable
string conversion
- SentryReportHandler matches the base nullability and drops a
redundant using; Web3AuthenticationPlugin drops the unused appArgs;
LoadingScreenPlugin factory local is non-nullable; the obsolete GPUI
flag mapping is wrapped in a scoped pragma
* refactor: address review feedback, trim comment noise
Remove or compress the comments that narrated self-explanatory code,
keeping one-liners only where they state a real external constraint
(platform quirks, Intercom and proxy wire rules, Sentry API behavior).
Also from the review:
- AuthenticationScreenController removes the bug report button
listener on dispose
- the now-dead InternalsVisibleTo for the prefab scaffolder is
dropped, the view members it wired are public1 parent 2e4c9c8 commit cbc46d7
111 files changed
Lines changed: 12167 additions & 59 deletions
File tree
- Explorer/Assets
- AddressableAssetsData/AssetGroups
- DCL
- AuthenticationScreenFlow
- Assets/Prefabs
- States
- Views
- BugReporting
- Tests
- UI
- Editor
- FeatureFlags
- Infrastructure
- Global
- AppArgs
- Dynamic
- Utility/DecentralandUrls
- NetworkDefinitions/Browser
- Passport/Prefabs
- PerformanceAndDiagnostics
- Analytics
- EventBased
- DebugUtilities/Builders
- Diagnostics/ReportsHandling/Sentry
- PluginSystem/Global
- Prefs
- SceneLoadingScreens
- Assets
- UI
- Assets
- Sidebar
- Textures
- Common
- ExplorePanel
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
| |||
270 | 275 | | |
271 | 276 | | |
272 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
273 | 283 | | |
274 | 284 | | |
275 | 285 | | |
| |||
Lines changed: 221 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
142 | 217 | | |
143 | 218 | | |
144 | 219 | | |
| |||
276 | 351 | | |
277 | 352 | | |
278 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
279 | 498 | | |
280 | 499 | | |
281 | 500 | | |
| |||
680 | 899 | | |
681 | 900 | | |
682 | 901 | | |
| 902 | + | |
683 | 903 | | |
684 | 904 | | |
685 | 905 | | |
| |||
778 | 998 | | |
779 | 999 | | |
780 | 1000 | | |
| 1001 | + | |
781 | 1002 | | |
782 | 1003 | | |
783 | 1004 | | |
| |||
0 commit comments