Show the release version in the sidebar footer
release gate / check (push) Failing after 6m58s
release / smoke (push) Successful in 10m23s
release / publish (push) Failing after 9m50s

Baked at image build time: web/Dockerfile takes ARG SUPERBRAIN_VERSION
(default dev) into NEXT_PUBLIC_SUPERBRAIN_VERSION; the release workflow
passes the tag, README Option B gains the matching --build-arg, and local
compose builds show 'dev build'. Rendered muted under the sidebar footer
when expanded, so any deployment can be identified from the UI alone.
This commit is contained in:
Andrew S Erwin
2026-11-05 13:26:12 -06:00
parent 2e95190cac
commit 2ec157e160
4 changed files with 19 additions and 1 deletions
+11
View File
@@ -3,6 +3,12 @@
import Link from 'next/link'
import { useRouter, useSearchParams } from 'next/navigation'
import { Suspense, useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react'
// Release version baked into the client bundle at image build time
// (web/Dockerfile ARG SUPERBRAIN_VERSION; CI passes the tag, local builds
// keep "dev"). Shown in the sidebar footer so any deployment can be
// identified from the UI alone.
const APP_VERSION = process.env.NEXT_PUBLIC_SUPERBRAIN_VERSION || ''
import { cn } from '@/lib/utils'
import {
Calendar, Tags, Users, Kanban, Link2, Settings, ChevronLeft, ChevronRight, ChevronDown,
@@ -110,6 +116,11 @@ export function Sidebar({ open, onToggle, onQuickFind, pathname, isAdmin = false
<Button variant="ghost" size="icon-sm" onClick={onToggle} className="w-full" aria-label={open ? 'Collapse sidebar' : 'Expand sidebar'}>
{open ? <ChevronLeft className="h-4 w-4" /> : <ChevronRight className="h-4 w-4" />}
</Button>
{open && APP_VERSION && (
<p className="px-3 pt-0.5 text-[10px] text-muted-foreground/70 select-none" title={`Superbrain ${APP_VERSION}`}>
{APP_VERSION === 'dev' ? 'dev build' : `v${APP_VERSION}`}
</p>
)}
</div>
</aside>
)