Skip to content

Add copyable bug report on errors#855

Open
PaulHax wants to merge 3 commits intomainfrom
bug-report
Open

Add copyable bug report on errors#855
PaulHax wants to merge 3 commits intomainfrom
bug-report

Conversation

@PaulHax
Copy link
Copy Markdown
Collaborator

@PaulHax PaulHax commented Mar 26, 2026

Generate a structured, anonymous bug report (build info, browser, stack trace, dataset metadata) on every error and attach it to the message. Users can copy it to clipboard via a button in the notification center.

Also tightens the types of the error message options with ErrorOptions to avoid a type union and sniffing around with instanceof in message.ts which was causing some errors to get unhelpfuly stringified as object Object.

image

closes #854

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 26, 2026

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit baf4b50
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/69c5b40b3ad2c3000801238d
😎 Deploy Preview https://deploy-preview-855--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

PaulHax added 3 commits March 26, 2026 18:22
When errors occur, a structured anonymous bug report is automatically
attached to the error message. Users can copy it to clipboard from the
notification center. The report includes build info (volview version,
git SHA, vtk.js/itk-wasm versions), browser/OS, error stack trace, and
dataset metadata (dimensions, scalar type, source format, segment groups)
without exposing any patient data.

Closes #854
Replace the overloaded `opts?: Error | string | MessageOptions` parameter
with a typed `ErrorOptions` bag (`{ error?, details?, persist? }`). This
eliminates type-sniffing, fixes bug report generation receiving
`[object Object]` for MessageOptions callers, and makes each call site
explicit about what it's passing.

Also moves `bugReport` from MessageOptions to the Message type since it's
generated output, not caller input. Tightens generateBugReport signature
to `(error?: Error)`. Adds store-based content assertion to the E2E test.
Chrome 137+ deprecated automatic SwiftShader fallback for WebGL.
Without --enable-unsafe-swiftshader, WebGL context creation silently
fails on GPU-less CI runners, causing black views and test timeouts.

Also simplifies bug report generation: use raw userAgent instead of
parsed browser string, inline bugReport in addError, and trim the
E2E test to just verify the copy button appears.
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.

Add copyable bug report generation to VolView

1 participant