From 292ac98200e23b451dbdbe42ef7e15d90d9f18cb Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Mar 2026 21:53:39 +0000 Subject: [PATCH 1/2] refactor: apply Nuxt best practices and clean code improvements - Remove unnecessary explicit imports (leverage Nuxt auto-imports for utils and components) - Extract duplicate getTimestamp into shared utils/date.ts - Fix dead conditional in TalkPreviewCard (identical branches) - Fix non-null assertion mixed with optional chaining in Hero.vue - Extract repeated Motion animation config into constants in Hero.vue - Add error handling to clipboard utility - Replace raw with for image optimization - Use stable keys instead of array index in v-for loops - Add build validation step to CI workflow https://claude.ai/code/session_01D9Js2socgpErtmsWh88fMj --- .github/workflows/ci.yml | 3 + app/components/AppFooter.vue | 4 +- app/components/LabCard.vue | 2 - app/components/landing/Hero.vue | 95 ++++++----------------- app/components/landing/LabsTeaser.vue | 2 - app/components/landing/SpeakingTeaser.vue | 4 - app/components/talks/TalkPreviewCard.vue | 4 +- app/pages/index.vue | 3 - app/pages/labs/[slug].vue | 7 +- app/pages/labs/index.vue | 2 - app/pages/speaking/[slug].vue | 2 - app/pages/speaking/index.vue | 3 - app/utils/clipboard.ts | 2 + app/utils/date.ts | 9 +++ app/utils/labs.ts | 8 +- app/utils/speaking.ts | 10 --- 16 files changed, 43 insertions(+), 117 deletions(-) create mode 100644 app/utils/date.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58d9ce9..2d2e1b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,3 +32,6 @@ jobs: - name: Typecheck run: pnpm run typecheck + + - name: Build + run: pnpm run generate diff --git a/app/components/AppFooter.vue b/app/components/AppFooter.vue index 66fabfb..098e2ec 100644 --- a/app/components/AppFooter.vue +++ b/app/components/AppFooter.vue @@ -7,8 +7,8 @@ const { footer } = useAppConfig()
diff --git a/app/components/LabCard.vue b/app/components/LabCard.vue index 086ccdd..2d0e91a 100644 --- a/app/components/LabCard.vue +++ b/app/components/LabCard.vue @@ -1,6 +1,4 @@