[codex] Clean up app version fallback#65
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Cliparr’s version resolution so that the displayed app version is only sourced from explicit build metadata (CLIPARR_VERSION), avoiding misleading/stale versions during local pnpm dev runs, and keeps Jellyfin client versioning explicitly defined with a local dev fallback.
Changes:
- Remove package-manifest-based version fallbacks (including
npm_package_version) and treatCLIPARR_VERSIONas the sole source of the server “display version”. - Omit the
versionfield from/api/healthunlessCLIPARR_VERSIONis actually provided. - Introduce
CLIPARR_CLIENT_VERSION(defaults to"dev"locally) and use it for Jellyfin client requests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/shared/package.json |
Removes stale version field from private workspace package. |
package.json |
Removes stale root version field so local tooling doesn’t accidentally surface it. |
Dockerfile |
Removes default CLIPARR_VERSION build-arg value so images only carry a version when injected. |
apps/server/src/providers/jellyfin/shared.ts |
Switches Jellyfin client version source to CLIPARR_CLIENT_VERSION. |
apps/server/src/config/version.ts |
Simplifies version resolution to only use CLIPARR_VERSION; adds explicit client version resolver with local dev fallback. |
apps/server/src/config/version.test.ts |
Updates tests to reflect new “omit when not injected” behavior and client fallback behavior. |
apps/server/src/app.ts |
Makes /api/health conditionally include version. |
apps/server/package.json |
Removes stale version field from private workspace package. |
apps/frontend/src/components/DashboardScreen.tsx |
Handles missing health.version by falling back to an empty string. |
apps/frontend/src/api/cliparrClient.ts |
Marks HealthResponse.version as optional to match API behavior. |
apps/frontend/package.json |
Removes stale version field from private workspace package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
CLIPARR_VERSIONis injected by CI or Docker build metadatadevfallbackRoot cause
The server version resolver fell back to
npm_package_version, which pnpm populated fromapps/server/package.jsonduringpnpm dev. That made the dashboard display the stale manifest value even though CI injects the real build identity separately.Validation
pnpm install --frozen-lockfilepnpm --filter @cliparr/server testpnpm --filter @cliparr/server lint:typespnpm --filter @cliparr/frontend lint:typespnpm --filter @cliparr/server lint:eslintpnpm --filter @cliparr/frontend lint:eslintpnpm build