fix(webapp): show the real app version instead of v0.0.0 in organization settings - #4611
Conversation
…ion settings The Vite SSR bundle resolves workspace packages to TS source, where the VERSION constant is the unstamped 0.0.0 placeholder; the stamping script only patches dist output, which the bundle never reads. A small Vite plugin now performs the same substitution on the source version modules of core and trigger-sdk during bundling, so the settings page and the version headers the webapp sends carry the real version again.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (10)
WalkthroughThe Vite configuration reads versions from the Merge Risk: ⚪ Minimal · up to This localized build change restores accurate application version reporting and related version metadata; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Since the move from the Remix compiler to Vite (#4188), the "App version" on the organization settings page shows
v0.0.0unless the image was built from a semver release tag (which bakes inBUILD_APP_VERSION). Self-hosted builds and any image built frommainare affected. This restores the real version.Root cause
The Vite SSR bundle resolves workspace packages to TS source via the
@triggerdotdev/sourcecondition, so@trigger.dev/core'sVERSIONconstant is bundled as its raw"0.0.0"placeholder.scripts/updateVersion.tsstill stamps the real version at build time, but only into the packages' dist output, which the bundle no longer reads. The old Remix compiler bundled the stamped dist, which is why this used to work.The fix is a small Vite plugin that applies the same substitution to the source version modules of
@trigger.dev/coreand@trigger.dev/sdkduring bundling. Beyond the settings page, this also restores real values in thetrigger-versionrequest header and the version attributes the bundled packages emit.Verified by building the server bundle and confirming the VERSION constants carry the package versions, with no
"0.0.0"occurrences left in the build output.