Addresses concerns from PR #76 code review:
- Add exception handling for stat() calls to prevent crashes from race
conditions when files are deleted/modified during iteration
- Add 2-second timestamp tolerance for FAT32 filesystem compatibility
(FAT32 has 2-second mtime precision on USB drives/SD cards)
- Add config file checks (package.json, vite.config.ts, tailwind.config.ts,
tsconfig.json, etc.) that also require rebuilds when changed
- Add logging to show which file triggered the rebuild for debugging
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enhance the build_frontend() function to detect when source files have
been modified more recently than the newest file in dist/ directory.
This ensures the UI is rebuilt automatically when source code changes,
preventing stale UI from being served after pulling updates or switching
branches.
Changes:
- Find newest modification time among all files in ui/dist/
- Compare each source file in ui/src/ against newest dist file
- Trigger rebuild if any source file is newer than newest dist file
- Handle edge case when dist/ exists but contains no files
- Prevent serving outdated JavaScript bundles after code changes
This fix applies to all UI launch methods (start_ui.sh, start_ui.bat)
since they all call start_ui.py which contains the build logic.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add CI workflow with Python (ruff lint, security tests) and UI (ESLint, TypeScript, build) jobs
- Add ruff, mypy, pytest to requirements.txt
- Add pyproject.toml with ruff configuration
- Fix import sorting across Python files (ruff --fix)
- Fix test_security.py expectations to match actual security policy
- Remove invalid 'eof' command from ALLOWED_COMMANDS
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>