Describe the bug
On on-premise instances, the version badge rendered in the top-right of the NavBar shows a duplicated leading v, e.g. vv0.159.15 instead of v0.159.15.
To Reproduce
Steps to reproduce the behavior:
- Deploy any recent on-prem Infisical release (reproduced on
v0.159.15, but the code path has existed since the VersionBadge component was introduced).
- Log in and look at the NavBar in the top-right corner on a viewport ≥
md.
- Observe the badge — it reads
vv0.159.15.
Expected behavior
The badge should display v0.159.15 (a single leading v).
Screenshots
Rendered HTML (captured from an on-prem v0.159.15 instance):
<span data-slot="badge" class="... mt-[3px] mr-2 hidden md:inline-flex">vv0.159.15</span>
Root cause
The backend already normalizes this by using v${INFISICAL_PLATFORM_VERSION} with a raw semver, so the issue is isolated to the frontend badge.
Proposed fix
Strip a leading v from version before re-prepending it, so the component is idempotent regardless of whether the env var is provided with or without the leading v (and matches the backend's logging format).
I've opened a PR with this fix:
Platform you are having the issue on
- On-premise / self-hosted, Docker
infisical/infisical:v0.159.15
Additional context
- Only affects on-prem (cloud and dedicated instances skip rendering this badge).
- Visible on viewports
md and up where the badge is inline-flex.
Describe the bug
On on-premise instances, the version badge rendered in the top-right of the NavBar shows a duplicated leading
v, e.g.vv0.159.15instead ofv0.159.15.To Reproduce
Steps to reproduce the behavior:
v0.159.15, but the code path has existed since theVersionBadgecomponent was introduced).md.vv0.159.15.Expected behavior
The badge should display
v0.159.15(a single leadingv).Screenshots
Rendered HTML (captured from an on-prem
v0.159.15instance):Root cause
v0.159.15(see https://github.com/Infisical/infisical/releases).INFISICAL_PLATFORM_VERSIONbuild arg:https://github.com/Infisical/infisical/blob/main/.github/workflows/release-standalone-docker-img-postgres-offical.yml
INFISICAL_PLATFORM_VERSION(and thereforeVITE_INFISICAL_PLATFORM_VERSION) is set tov0.159.15, already starting with av.v:https://github.com/Infisical/infisical/blob/main/frontend/src/layouts/OrganizationLayout/components/NavBar/VersionBadge.tsx
The backend already normalizes this by using
v${INFISICAL_PLATFORM_VERSION}with a raw semver, so the issue is isolated to the frontend badge.Proposed fix
Strip a leading
vfromversionbefore re-prepending it, so the component is idempotent regardless of whether the env var is provided with or without the leadingv(and matches the backend's logging format).I've opened a PR with this fix:
Platform you are having the issue on
infisical/infisical:v0.159.15Additional context
mdand up where the badge isinline-flex.