Skip to content

#170 UI: single-source the version from package.json + refresh About#171

Merged
AlvinShenSSW merged 1 commit into
mainfrom
afk/170-ui-version-about
Jul 3, 2026
Merged

#170 UI: single-source the version from package.json + refresh About#171
AlvinShenSSW merged 1 commit into
mainfrom
afk/170-ui-version-about

Conversation

@AlvinShenSSW

Copy link
Copy Markdown
Owner

Closes #170.

Problem

The version in the app top-right and the About card was hardcoded v3.0.0-dev, so it stayed at 3.0.0 while #167 bumped tauri.conf.json / package.json to 3.1.0 — two independent version sources that drift.

Fix

  • Single source: inject the version from package.json at build time (Vite define __APP_VERSION__, imported via resolveJsonModule so no @types/node is needed) and render v{__APP_VERSION__} in both App.tsx and Settings.tsx. The label now always matches the packaged release.
  • About refresh: rewrote the blurb (zh + en) to reflect current V3 scope — agent/Hub fleet; CPU/RAM/GPU/VRAM; LADA 4K per-task progress + ETA; ComfyUI; AI-coding activity (Claude/Codex/Kimi); privacy-first — and credit the sole designer/developer (Designed & developed by 304 / 由 304 独立设计与开发).
  • Test: asserts the rendered label equals __APP_VERSION__ (not a literal), so it can never drift again.

Verification

npm run build bakes v3.1.0 into the bundle; npm test 73 passed (incl. the new version test); eslint clean (no new warnings).

Review trail (/afk)

Claude implement + TDD. External gates run automatically: Codex 外门 then Kimi 终审. Leave-open (owner merges).

The top-right label and the About card hardcoded "v3.0.0-dev", so they stayed at
3.0.0 while #167 shipped 3.1.0 — two drifting version sources. Inject the version
from package.json via Vite `define __APP_VERSION__` and render `v{__APP_VERSION__}`
in both places, so the UI always matches the packaged release. Refresh the About
blurb (zh + en) to reflect current V3 scope (agent/Hub fleet; CPU/RAM/GPU/VRAM;
LADA 4K per-task progress + ETA; ComfyUI; AI-coding activity for Claude/Codex/Kimi;
privacy-first) and credit the sole designer/developer. Test asserts the rendered
label equals __APP_VERSION__ (non-drifting).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AlvinShenSSW

Copy link
Copy Markdown
Owner Author

Review trail (/afk — Claude-driven)

  • Codex 外门: CLEAN — "consistently injects the UI version from package.json via Vite and updates both views; build, tests, and lint completed without errors attributable to this patch."
  • Kimi 终审: VERDICT: PASS. No blockers. Confirmed: the define produces a string-literal replacement (not a bare identifier); the vite-env.d.ts global is correctly typed; resolveJsonModule makes the JSON import type-check; vitest reuses the config so __APP_VERSION__ is defined in tests; zh/en i18n parity maintained; the test asserts against __APP_VERSION__ itself → drift is impossible. Non-blocking nits (optional App.tsx-site test, toBeInTheDocument style, pre-existing spy cleanup) accepted as-is — the second is inconsistent with this file's non-jest-dom style; drift is already structurally prevented.

CI green. Leave-open (owner merges).

@AlvinShenSSW AlvinShenSSW merged commit 6b0422e into main Jul 3, 2026
7 checks passed
@AlvinShenSSW AlvinShenSSW deleted the afk/170-ui-version-about branch July 3, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: version label stuck at 3.0.0-dev (hardcoded); single-source from package.json + refresh About

1 participant