PR #171 merged: chore: bind frontend Sentry release tag end-to-end
Why
PR #167 wired sourcemap upload but missed the binding piece: every event Sentry receives currently has release: None. That means even once SENTRY_AUTH_TOKEN (now set on Coolify) starts uploading maps with the next build, Sentry won't be able to associate them with events. Stack traces in the UI stay as Qc, e.startTransition, r.onerror — useless for debugging the three live frontend issues (TIDY-LINKER-3Q login insertBefore, 3N FormData on /, 3C HttpNetworkError on update-rates).
This wires the release tag end-to-end.
Changes
vite.config.ts— compute a release name from Coolify's auto-injectedSOURCE_COMMITat build time (falls back todevfor local builds). Pass it to:- the Sentry Vite plugin's
release.name(binds uploaded artifacts to the release) - a
define()(so the runtime SDK init reads the exact same string)
- the Sentry Vite plugin's
resources/js/sentry.ts— read__SENTRY_RELEASE__from the define and pass toSentry.init.
After deploy, events will arrive tagged as tidylinker@<short-sha> and the matching uploaded sourcemaps will resolve frame names.
Backend Sentry
Intentionally NOT wiring SENTRY_RELEASE for the Laravel SDK in this PR. PHP stack traces aren't minified — they already give us real file paths and line numbers. We can revisit if backend release tagging starts paying off (better deploy-vs-error correlation, etc.).
Coolify state (already done)
SENTRY_API_TOKENset as build-time env var on the prod app (hcow00oos8cwcsscc08okckk). Uses the same user token from local.env— hasproject:releasesscope.SOURCE_COMMITis auto-injected by Coolify, no config needed.
Test plan
-
npm run buildwithSOURCE_COMMIT=abc123def456→ release stringtidylinker@abc123def456baked into bundle (grep -o 'tidylinker@...' public/build/assets/app-*.js) -
npm run buildwithout token → 0.mapfiles emitted (PR #167's regression guard still holds) -
npm run buildwith token → upload step runs, maps deleted post-upload - eslint clean, no new TS errors
- Manual: after merge + deploy, check a fresh Sentry event has
release: tidylinker@<sha> - Manual: trigger one of the live errors (or wait for one), confirm Sentry now resolves to real file names in the stack