feat: user feedback reports#74
Merged
Merged
Conversation
Adds postFeedback method using the 3-step presigned URL upload flow (getCrashUploadUrl -> PUT to S3 -> commitS3CrashUpload) with crashTypeId=36. Creates feedback.json with title and description, zips it using a minimal inline ZIP implementation with CRC-32, and uploads via the presigned URL flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use jszip instead of hand-rolled ZIP/CRC-32 code for creating the feedback.json zip archive in postFeedback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fflate is tree-shakeable (~3KB gzipped) vs jszip (~45KB). Only zipSync and strToU8 are imported. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds BugSplatAttachment type and attachments option to BugSplatFeedbackOptions. Attachments are included in the zip alongside feedback.json. Named BugSplatAttachment (not BugSplatFeedbackAttachment) so it can be reused for other report types in the future. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nseBody type guard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate post() from direct /post/js/ to the presigned URL upload flow, add attributes and attachments as first-class options, remove additionalFormDataParams and FormDataParam, and unify response types to match the commitS3CrashUpload endpoint shape. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use @ts-expect-error on the single _formData assignment instead of typing the whole bugsplat variable as any. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The server doesn't always return infoUrl in the commit response, causing validateResponseBody to incorrectly reject valid responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
daveplunkett
approved these changes
Mar 11, 2026
The description variable was already resolved inside _upload, making the one in post redundant. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a breaking change.
post()from direct/post/js/endpoint to the presigned URL upload flow (getCrashUploadUrl→ S3 PUT →commitS3CrashUpload), matchingpostFeedback()attributesas a first-class option (Record<string, string>) onBugSplatOptionswithsetDefaultAttributes()— no more passing{ key: 'attributes', value: '...' }viaadditionalFormDataParamsattachmentsas a first-class option onBugSplatOptionsfor bothpost()andpostFeedback()— typed asBugSplatAttachment[]additionalFormDataParamsfrom the public API entirelyFormDataParamtype andform-data-param.tsBugSplatOptions— removesBugSplatFeedbackOptions(both methods now share a single options interface)BugSplatResponseBodynow reflects the commit endpoint shape (crashId,stackKeyId,messageId,infoUrl) instead of the old/post/js/shape (crash_id,current_server_time,message)_upload()private method to eliminate duplication betweenpost()andpostFeedback()BUGSPLAT_CRASH_POST_URLenv var withBUGSPLAT_BASE_URLBreaking changes
additionalFormDataParams: [{ key: 'attributes', value: '{"foo":"bar"}' }]attributes: { foo: 'bar' }additionalFormDataParams: [{ key: name, value: blob, filename: name }]attachments: [{ filename: name, data: blob }]result.response.crash_idresult.response.crashIdresult.response.current_server_timeresult.response.messageresult.response.urlresult.response.infoUrlimport { FormDataParam }import { BugSplatFeedbackOptions }BugSplatOptionsinsteadDependent SDK PRs
These PRs on
feature/user-feedbackconsume the breaking changes above:BugSplat-Git/bugsplat-ngBugSplat-Git/bugsplat-reactBugSplat-Git/bugsplat-nodeTest plan
npx vitest run spec/bugsplat.spec.tsfreddatabase:npx vitest run spec/bugsplat.e2e.spec.ts🤖 Generated with Claude Code