Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

Commit 6334c17

Browse files
committed
refactor(frontend): migrate desktop app to solid
1 parent 03b7b85 commit 6334c17

147 files changed

Lines changed: 5143 additions & 25275 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
# Repository Guidelines
22

33
## Project Structure & Module Organization
4-
- `app/`: Next.js App Router pages, layouts, and global styles (`app/globals.css`, `app/editor-theme.css`).
5-
- `components/`: shared UI components and providers.
6-
- `hooks/`: reusable React hooks (keep hook names `useThing`).
7-
- `lib/`: utilities and shared helpers.
8-
- `public/`: static assets served by Next.js.
9-
- `test/`: unit and visual tests plus utilities and setup.
10-
- `src-tauri/`: Tauri desktop shell and Rust configuration.
4+
- `src/`: Solid frontend application.
5+
- `src/components/`: shared Solid UI and feature components.
6+
- `src/routes/`: route-level screens and global route styles.
7+
- `src/state/`: app state stores.
8+
- `src/lib/`: utilities, Tauri helpers, markdown helpers, and i18n.
9+
- `public/`: static assets served by Vite.
10+
- `src-tauri/`: Tauri desktop shell and Rust commands.
11+
- `test/`: Vitest and Playwright coverage, helpers, and docs.
1112

1213
## Build, Test, and Development Commands
13-
- `pnpm dev`: start the Next.js dev server (Turbopack).
14-
- `pnpm build`: production build.
15-
- `pnpm start`: serve the production build.
16-
- `pnpm lint`: run ESLint (`next lint`).
14+
- `pnpm dev`: start the Solid + Vite dev server.
15+
- `pnpm build`: production build and TypeScript check.
16+
- `pnpm start`: preview the production build.
17+
- `pnpm lint`: run TypeScript checking.
1718
- `pnpm test`: run Vitest once.
1819
- `pnpm test:watch`: Vitest watch mode.
1920
- `pnpm test:ui`: Vitest UI.
2021
- `pnpm test:visual`: Playwright visual regression tests.
2122
- `pnpm test:visual:ui`: Playwright UI runner.
22-
- `npx tsx test/run-all-tests.ts`: run the full test suite with reporting.
23+
- `pnpm tauri dev`: run the desktop shell in development.
24+
- `pnpm tauri build`: build the desktop app.
2325

2426
## Coding Style & Naming Conventions
25-
- TypeScript + React (Next.js). Follow existing file patterns and keep diffs minimal.
26-
- Indentation: 2 spaces in TS/TSX; align JSX props vertically when multi-line.
27-
- Components: `PascalCase` exports; files are typically kebab-case (match the folder).
28-
- Hooks: functions named `useThing`, stored in `hooks/`.
29-
- Linting: follow ESLint rules from `eslint.config.mjs`; fix lint before PRs.
27+
- TypeScript + Solid. Keep diffs focused and consistent with nearby files.
28+
- Indentation: 2 spaces in TS/TSX and CSS.
29+
- Components: `PascalCase` exports; filenames are typically kebab-case or grouped by feature.
30+
- Shared state lives in `src/state/`; generic helpers live in `src/lib/`.
31+
- Prefer small composable helpers over framework-heavy abstractions.
3032

3133
## Testing Guidelines
32-
- Unit tests live in `test/components/*.test.tsx` (Vitest + React Testing Library).
33-
- Visual regression tests live in `test/visual/*.spec.ts` (Playwright).
34-
- Use `test/setup.ts` and `test/utils/` for shared helpers.
35-
- If visuals change intentionally, update snapshots: `pnpm test:visual --update-snapshots`.
34+
- Unit and integration tests live in `test/components`, `test/hooks`, and `test/lib`.
35+
- Visual regression tests live in `test/visual/*.spec.ts`.
36+
- Use `test/setup.ts` and `test/utils/` for shared test setup.
37+
- If visuals change intentionally, update snapshots with `pnpm test:visual --update-snapshots`.
38+
- WebKit snapshots are optional locally and can be enabled with `PLAYWRIGHT_ENABLE_WEBKIT=1`.
3639

3740
## Commit & Pull Request Guidelines
3841
- Commit messages follow conventional commits: `type(scope): subject`.
39-
Examples: `chore(deps): ...`, `ci(test): ...`.
40-
- PRs should include: a concise description, linked issue (if any), and screenshots for UI changes.
41-
- Note test coverage in the PR body (e.g., `pnpm test`, `pnpm test:visual`).
42+
- PRs should include a concise description, linked issue if any, and screenshots for UI changes.
43+
- Mention validation in the PR body, for example `pnpm test`, `pnpm test:visual`, or `pnpm build`.
4244

4345
## Configuration Notes
44-
- App config is in `next.config.ts`; tooling config in `vitest.config.ts` and `playwright.config.ts`.
45-
- Prefer `pnpm` for dependency changes; keep `pnpm-lock.yaml` in sync.
46+
- Frontend config lives in `vite.config.ts`, `vitest.config.ts`, and `playwright.config.ts`.
47+
- Tauri config lives in `src-tauri/tauri.conf.json` and `src-tauri/Cargo.toml`.
48+
- Prefer `pnpm` for dependency changes and keep `pnpm-lock.yaml` in sync.

0 commit comments

Comments
 (0)