From 61332c28ef1eb5ec13279e0058908904244a71a8 Mon Sep 17 00:00:00 2001 From: Michael Winter Date: Wed, 18 Feb 2026 17:34:37 +0100 Subject: [PATCH] Upgrade to Nuxt 4 and fix icon issues - Upgrade from Nuxt 3.6.0 to Nuxt 4.3.1 - Replace nuxt-icon with @nuxt/icon (Nuxt 4 compatible) - Install missing icon collections (@iconify-json/ion, heroicons, etc.) - Fix icon colors: use style instead of color prop - Add AGENTS.md with coding guidelines - Fix icon alignment in index.vue (items-center) --- AGENTS.md | 131 ++++++++++++++++++++ components/Collapsible/Collapsible.vue | 2 +- components/Collapsible/CollapsibleGroup.vue | 1 - components/IconButton.vue | 16 +-- nuxt.config.ts | 3 +- package.json | 30 +++-- pages/index.vue | 4 +- 7 files changed, 162 insertions(+), 25 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e798538 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,131 @@ +# AGENTS.md - Agent Coding Guidelines + +This document provides guidelines for agents working on this codebase. + +## Project Overview + +- **Framework**: Nuxt 3 (Vue 3) +- **Styling**: Tailwind CSS +- **State Management**: Pinia +- **UI Components**: Headless UI + Nuxt Icon +- **Image Handling**: @nuxt/image +- **TypeScript**: Enabled (tsconfig extends .nuxt/tsconfig.json) +- **Storybook**: Available for component documentation + +## Build Commands + +```bash +# Development +npm run dev # Start development server +npm run build # Build for production +npm run generate # Generate static site (SSG) +npm run preview # Preview production build + +# No test framework configured +``` + +## Code Style Guidelines + +### General Conventions + +- Use Vue 3 Composition API with ` + + +``` + +### Tailwind CSS + +- Use Tailwind utility classes for all styling +- Common classes used: `flex`, `grid`, `fixed`, `relative`, `z-*`, `p-*`, `m-*`, `text-*`, etc. + +### API Routes (Server) + +```typescript +// server/api/example.ts +export default defineEventHandler((event) => { + // Handle request and return data +}) +``` + +### Store Patterns (Pinia) + +```javascript +// stores/ExampleStore.js +import { defineStore } from "pinia" + +export const useExampleStore = defineStore("ExampleStore", { + state: () => ({ count: 0 }), + actions: { + increment() { + this.count++ + } + } +}) +``` + +### Error Handling + +- Use try/catch in API routes +- Return appropriate HTTP status codes +- Handle undefined/null values gracefully + +### Imports + +- Vue/composables: Use Nuxt auto-imports (no import needed) +- External modules: Explicit import +- Server-only: Place in `/server/` directory +- Path aliases: `@/` maps to project root + +### Additional Notes + +- Project uses Storybook (`.stories.ts` files) for component documentation +- Environment variables should use `.env` files (not committed) +- Image domains configured for `unboundedpress.org` in nuxt.config.ts diff --git a/components/Collapsible/Collapsible.vue b/components/Collapsible/Collapsible.vue index e74556d..a0761ba 100644 --- a/components/Collapsible/Collapsible.vue +++ b/components/Collapsible/Collapsible.vue @@ -75,7 +75,7 @@ const toggle = () => { diff --git a/components/Collapsible/CollapsibleGroup.vue b/components/Collapsible/CollapsibleGroup.vue index 0e71617..5951002 100644 --- a/components/Collapsible/CollapsibleGroup.vue +++ b/components/Collapsible/CollapsibleGroup.vue @@ -1,7 +1,6 @@