Skip to content

feat: add serverOnlyFileWatching user setting#788

Open
AnrokX wants to merge 1 commit intomainfrom
feature/server-only-file-watching
Open

feat: add serverOnlyFileWatching user setting#788
AnrokX wants to merge 1 commit intomainfrom
feature/server-only-file-watching

Conversation

@AnrokX
Copy link
Collaborator

@AnrokX AnrokX commented Feb 23, 2026

Summary

  • Adds a serverOnlyFileWatching boolean user setting (default: false) that controls whether nodemon watches only server/ files or the full project tree
  • When enabled, pulling client-only changes (CSS, HTML, JS) won't restart the server -- just refresh the browser
  • New launcher script scripts/dev-server.js reads user-settings.json at startup and conditionally passes --watch server/ --watch .env to nodemon
  • Settings panel toggle added under a new "Developer" section in the UI

Changed files

  • server/userSettingsService.js -- new default + merge handling for global.serverOnlyFileWatching
  • user-settings.default.json -- new default entry
  • scripts/dev-server.js -- new launcher script (replaces direct nodemon call)
  • package.json -- dev:server now uses the launcher
  • client/index.html -- new "Developer" settings section with toggle
  • client/app.js -- event listener + syncUserSettingsUI for the toggle

Test plan

  • Toggle off (default): node scripts/dev-server.js --dry-run shows serverOnlyFileWatching: false and no --watch flags
  • Toggle on: set "serverOnlyFileWatching": true in user-settings.json, re-run dry-run to see --watch server/ --watch .env
  • Open Settings panel in browser and verify "Server-only file watching" toggle appears under "Developer" section
  • Flip the toggle and verify it persists via GET /api/user-settings
  • node --check server/index.js passes

Generated with Claude Code

Adds a toggle to control whether nodemon watches only server/ files
or the entire project tree. When enabled, pulling client-only changes
(CSS, HTML, JS) won't restart the server -- just refresh the browser.

- New `global.serverOnlyFileWatching` boolean in user-settings (default: false)
- Launcher script `scripts/dev-server.js` reads the setting at startup
  and passes `--watch server/ --watch .env` to nodemon when enabled
- Settings panel toggle under new "Developer" section
- Updated `dev:server` script to use the launcher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant