Skip to content

feat: user feedback reports#74

Merged
bobbyg603 merged 13 commits into
masterfrom
feature/user-feedback
Mar 11, 2026
Merged

feat: user feedback reports#74
bobbyg603 merged 13 commits into
masterfrom
feature/user-feedback

Conversation

@bobbyg603

@bobbyg603 bobbyg603 commented Mar 10, 2026

Copy link
Copy Markdown
Member

Release as bugsplat@9.0.0 — dependent SDKs (bugsplat-ng, bugsplat-react, bugsplat-node) have matching PRs on feature/user-feedback that require this version.

Summary

This is a breaking change.

  • Migrates post() from direct /post/js/ endpoint to the presigned URL upload flow (getCrashUploadUrl → S3 PUT → commitS3CrashUpload), matching postFeedback()
  • Adds attributes as a first-class option (Record<string, string>) on BugSplatOptions with setDefaultAttributes() — no more passing { key: 'attributes', value: '...' } via additionalFormDataParams
  • Adds attachments as a first-class option on BugSplatOptions for both post() and postFeedback() — typed as BugSplatAttachment[]
  • Removes additionalFormDataParams from the public API entirely
  • Removes FormDataParam type and form-data-param.ts
  • Unifies BugSplatOptions — removes BugSplatFeedbackOptions (both methods now share a single options interface)
  • Unifies response typesBugSplatResponseBody now reflects the commit endpoint shape (crashId, stackKeyId, messageId, infoUrl) instead of the old /post/js/ shape (crash_id, current_server_time, message)
  • Extracts shared _upload() private method to eliminate duplication between post() and postFeedback()
  • Replaces BUGSPLAT_CRASH_POST_URL env var with BUGSPLAT_BASE_URL

Breaking changes

Before After
additionalFormDataParams: [{ key: 'attributes', value: '{"foo":"bar"}' }] attributes: { foo: 'bar' }
additionalFormDataParams: [{ key: name, value: blob, filename: name }] attachments: [{ filename: name, data: blob }]
result.response.crash_id result.response.crashId
result.response.current_server_time (removed)
result.response.message (removed)
result.response.url result.response.infoUrl
import { FormDataParam } (removed)
import { BugSplatFeedbackOptions } Use BugSplatOptions instead

Dependent SDK PRs

These PRs on feature/user-feedback consume the breaking changes above:

  • bugsplat-ngBugSplat-Git/bugsplat-ng
  • bugsplat-reactBugSplat-Git/bugsplat-react
  • bugsplat-nodeBugSplat-Git/bugsplat-node

Test plan

  • Run unit tests: npx vitest run spec/bugsplat.spec.ts
  • Run e2e tests against fred database: npx vitest run spec/bugsplat.e2e.spec.ts
  • Verify crash reports appear in BugSplat dashboard with correct attributes
  • Verify feedback reports appear in BugSplat dashboard with correct attributes and attachments

🤖 Generated with Claude Code

bobbyg603 and others added 6 commits March 10, 2026 17:26
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>
@bobbyg603 bobbyg603 changed the title Add postFeedback API for user feedback submission BREAKING: Unify crash and feedback uploads via presigned URL flow Mar 11, 2026
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>
@bobbyg603 bobbyg603 changed the title BREAKING: Unify crash and feedback uploads via presigned URL flow feat: user feedback reports Mar 11, 2026
bobbyg603 and others added 2 commits March 11, 2026 12:50
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>
@bobbyg603 bobbyg603 requested a review from daveplunkett March 11, 2026 16:52
bobbyg603 and others added 3 commits March 11, 2026 13:50
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>
The description variable was already resolved inside _upload, making the
one in post redundant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bobbyg603 bobbyg603 merged commit 2fe689f into master Mar 11, 2026
7 checks passed
@bobbyg603 bobbyg603 deleted the feature/user-feedback branch March 11, 2026 18:51
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.

2 participants