From 30e5e698b945541906e86e6b6576ee2eda7f3664 Mon Sep 17 00:00:00 2001 From: Roman Trashutin Date: Tue, 21 Jul 2026 20:38:44 +0300 Subject: [PATCH 01/12] chore(utils): remove dead utilities and unused dependency - Delete app/utils/tanstack-table.ts (valueUpdater had zero callers) - Delete app/utils/tw-helper.ts (tw() identity tag never invoked) - Remove getFirstLetters() from strings.ts (exported, never called) - Remove @tanstack/vue-table dep (only imported by now-deleted file) --- app/utils/strings.ts | 16 ---------------- app/utils/tanstack-table.ts | 6 ------ app/utils/tw-helper.ts | 4 ---- package.json | 1 - pnpm-lock.yaml | 3 --- 5 files changed, 30 deletions(-) delete mode 100644 app/utils/tanstack-table.ts delete mode 100644 app/utils/tw-helper.ts diff --git a/app/utils/strings.ts b/app/utils/strings.ts index ebda00d..6422a23 100644 --- a/app/utils/strings.ts +++ b/app/utils/strings.ts @@ -15,19 +15,3 @@ export function capitalize(str: string): string { if (!str) return "" return str.charAt(0).toUpperCase() + str.slice(1) } - -/** - * Returns up to the first two uppercase initials of a (whitespace-separated) - * string. Useful for avatar fallbacks. - * - * Examples: - * getFirstLetters("Ivan") -> "I" - * getFirstLetters("Ivan Petrov") -> "IP" - * getFirstLetters("") -> "" - */ -export function getFirstLetters(str: string): string { - if (!str) return "" - const words = str.split(" ") - if (words.length === 1 && words[0]) return words[0].charAt(0).toUpperCase() - return `${words[0]?.charAt(0).toUpperCase() ?? ""}${words[1]?.charAt(0).toUpperCase() ?? ""}` -} diff --git a/app/utils/tanstack-table.ts b/app/utils/tanstack-table.ts deleted file mode 100644 index 0e856a0..0000000 --- a/app/utils/tanstack-table.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Updater } from "@tanstack/vue-table" -import type { Ref } from "vue" - -export function valueUpdater>(updaterOrValue: T, ref: Ref) { - ref.value = typeof updaterOrValue === "function" ? updaterOrValue(ref.value) : updaterOrValue -} diff --git a/app/utils/tw-helper.ts b/app/utils/tw-helper.ts deleted file mode 100644 index cf1414c..0000000 --- a/app/utils/tw-helper.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Utility function to return Tailwind CSS classes. - */ -export const tw = (tailwindClasses: T) => tailwindClasses diff --git a/package.json b/package.json index aa54553..01d3c82 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,6 @@ "@tailwindcss/vite": "^4.3.2", "@tanstack/query-persist-client-core": "^5.101.2", "@tanstack/vue-query": "^5.101.2", - "@tanstack/vue-table": "^8.21.3", "@unhead/vue": "^2.0.3 || ^3.0.0", "@vueuse/core": "^14.3.0", "@vueuse/nuxt": "^14.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 714873e..0847a75 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,9 +52,6 @@ importers: "@tanstack/vue-query": specifier: ^5.101.2 version: 5.101.2(vue@3.5.39(typescript@5.9.3)) - "@tanstack/vue-table": - specifier: ^8.21.3 - version: 8.21.3(vue@3.5.39(typescript@5.9.3)) "@unhead/vue": specifier: ^2.0.3 || ^3.0.0 version: 2.1.15(vue@3.5.39(typescript@5.9.3)) From d2f55d5efd58a80631a88946f06c96751db11754 Mon Sep 17 00:00:00 2001 From: Roman Trashutin Date: Mon, 17 Aug 2026 16:06:45 +0300 Subject: [PATCH 02/12] fix(stores): migrate filters store to useStorage + skipHydrate pattern Replace manual localStorage.getItem/setItem calls in stores/filters.ts with useStorage() + skipHydrate(), consistent with schedule.ts / settings.ts / links.ts. - storageKey ref drives reactive key re-binding when schedule changes - Custom serializer preserves existing parse/validate logic (ensureArray guards) - Remove saveFilters() (no longer needed; useStorage writes automatically) - index.vue: migrate 'op-first-visit-seen' to STORAGE_KEYS.firstVisitSeen ('mindenit:first-visit-seen'), wrap with skipHydrate() to prevent SSR mismatch - constants/storage.ts: add firstVisitSeen key to registry --- app/constants/storage.ts | 3 +++ app/pages/index.vue | 4 ++- app/stores/filters.ts | 56 +++++++++++++++++++--------------------- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/app/constants/storage.ts b/app/constants/storage.ts index 8053847..c5525ab 100644 --- a/app/constants/storage.ts +++ b/app/constants/storage.ts @@ -35,6 +35,9 @@ export const STORAGE_KEYS = { // Maintenance bypass cookie (set via /maintenance dev access flow) devAccess: "mindenit:dev-access", + // One-time first-visit tracking (set true after first-ever page load) + firstVisitSeen: "mindenit:first-visit-seen", + // Analytics consent ("accepted" | "declined" | null means not yet decided) analyticsConsent: "mindenit:analytics-consent", diff --git a/app/pages/index.vue b/app/pages/index.vue index 0da7af2..b72e9e7 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,4 +1,5 @@ diff --git a/app/components/DialogManager.vue b/app/components/DialogManager.vue index e6ea1c0..4e8ab62 100644 --- a/app/components/DialogManager.vue +++ b/app/components/DialogManager.vue @@ -1,4 +1,4 @@ - +