Skip to content

refactor: additional Nuxt review findings#15

Merged
dinooo13 merged 3 commits intomainfrom
claude/additional-review-fixes
Mar 23, 2026
Merged

refactor: additional Nuxt review findings#15
dinooo13 merged 3 commits intomainfrom
claude/additional-review-fixes

Conversation

@dinooo13
Copy link
Owner

@dinooo13 dinooo13 commented Mar 23, 2026

Summary

Addresses the additional observations from the initial code review (#14). These are deeper structural improvements to align with Nuxt best practices.

Changes

  • Remove unused @vueuse/nuxt — Module was registered but no VueUse composables are used in the codebase. useColorMode is already provided by Nuxt UI.
  • Update compatibilityDate — Bumped from 2024-11-01 to 2025-03-01 to match Nuxt 4.
  • Re-enable @typescript-eslint/no-explicit-any — Was globally disabled but no any usages exist in the codebase. Removed the override to keep the stricter default.
  • Extract usePageSeo composable — Replaces 5 duplicated useSeoMeta({ title, ogTitle, description, ogDescription }) blocks across all pages with a single composable in app/composables/usePageSeo.ts.
  • Extract shared ContentButton typeLabsTeaser and SpeakingTeaser both had identical 7-line inline button types. Moved to app/utils/types.ts and referenced via Nuxt auto-import.
  • Optimize [slug] page queries — Both labs/[slug].vue and speaking/[slug].vue were fetching ALL entries, sorting, then filtering by slug. Now they query directly by stem which is more efficient.
  • Add defineOgImage() — The nuxt-og-image module was installed but never activated. Added defineOgImage() to all 5 pages so OG images are generated from page meta.
  • Document deploy workflow — Added a comment explaining why dangerous-clean-slate: true is used in the FTP deploy step.

Test plan

  • pnpm run lint passes
  • pnpm run typecheck passes
  • Verify all pages still render correctly
  • Verify OG images are generated at /__og-image__/ routes
  • Verify content queries by stem resolve correctly for all lab and talk detail pages

https://claude.ai/code/session_01D9Js2socgpErtmsWh88fMj

- Remove unused @vueuse/nuxt module and dependency
- Update compatibilityDate to 2025-03-01 for Nuxt 4
- Re-enable @typescript-eslint/no-explicit-any (no violations found)
- Extract usePageSeo composable to deduplicate SEO meta across pages
- Extract shared ContentButton type to replace duplicated inline types
- Optimize [slug] pages to query by stem instead of fetching all entries
- Add defineOgImage() to all pages for proper OG image generation
- Document dangerous-clean-slate rationale in deploy workflow

https://claude.ai/code/session_01D9Js2socgpErtmsWh88fMj
@dinooo13 dinooo13 force-pushed the claude/additional-review-fixes branch from eacbce3 to 30415f9 Compare March 23, 2026 22:15
@dinooo13
Copy link
Owner Author

@claude fix the lint

Copy link
Owner Author

Fixed! The lint failure was @typescript-eslint/prefer-nullish-coalescing — the || operators in usePageSeo.ts and speaking/[slug].vue were flagged because the operands are optional strings. Replaced with ?? in both places.

@dinooo13 dinooo13 merged commit a579e75 into main Mar 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants