Skip to content
TypeScript

update: rename the main workspace to Kargul Workspace

Vipul Kumar2749f9971fb2
diff --git a/README.md b/README.md
index bd0edc8..932ce04 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Kargul — Time off & calendar
+# Kargul Workspace — Time off & calendar
A people-ops workspace built from the "Dashboard – calendar" Figma design. The
**Time off** page (`/time-off`, the default route) reproduces the design
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index ba00f22..c569488 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -9,7 +9,7 @@ const geistMono = Geist_Mono({ variable: "--font-geist-mono", subsets: ["latin"]
const inter = Inter({ variable: "--font-inter", subsets: ["latin"], weight: ["600"] });
export const metadata: Metadata = {
- title: { default: "Time off · Kargul", template: "%s · Kargul" },
+ title: { default: "Time off · Kargul Workspace", template: "%s · Kargul Workspace" },
description: "Plan time off, track leave requests and manage your work calendar.",
};
diff --git a/src/lib/seed.ts b/src/lib/seed.ts
index 90f563d..d611719 100644
--- a/src/lib/seed.ts
+++ b/src/lib/seed.ts
@@ -6,7 +6,7 @@ export const DESIGN_DATE = "2026-11-10";
/** Used only for server rendering; the browser swaps in the real date on hydration. */
export const SERVER_TODAY = "2026-10-26";
-export const STATE_VERSION = 2;
+export const STATE_VERSION = 3;
const h = (hours: number, minutes = 0) => hours * 60 + minutes;
@@ -15,7 +15,7 @@ export function createSeed(): AppState {
version: STATE_VERSION,
workspaceId: "ws-main",
workspaces: [
- { id: "ws-main", name: "Kargul" },
+ { id: "ws-main", name: "Kargul Workspace" },
{ id: "ws-acme", name: "Acme Studio" },
{ id: "ws-personal", name: "Personal" },
],
diff --git a/src/stores/app-store.ts b/src/stores/app-store.ts
index fab8421..868a4d3 100644
--- a/src/stores/app-store.ts
+++ b/src/stores/app-store.ts
@@ -404,9 +404,11 @@ export const useAppStore = create<AppStore>()(
skipHydration: true,
migrate: (persisted, version) => {
const s = persisted as AppState;
- // v2: the main workspace was renamed from "Workspace" to "Kargul".
- if (version < 2) {
- s.workspaces = s.workspaces.map((w) => (w.id === "ws-main" && w.name === "Workspace" ? { ...w, name: "Kargul" } : w));
+ // v3: the main workspace is "Kargul Workspace" (was "Workspace", then "Kargul").
+ if (version < 3) {
+ s.workspaces = s.workspaces.map((w) =>
+ w.id === "ws-main" && (w.name === "Workspace" || w.name === "Kargul") ? { ...w, name: "Kargul Workspace" } : w,
+ );
}
return { ...s, version: STATE_VERSION };
},
@@ -421,4 +423,4 @@ export const useAppStore = create<AppStore>()(
/** Read-only selector for the active workspace name. */
export const selectWorkspaceName = (s: AppStore) =>
- s.workspaces.find((w) => w.id === s.workspaceId)?.name ?? "Kargul";
+ s.workspaces.find((w) => w.id === s.workspaceId)?.name ?? "Kargul Workspace";