diff --git a/.geminiignore b/.geminiignore new file mode 100644 index 000000000..d34c2ef7e --- /dev/null +++ b/.geminiignore @@ -0,0 +1,21 @@ +.git/ +node_modules/ +vendor/ +dist/ +build/ +.next/ +*.log +.DS_Store + +# Performance Optimization: Ignore large generated files and caches +pnpm-lock.yaml +go.sum +package-lock.json +yarn.lock +.pnpm-store/ +.cache/ +.turbo/ +coverage/ +.vercel/ +.netlify/ +.expo/ diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 5800f54d9..4d9d68357 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -6,11 +6,14 @@ on: - "v*" workflow_dispatch: +# Set GITHUB_TOKEN permissions to allow deployment to GitHub Pages permissions: contents: write pages: write id-token: write +# Allow only one concurrent deployment, skipping runs between the currently running and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: pages cancel-in-progress: false @@ -24,7 +27,7 @@ jobs: uses: actions/checkout@v4 with: ref: main - fetch-depth: 0 + fetch-depth: 0 # Not needed if lastUpdated is not enabled - name: Setup Node uses: actions/setup-node@v4 diff --git a/.gitignore b/.gitignore index d15e6eea0..2fb2cba6d 100644 --- a/.gitignore +++ b/.gitignore @@ -88,6 +88,7 @@ Thumbs.db # Temporary files *.tmp *.temp +*.bak .cache/ tmp/ @@ -109,3 +110,9 @@ data _main-ref/ .toolkit/ /scripts/vendor +design-env/ +GEMINI.md +Design*.md +design*.md +detail-design-2.0-docs/ +.gemini/settings.json diff --git a/.husky/check-go b/.husky/check-go index 1ebe32e15..c72513fdb 100644 --- a/.husky/check-go +++ b/.husky/check-go @@ -2,5 +2,10 @@ export PATH="$HOME/.local/share/mise/shims:$HOME/.local/bin:$HOME/.npm-global/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" +if ! command -v golangci-lint >/dev/null 2>&1; then + echo "golangci-lint not found, skipping Go lint..." + exit 0 +fi + echo "Check Go lint..." golangci-lint run ./... diff --git a/.husky/check-go-test b/.husky/check-go-test index d8335ca05..e0de38a48 100644 --- a/.husky/check-go-test +++ b/.husky/check-go-test @@ -2,5 +2,10 @@ export PATH="$HOME/.local/share/mise/shims:$HOME/.local/bin:$HOME/.npm-global/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" +if ! command -v go >/dev/null 2>&1; then + echo "go not found, skipping Go test..." + exit 0 +fi + echo "Check Go test..." go test ./... diff --git a/apps/desktop/AGENTS.md b/apps/desktop/AGENTS.md index 646eb20f5..59259f5d4 100644 --- a/apps/desktop/AGENTS.md +++ b/apps/desktop/AGENTS.md @@ -138,11 +138,25 @@ typecheck. real `exports` field. So bundle behaviour is unchanged; only `vue-tsc` follows the stubs. +The typecheck import graph must still mirror the runtime import graph. When +desktop reuses workspace package exports, source files must import through +the same public module specifiers that Vite bundles at runtime, and the +renderer stubs must model that same surface. Do not paper over `vue-tsc` +errors by swapping imports to aliases or private source paths unless both +Vite and `tsconfig.web.json` intentionally resolve that specifier to the +same module. A resolver mismatch can make one pipeline pass while the other +fails, or make typecheck validate a different module than the one packaged +at runtime. + When you add a new `@memohai/web/*` import in the desktop renderer, add a matching `declare module` to `web-stubs.d.ts`. The wildcard `declare module '@memohai/web/*.vue'` already covers any `.vue` SFC reached through the wildcard `./*` export. +When you import a new component directly from `@memohai/ui`, add that +component to `ui-stubs.d.ts` as well. The package may export it correctly, +but desktop's renderer typecheck only sees the stubbed surface. + ## Multi-Window Lifecycle ### Main process (`src/main/index.ts`) @@ -552,6 +566,14 @@ list to check. - **Update both `tsconfig.web.json` paths and `web-stubs.d.ts`** when adding a new `@memohai/web/foo` import. Forgetting the stub yields `TS2307: Cannot find module` even though the bundle works. +- **Keep typecheck resolution and runtime resolution isomorphic.** Desktop + renderer code must import reused workspace modules through the same public + specifiers that Vite bundles at runtime, then model that surface in the + stubs. Do not mix in alternate aliases or private source paths unless both + Vite and `tsconfig.web.json` intentionally resolve them to the same target. +- **Update `ui-stubs.d.ts` for direct `@memohai/ui` imports.** A component + exported by the real UI package still needs to exist in the desktop stub + if desktop imports it directly. - **Run `pnpm --filter @memohai/desktop typecheck` after every renderer change.** It's fast (only types desktop's own code thanks to the stubs) and catches the common drift cases (missing stub, wrong store/component diff --git a/apps/desktop/src/renderer/src/settings/App.vue b/apps/desktop/src/renderer/src/settings/App.vue index cb724c1f6..6af77d669 100644 --- a/apps/desktop/src/renderer/src/settings/App.vue +++ b/apps/desktop/src/renderer/src/settings/App.vue @@ -1,6 +1,13 @@ diff --git a/apps/web/src/components/confirm-popover/index.vue b/apps/web/src/components/confirm-popover/index.vue index 8226730ac..00d5d1ba3 100644 --- a/apps/web/src/components/confirm-popover/index.vue +++ b/apps/web/src/components/confirm-popover/index.vue @@ -4,24 +4,52 @@ - -

