diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..f461576 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,30 @@ +# Agent Guide + +This is a Vue3 application that runs on GitHub Pages to collect feedback from users. +Originally designed for Web Extension Uninstall feedback, but also used for General Feedback. + +- TypeScript 6 with Vue 3.5 +- Bootstrap 5.3 and FontAwesome + +## Project Structure + +### Files + +- `wxt.config.ts` - WXT Config and Extension Manifest +- `src/components/FeedbackForm.vue` Feedback Form + +## Commands + +ALWAYS use the `npm run *` command NEVER pipe output into arbitrary truncation commands. + +| Command | What it does | +| ------------------ | -------------------------------- | +| `npm run build` | `npm run tsc && vite build` | +| `npm run lint` | `eslint . --cache --fix` ESLint | +| `npm run tsc` | `vue-tsc --noEmit` TS Check Only | +| `npm run prettier` | ALWAYS RUN AFTER EDITING FILES | + +## Follow Existing Patterns + +Before adding or modifying any feature, search the codebase for the closest existing implementation and follow its full integration chain. +Do not stop after writing the core logic — trace every file that touches the feature (imports, registration, configuration, UI binding) and ensure each is accounted for. diff --git a/package.json b/package.json index dbbf021..445453b 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "dev": "vite", "lint": "eslint . --cache --fix", "lint:check": "eslint . --cache", + "prettier": "npm run prettier:write", "prettier:write": "npx prettier --write .", "prettier:check": "npx prettier --check .", "preview": "vite preview", diff --git a/src/router/index.ts b/src/router/index.ts index 1d018a2..91463e8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,5 +1,6 @@ import { createRouter, createWebHistory } from 'vue-router' import HomeView from '../views/HomeView.vue' +import { apps } from '@/config/apps.ts' // https://router.vuejs.org/guide/ const router = createRouter({ @@ -21,6 +22,14 @@ const router = createRouter({ component: HomeView, meta: { hideHeader: true, hideFooter: true }, }, + { + // Path based app routing: /feedback/zipline-android + // Custom regex only matches known app ids from src/config/apps.ts + path: `/:appName(${Object.keys(apps).join('|')})`, + name: 'app', + component: HomeView, + meta: { hideHeader: true, hideFooter: true }, + }, { path: '/about', name: 'about', diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index fe725b3..23d901e 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,15 +1,20 @@