npm install
cd src-tauri && cargo generate-lockfile
npm run tauri:devFor production builds:
npm run build
npm run tauri:buildFrontend:
npm run buildRust:
cd src-tauri
cargo test
cargo fmt -- --check
cargo clippy -- -D warningssrc-tauri/Cargo.lock is committed for reproducible application builds. Regenerate it when Rust dependencies change.
There is currently no dedicated frontend test script in package.json. For frontend-only logic, prefer adding narrowly scoped tests before larger refactors rather than relying only on manual checks.
- Identify the affected layers before editing: UI, Tauri command boundary, database, AI/processor, watcher/snipping.
- Trace the existing flow from the user action back to
invoke(...), the Tauri command, and the database or background service. - Update shared types and constants early so mismatches fail fast.
- Make the smallest coherent change across both layers.
- Run the relevant validation commands.
- Update docs when behavior, setup, or architecture changes.
- Update
Settingsinsrc-tauri/src/db.rs - Ensure the schema setup in
Database::run_migrations()handles the field - Expose the field through
get_settingsandupdate_settings - Update
src/components/Settings.tsx - If the setting maps to an OS capability such as launch-on-login, also update the relevant Tauri plugin setup and permissions
- If first-run behavior changes, update onboarding too
- Add or update the Tauri command in
src-tauri/src/commands.rs - Return a shape that matches
src/types/index.ts - Invoke it from the frontend with explicit error handling
- If the action changes app state asynchronously, emit an event or trigger a reload path
- Update prompt/schema logic in
src-tauri/src/ai.rs - Keep
AnalysisResultparsing strict - Check the processor logic in
src-tauri/src/processor.rs - Verify how categories and fallback task creation behave after the change
- Manually test with a real screenshot in
npm run tauri:dev
- Update runtime schema creation in
src-tauri/src/db.rs - Keep any relevant SQL files in
src-tauri/migrations/or root reference SQL files in sync - Avoid destructive resets or assumptions about empty user data
- Check existing queries that read/write the changed columns
- Update
src-tauri/src/watcher.rsorsrc-tauri/src/snipping.rs - Manually test duplicate file events, pending-review flow, and window focus behavior
- Verify platform-specific assumptions, especially on Windows
- Do not edit generated output in
dist/,src-tauri/target/, or dependencies innode_modules/ - Do not commit local development state such as
.claude/settings.local.json,target/, orsrc-tauri/dev.db - Prefer touching only the files needed for the feature
- Preserve local-first behavior and conservative automation defaults unless the feature explicitly changes them
- If docs are wrong after the feature lands, fix them in the same change