Add volume mapping docs and build/version metadata

Add a volume-mapping guide and surface build/version metadata throughout the project.

Changes included:
- documentation: Add documentation/deployment/volume-mapping.md and update TABLEOFCONTENTS.md and README to reference it (helps users align download client and RMAB paths).
- CI: Capture package.json version in .github/workflows/build-unified-image.yml, pass APP_VERSION as a build-arg, and update the Discord notification to show the semantic version and pull `:latest`.
- Docker: Declare ARG APP_VERSION and expose NEXT_PUBLIC_APP_VERSION / APP_VERSION / GIT_COMMIT env vars in dockerfile.unified so runtime and client can read the semantic version and commit.
- App API/UI: Update src/app/api/version/route.ts and src/components/ui/VersionBadge.tsx to prefer semantic app version (APP_VERSION / NEXT_PUBLIC_APP_VERSION), include fullVersion and commit info, show commit in tooltip, and adjust fallback/dev labels.
- Tests: Update tests (system.routes.test.ts and VersionBadge.test.tsx) to reflect the new version/commit fields and behavior.
- Audible integration: Add ipRedirectOverride query param to multiple Audible requests to avoid IP-based region redirects.
- Misc: Bump package.json version to 1.0.0.

These changes make version information consistent between build, runtime, and UI, improve CI notifications, add user guidance for common volume-mapping issues, and harden Audible scraping against region redirects.
This commit is contained in:
kikootwo
2026-02-05 10:26:07 -05:00
parent fe39831ada
commit d3dc6cf76d
11 changed files with 211 additions and 40 deletions
+18 -8
View File
@@ -9,27 +9,35 @@ import React, { useEffect, useState } from 'react';
export function VersionBadge() {
const [version, setVersion] = useState<string | null>(null);
const [commit, setCommit] = useState<string | null>(null);
useEffect(() => {
// Try to get version from build-time env var first (instant, no API call)
const buildTimeVersion = process.env.NEXT_PUBLIC_GIT_COMMIT;
const buildTimeVersion = process.env.NEXT_PUBLIC_APP_VERSION;
if (buildTimeVersion && buildTimeVersion !== 'unknown') {
// Get short commit hash (first 7 characters)
const shortCommit = buildTimeVersion.length >= 7
? buildTimeVersion.substring(0, 7)
: buildTimeVersion;
setVersion(`v.${shortCommit}`);
setVersion(`v${buildTimeVersion}`);
// Also get commit for tooltip if available
const buildTimeCommit = process.env.NEXT_PUBLIC_GIT_COMMIT;
if (buildTimeCommit && buildTimeCommit !== 'unknown') {
const shortCommit = buildTimeCommit.length >= 7
? buildTimeCommit.substring(0, 7)
: buildTimeCommit;
setCommit(shortCommit);
}
} else {
// Fallback to API call if build-time env var is not available
fetch('/api/version')
.then((res) => res.json())
.then((data) => {
setVersion(data.version);
if (data.commit && data.commit !== 'unknown') {
setCommit(data.commit.substring(0, 7));
}
})
.catch((error) => {
console.error('Failed to fetch version:', error);
setVersion('v.dev');
setVersion('vDEV');
});
}
}, []);
@@ -38,10 +46,12 @@ export function VersionBadge() {
return null;
}
const tooltipText = commit ? `${version} (${commit})` : version;
return (
<div
className="inline-flex items-center px-2.5 py-1 rounded-md bg-gradient-to-r from-gray-100 to-gray-200 dark:from-gray-700 dark:to-gray-800 border border-gray-300 dark:border-gray-600 shadow-sm"
title={`Version ${version}`}
title={tooltipText}
>
<span className="text-xs font-mono font-medium text-gray-700 dark:text-gray-300">
{version}