Fast Desktop Testing
This skill documents the "one-click" developer workflows for testing the Vector Bookshelf desktop app.
Workflows
1. Desktop Dev Run (.agent/workflows/desktop_dev_run.md)
When to use:
- •Rapid UI testing/debugging.
- •When you want to see changes immediately (if hot-reload is active) or just restart quickly.
- •Uses
npm start(which runselectron .) on the source files.
Expected Behavior:
- •Electron launches directly from the
apps/desktopsource. - •It loads the URL specified in
main.js(usuallyhttp://localhost:3001or file path).
2. Desktop Pack Run (.agent/workflows/desktop_pack_run.md)
When to use:
- •Verifying the "production" behavior without building an installer.
- •Testing
preloadscripts, file access, orasarpackaging issues. - •Checking if new features work in the packaged environment.
Expected Behavior:
- •Runs
electron-builder --dirto update thedist/win-unpackedfolder. - •Launches
Vector Bookshelf.exe.
Troubleshooting
Common Failures
- •
"npm run dev" missing
- •The workflow attempts to run
npm run dev. If that script was removed, checkapps/desktop/package.json. - •Fix: Use
npm startmanually or restore the script.
- •The workflow attempts to run
- •
White Screen / API Error
- •Ensure the backend API is running (
npm run apiornode src/server/index.js) if usage requires it. - •The desktop app often expects the API to be available at
http://localhost:3001.
- •Ensure the backend API is running (
- •
"dist/win-unpacked" not found
- •If
Desktop Pack Runfails to launch, the pack step might have failed. - •Check the terminal output for
electron-buildererrors (file locks are common). - •Fix: Close any running instances of the app and retry.
- •If
If it fails completely
- •Open
apps/desktop/package.json. - •Inspect the
scriptssection. - •Manually run the equivalent command:
- •Dev:
cd apps/desktop && npm start - •Pack:
cd apps/desktop && npm run pack
- •Dev: