Files
LisherSong--ps5-web-file-ma…/assets
Songlx516 0d036a74a7 feat(ui): source the footer version from /api/version instead of a JS literal
The footer string in the browser was a hard-coded `const APP_VERSION = "v1.9"`
in assets/main.js, completely disconnected from the Makefile's VERSION_TAG.
It had already drifted: the UI kept showing "v1.9" through the entire v1.9.1
release, while the startup notification and the ELF name both said v1.9.1.
Two sources of truth for one fact is one too many.

Backend:
  * new src/version.c -- GET /api/version -> {"ok":true,"version":"v1.9.1",
    "titleId":"FMGR88888"}, built straight from the -DVERSION_TAG /
    -DTITLE_ID macros the Makefile already passes, so there is nothing left
    to forget when bumping a release.
  * registered in filemgr_api_request() next to /api/space and declared in
    filemgr_internal.h; added to COMMON_SRCS so both the PS5 and the linux
    targets link it.

Frontend:
  * the literal becomes APP_VERSION_FALLBACK and is rendered first so the
    footer is never empty, then loadVersion() refreshes it from the API in
    the background. A failed request is deliberately swallowed -- a wrong
    version string is cosmetic and should not raise an error toast.
  * both the host i18n path and the PlayStation browser branch are
    untouched; the footer element itself (#versionText) does not move.

Note the earlier answer to "does the version show in the PS5 UI?" was that it
does -- the bottom-right footer -- but it was showing the stale literal, not
the build's real tag. That is what this fixes.

Verified:
  * WSL prospero-clang 18.1.8 -- ELF 1017864 B, e_machine=0x003e, contains
    both the string "v1.9.1" and the "/api/version" route.
  * MinGW gcc 16.2.0 host tests -- ZIP 108 + RAR 27 + 7z 28 = 163 checks,
    0 failures.
2026-09-15 16:48:53 +08:00
..