From 0d36484c04f8fa20e46e070bdba4379586f0fe9d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 16 Nov 2025 16:49:35 +0100 Subject: [PATCH] Add "Ironmount" prefix to page titles and display version in sidebar (#28) * Initial plan * Initial exploration - understanding the codebase Co-authored-by: nicotsx <47644445+nicotsx@users.noreply.github.com> * Add "Ironmount - " prefix to all route titles and version in sidebar Co-authored-by: nicotsx <47644445+nicotsx@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nicotsx <47644445+nicotsx@users.noreply.github.com> --- app/client/components/app-sidebar.tsx | 11 +++++++++++ app/client/lib/version.ts | 1 + .../modules/auth/routes/download-recovery-key.tsx | 2 +- app/client/modules/auth/routes/login.tsx | 2 +- app/client/modules/auth/routes/onboarding.tsx | 2 +- app/client/modules/backups/routes/backup-details.tsx | 2 +- app/client/modules/backups/routes/backups.tsx | 2 +- app/client/modules/backups/routes/create-backup.tsx | 2 +- .../repositories/routes/create-repository.tsx | 2 +- .../modules/repositories/routes/repositories.tsx | 2 +- .../repositories/routes/repository-details.tsx | 2 +- .../modules/repositories/routes/snapshot-details.tsx | 2 +- app/client/modules/settings/routes/settings.tsx | 2 +- app/client/modules/volumes/routes/create-volume.tsx | 2 +- app/client/modules/volumes/routes/volume-details.tsx | 2 +- app/client/modules/volumes/routes/volumes.tsx | 2 +- bun.lock | 1 + vite.config.ts | 12 ++++++++++++ 18 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 app/client/lib/version.ts diff --git a/app/client/components/app-sidebar.tsx b/app/client/components/app-sidebar.tsx index 9995ee1..a162f62 100644 --- a/app/client/components/app-sidebar.tsx +++ b/app/client/components/app-sidebar.tsx @@ -3,6 +3,7 @@ import { Link, NavLink } from "react-router"; import { Sidebar, SidebarContent, + SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarHeader, @@ -13,6 +14,7 @@ import { } from "~/client/components/ui/sidebar"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "~/client/components/ui/tooltip"; import { cn } from "~/client/lib/utils"; +import { APP_VERSION } from "~/client/lib/version"; const items = [ { @@ -85,6 +87,15 @@ export function AppSidebar() { + +
+ Version {APP_VERSION} +
+
); } diff --git a/app/client/lib/version.ts b/app/client/lib/version.ts new file mode 100644 index 0000000..6bc6a20 --- /dev/null +++ b/app/client/lib/version.ts @@ -0,0 +1 @@ +export const APP_VERSION = import.meta.env.VITE_APP_VERSION || "dev"; diff --git a/app/client/modules/auth/routes/download-recovery-key.tsx b/app/client/modules/auth/routes/download-recovery-key.tsx index 488de69..7f8fee5 100644 --- a/app/client/modules/auth/routes/download-recovery-key.tsx +++ b/app/client/modules/auth/routes/download-recovery-key.tsx @@ -16,7 +16,7 @@ export const clientMiddleware = [authMiddleware]; export function meta(_: Route.MetaArgs) { return [ - { title: "Download Recovery Key" }, + { title: "Ironmount - Download Recovery Key" }, { name: "description", content: "Download your backup recovery key to ensure you can restore your data.", diff --git a/app/client/modules/auth/routes/login.tsx b/app/client/modules/auth/routes/login.tsx index 29d7308..1140023 100644 --- a/app/client/modules/auth/routes/login.tsx +++ b/app/client/modules/auth/routes/login.tsx @@ -16,7 +16,7 @@ export const clientMiddleware = [authMiddleware]; export function meta(_: Route.MetaArgs) { return [ - { title: "Login" }, + { title: "Ironmount - Login" }, { name: "description", content: "Sign in to your Ironmount account.", diff --git a/app/client/modules/auth/routes/onboarding.tsx b/app/client/modules/auth/routes/onboarding.tsx index e14296c..bb72df1 100644 --- a/app/client/modules/auth/routes/onboarding.tsx +++ b/app/client/modules/auth/routes/onboarding.tsx @@ -24,7 +24,7 @@ export const clientMiddleware = [authMiddleware]; export function meta(_: Route.MetaArgs) { return [ - { title: "Onboarding" }, + { title: "Ironmount - Onboarding" }, { name: "description", content: "Welcome to Ironmount. Create your admin account to get started.", diff --git a/app/client/modules/backups/routes/backup-details.tsx b/app/client/modules/backups/routes/backup-details.tsx index 7281faf..2a0b4ba 100644 --- a/app/client/modules/backups/routes/backup-details.tsx +++ b/app/client/modules/backups/routes/backup-details.tsx @@ -40,7 +40,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Backup Job Details" }, + { title: "Ironmount - Backup Job Details" }, { name: "description", content: "View and manage backup job configuration, schedule, and snapshots.", diff --git a/app/client/modules/backups/routes/backups.tsx b/app/client/modules/backups/routes/backups.tsx index 3908fb3..3b4b21d 100644 --- a/app/client/modules/backups/routes/backups.tsx +++ b/app/client/modules/backups/routes/backups.tsx @@ -15,7 +15,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Backup Jobs" }, + { title: "Ironmount - Backup Jobs" }, { name: "description", content: "Automate volume backups with scheduled jobs and retention policies.", diff --git a/app/client/modules/backups/routes/create-backup.tsx b/app/client/modules/backups/routes/create-backup.tsx index fee33ce..909bd86 100644 --- a/app/client/modules/backups/routes/create-backup.tsx +++ b/app/client/modules/backups/routes/create-backup.tsx @@ -24,7 +24,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Create Backup Job" }, + { title: "Ironmount - Create Backup Job" }, { name: "description", content: "Create a new automated backup job for your volumes.", diff --git a/app/client/modules/repositories/routes/create-repository.tsx b/app/client/modules/repositories/routes/create-repository.tsx index 5c30eda..a84c54b 100644 --- a/app/client/modules/repositories/routes/create-repository.tsx +++ b/app/client/modules/repositories/routes/create-repository.tsx @@ -17,7 +17,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Create Repository" }, + { title: "Ironmount - Create Repository" }, { name: "description", content: "Create a new backup repository with encryption and compression.", diff --git a/app/client/modules/repositories/routes/repositories.tsx b/app/client/modules/repositories/routes/repositories.tsx index ecb0114..27bfa6c 100644 --- a/app/client/modules/repositories/routes/repositories.tsx +++ b/app/client/modules/repositories/routes/repositories.tsx @@ -20,7 +20,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Repositories" }, + { title: "Ironmount - Repositories" }, { name: "description", content: "Manage your backup repositories with encryption and compression.", diff --git a/app/client/modules/repositories/routes/repository-details.tsx b/app/client/modules/repositories/routes/repository-details.tsx index c18d517..8a091dc 100644 --- a/app/client/modules/repositories/routes/repository-details.tsx +++ b/app/client/modules/repositories/routes/repository-details.tsx @@ -36,7 +36,7 @@ export const handle = { export function meta({ params }: Route.MetaArgs) { return [ - { title: params.name }, + { title: `Ironmount - ${params.name}` }, { name: "description", content: "View repository configuration, status, and snapshots.", diff --git a/app/client/modules/repositories/routes/snapshot-details.tsx b/app/client/modules/repositories/routes/snapshot-details.tsx index 50e49b7..ccfd34f 100644 --- a/app/client/modules/repositories/routes/snapshot-details.tsx +++ b/app/client/modules/repositories/routes/snapshot-details.tsx @@ -17,7 +17,7 @@ export const handle = { export function meta({ params }: Route.MetaArgs) { return [ - { title: `Snapshot ${params.snapshotId}` }, + { title: `Ironmount - Snapshot ${params.snapshotId}` }, { name: "description", content: "Browse and restore files from a backup snapshot.", diff --git a/app/client/modules/settings/routes/settings.tsx b/app/client/modules/settings/routes/settings.tsx index 6b6e2b7..e5728cf 100644 --- a/app/client/modules/settings/routes/settings.tsx +++ b/app/client/modules/settings/routes/settings.tsx @@ -30,7 +30,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Settings" }, + { title: "Ironmount - Settings" }, { name: "description", content: "Manage your account settings and preferences.", diff --git a/app/client/modules/volumes/routes/create-volume.tsx b/app/client/modules/volumes/routes/create-volume.tsx index 9930807..cf9ad1f 100644 --- a/app/client/modules/volumes/routes/create-volume.tsx +++ b/app/client/modules/volumes/routes/create-volume.tsx @@ -17,7 +17,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Create Volume" }, + { title: "Ironmount - Create Volume" }, { name: "description", content: "Create a new storage volume with automatic mounting and health checks.", diff --git a/app/client/modules/volumes/routes/volume-details.tsx b/app/client/modules/volumes/routes/volume-details.tsx index 3059e0c..af645a6 100644 --- a/app/client/modules/volumes/routes/volume-details.tsx +++ b/app/client/modules/volumes/routes/volume-details.tsx @@ -37,7 +37,7 @@ export const handle = { export function meta({ params }: Route.MetaArgs) { return [ - { title: params.name }, + { title: `Ironmount - ${params.name}` }, { name: "description", content: "View and manage volume details, configuration, and files.", diff --git a/app/client/modules/volumes/routes/volumes.tsx b/app/client/modules/volumes/routes/volumes.tsx index eb9969f..6240a6e 100644 --- a/app/client/modules/volumes/routes/volumes.tsx +++ b/app/client/modules/volumes/routes/volumes.tsx @@ -20,7 +20,7 @@ export const handle = { export function meta(_: Route.MetaArgs) { return [ - { title: "Volumes" }, + { title: "Ironmount - Volumes" }, { name: "description", content: "Create, manage, monitor, and automate your Docker volumes with ease.", diff --git a/bun.lock b/bun.lock index 1f24ce9..c8af67a 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "@ironmount/client", diff --git a/vite.config.ts b/vite.config.ts index e55ab31..9782fec 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,9 +3,21 @@ import tailwindcss from "@tailwindcss/vite"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; import { reactRouterHonoServer } from "react-router-hono-server/dev"; +import { execSync } from "node:child_process"; + +const getVersion = () => { + try { + return execSync("git describe --tags --always").toString().trim(); + } catch { + return "dev"; + } +}; export default defineConfig({ plugins: [reactRouterHonoServer({ runtime: "bun" }), reactRouter(), tailwindcss(), tsconfigPaths()], + define: { + "import.meta.env.VITE_APP_VERSION": JSON.stringify(getVersion()), + }, build: { outDir: "dist", sourcemap: true,