- {{ message }} -

-
+ +
+
+
+ +
+
+ {{ title }} +
+
+ +
+ + {{ message }} + +
+
+ +
@@ -40,14 +68,19 @@ import { } from '@memohai/ui' withDefaults(defineProps<{ - message: string + title?: string + message?: string confirmText?: string cancelText?: string loading?: boolean + variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' }>(), { + title: '', + message: '', confirmText: '', cancelText: '', loading: false, + variant: 'default' }) defineEmits<{ diff --git a/apps/web/src/components/master-detail-sidebar-layout/index.vue b/apps/web/src/components/master-detail-sidebar-layout/index.vue index da4fe9e58..deb4d6d1c 100644 --- a/apps/web/src/components/master-detail-sidebar-layout/index.vue +++ b/apps/web/src/components/master-detail-sidebar-layout/index.vue @@ -4,21 +4,34 @@ :default-open="true" > - - - - - - - - - + +
+ +
+ +
+ + + +
+ +
+
+ + + + + +
- - -
@@ -26,9 +39,9 @@ -
+
@@ -78,8 +91,7 @@ import { SidebarProvider, Sidebar, SidebarInset, - ScrollArea, - SidebarMenu + ScrollArea } from '@memohai/ui' import { useSlots } from 'vue' diff --git a/apps/web/src/components/model-capabilities/index.vue b/apps/web/src/components/model-capabilities/index.vue index 819f98212..153e2b252 100644 --- a/apps/web/src/components/model-capabilities/index.vue +++ b/apps/web/src/components/model-capabilities/index.vue @@ -3,7 +3,7 @@ v-for="cap in compatibilities" :key="cap" :title="$t(`models.compatibility.${cap}`, cap)" - class="inline-flex items-center justify-center rounded-md border-0 size-5 shrink-0" + class="inline-flex items-center justify-center rounded-md border size-5 shrink-0 bg-transparent" :class="styleOf(cap)" > = { } const CLASSES: Record = { - 'tool-call': 'bg-capability-tool-soft text-capability-tool-foreground', - 'vision': 'bg-capability-vision-soft text-capability-vision-foreground', - 'image-output': 'bg-capability-image-soft text-capability-image-foreground', - 'reasoning': 'bg-capability-reasoning-soft text-capability-reasoning-foreground', + 'tool-call': 'border-blue-500/30 text-blue-600 dark:border-blue-400/30 dark:text-blue-400', + 'vision': 'border-purple-500/30 text-purple-600 dark:border-purple-400/30 dark:text-purple-400', + 'image-output': 'border-pink-500/30 text-pink-600 dark:border-pink-400/30 dark:text-pink-400', + 'reasoning': 'border-amber-500/30 text-amber-600 dark:border-amber-400/30 dark:text-amber-400', } function iconOf(cap: string): Component { @@ -40,6 +40,6 @@ function iconOf(cap: string): Component { } function styleOf(cap: string): string { - return CLASSES[cap] ?? 'bg-accent text-foreground' + return CLASSES[cap] ?? 'border-border text-foreground' } diff --git a/apps/web/src/components/searchable-select-popover/index.vue b/apps/web/src/components/searchable-select-popover/index.vue index 1e138610f..006279c5b 100644 --- a/apps/web/src/components/searchable-select-popover/index.vue +++ b/apps/web/src/components/searchable-select-popover/index.vue @@ -109,7 +109,7 @@ > {{ option.description }} diff --git a/apps/web/src/components/settings-shell/index.vue b/apps/web/src/components/settings-shell/index.vue index d3a9eab70..11587fe1f 100644 --- a/apps/web/src/components/settings-shell/index.vue +++ b/apps/web/src/components/settings-shell/index.vue @@ -1,6 +1,6 @@