Display application version and improve GitHub link in UI#29
Conversation
There was a problem hiding this comment.
Pull request overview
Propagates the application version from CI/build into the Docker image and backend, exposes it via /api/health, and displays it in the dashboard header alongside a new GitHub link.
Changes:
- Add a single server-side
CLIPARR_VERSIONresolver and include it in/api/health. - Fetch and display the backend-reported version in the dashboard header, plus add a GitHub link.
- Inject
CLIPARR_VERSIONthrough the Docker build (workflow + Dockerfile) for runtime availability.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/server/src/config/version.ts | New centralized version resolution (CLIPARR_VERSION) with fallbacks. |
| apps/server/src/app.ts | Adds version to /api/health response. |
| apps/server/src/providers/jellyfin/shared.ts | Uses CLIPARR_VERSION for Jellyfin client version instead of npm_package_version. |
| apps/frontend/src/api/cliparrClient.ts | Adds getHealth() client method and response typing. |
| apps/frontend/src/components/DashboardScreen.tsx | Fetches health/version on load; renders version badge and GitHub link (with inline SVG). |
| apps/frontend/src/assets/github.svg | Adds GitHub SVG asset (currently unused). |
| Dockerfile | Accepts/builds with CLIPARR_VERSION and sets it as an env var in the runtime image. |
| .github/workflows/docker.yml | Resolves version from tags and passes it as a Docker build-arg. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const CLIPARR_GITHUB_URL = "https://github.com/TechSquidTV/Cliparr"; | ||
|
|
||
| function GithubIcon({ className }: { className?: string }) { | ||
| return ( | ||
| <svg | ||
| viewBox="0 0 98 96" | ||
| className={className} | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| fill="currentColor" | ||
| > | ||
| <path d="M41.4395 69.3848C28.8066 67.8535 19.9062 58.7617 19.9062 46.9902C19.9062 42.2051 21.6289 37.0371 24.5 33.5918C23.2559 30.4336 23.4473 23.7344 24.8828 20.959C28.7109 20.4805 33.8789 22.4902 36.9414 25.2656C40.5781 24.1172 44.4062 23.543 49.0957 23.543C53.7852 23.543 57.6133 24.1172 61.0586 25.1699C64.0254 22.4902 69.2891 20.4805 73.1172 20.959C74.457 23.543 74.6484 30.2422 73.4043 33.4961C76.4668 37.1328 78.0937 42.0137 78.0937 46.9902C78.0937 58.7617 69.1934 67.6621 56.3691 69.2891C59.623 71.3945 61.8242 75.9883 61.8242 81.252L61.8242 91.2051C61.8242 94.0762 64.2168 95.7031 67.0879 94.5547C84.4102 87.9512 98 70.6289 98 49.1914C98 22.1074 75.9883 6.69539e-07 48.9043 4.309e-07C21.8203 1.92261e-07 -1.9479e-07 22.1074 -4.3343e-07 49.1914C-6.20631e-07 70.4375 13.4941 88.0469 31.6777 94.6504C34.2617 95.6074 36.75 93.8848 36.75 91.3008L36.75 83.6445C35.4102 84.2188 33.6875 84.6016 32.1562 84.6016C25.8398 84.6016 22.1074 81.1563 19.4277 74.7441C18.375 72.1602 17.2266 70.6289 15.0254 70.3418C13.877 70.2461 13.4941 69.7676 13.4941 69.1934C13.4941 68.0449 15.4082 67.1836 17.3223 67.1836C20.0977 67.1836 22.4902 68.9063 24.9785 72.4473C26.8926 75.2227 28.9023 76.4668 31.2949 76.4668C33.6875 76.4668 35.2187 75.6055 37.4199 73.4043C39.0469 71.7773 40.291 70.3418 41.4395 69.3848Z" /> | ||
| </svg> | ||
| ); | ||
| } |
There was a problem hiding this comment.
This adds an inline GithubIcon SVG path in the component, but the PR also introduces src/assets/github.svg. Keeping both creates duplication and makes the dashboard file harder to scan. Consider deleting the unused asset, or switching the component to reference/import the asset (or an existing icon library used elsewhere in the app) so there’s a single source of truth.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces application version tracking and display throughout the build, backend, and frontend, and adds a GitHub link to the dashboard UI. The main changes include propagating the app version from CI to the Docker image and backend, exposing it via the
/api/healthendpoint, consuming and displaying it in the frontend, and improving the dashboard header.Versioning and build pipeline:
0.0.0) and injects it into the image as theCLIPARR_VERSIONbuild argument and environment variable. (.github/workflows/docker.yml,Dockerfile) [1] [2] [3] [4]CLIPARR_VERSION(env),npm_package_version, orpackage.json, defaulting to0.0.0, and exports it as a constant for use throughout the server code. (apps/server/src/config/version.ts)API and backend:
/api/healthendpoint now includes the application version in its response. (apps/server/src/app.ts) [1] [2]CLIPARR_VERSIONinstead of reading directly fromnpm_package_version. (apps/server/src/providers/jellyfin/shared.ts)Frontend improvements:
/api/healthon load and displays it as a badge next to the app name in the dashboard header. (apps/frontend/src/api/cliparrClient.ts,apps/frontend/src/components/DashboardScreen.tsx) [1] [2] [3] [4]apps/frontend/src/components/DashboardScreen.tsx) [1] [2]