Add CalVer build-time version tracking

- Dockerfile: ARG BUILD_VERSION=dev → ENV APP_VERSION baked into image
- ci.yml: BUILD_VERSION passed as build-arg; set to git tag name on v*
  tag builds, "dev" on branch builds
- routes/api.py: GET /api/version returns {"version": APP_VERSION}
- SettingsView: fetches /api/version on mount, displays in About section
  under General tab

Version source of truth is the git tag (YY.MM.DD.N CalVer).
pyproject.toml / package.json versions are no longer maintained.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 16:10:57 -04:00
parent 767fa73e1d
commit 4636c9a973
4 changed files with 46 additions and 1 deletions
+29
View File
@@ -28,6 +28,7 @@ const saving = ref(false);
const saved = ref(false);
const exporting = ref(false);
const restoring = ref(false);
const appVersion = ref('dev');
const restoreFileInput = ref<HTMLInputElement | null>(null);
// Migrate stored "admin" → "config"; unknown tabs fall back to "general"
@@ -176,6 +177,10 @@ const searchLoading = ref(false);
const searchError = ref("");
onMounted(async () => {
try {
const v = await apiGet<{ version: string }>('/api/version')
appVersion.value = v.version
} catch { /* non-critical */ }
await store.fetchSettings();
pushStore.checkSubscription();
assistantName.value = store.assistantName;
@@ -1031,6 +1036,11 @@ function formatUserDate(iso: string): string {
</div>
</section>
<section class="settings-section full-width">
<h2>About</h2>
<p class="version-line">Fabled Assistant <span class="version-badge">{{ appVersion }}</span></p>
</section>
</div>
<!-- Integrations -->
@@ -2206,6 +2216,25 @@ function formatUserDate(iso: string): string {
margin-right: 0.25rem;
}
/* ── About / version ─────────────────────────────────────────── */
.version-line {
margin: 0;
font-size: 0.9rem;
color: var(--color-text-secondary);
display: flex;
align-items: center;
gap: 0.6rem;
}
.version-badge {
font-family: ui-monospace, monospace;
font-size: 0.8rem;
padding: 0.15rem 0.5rem;
background: var(--color-bg-secondary);
border: 1px solid var(--color-border);
border-radius: 4px;
color: var(--color-text-muted);
}
/* ── Groups tab ──────────────────────────────────────────────── */
.btn-primary {
padding: 0.4rem 0.9rem;