Add read-only mode and Windows service support#192
Add read-only mode and Windows service support#192MarioBinder wants to merge 1 commit intogamosoft:mainfrom
Conversation
- Add READ_ONLY flag (env var or config.yaml) that blocks all write operations via write_router with require_write_access dependency - Expose readOnly flag to frontend; hide edit/delete/create/zen-mode buttons and lock to preview mode when active - Block Zen mode entry when read-only is active (button hidden + toggleZenMode guard) - Add run_service.py to run NoteDiscovery as a Windows Service via pywin32 (install/start/stop/remove) - Update run.py to detect Windows Service context, disable --reload and console output - Add pywin32 and psutil to requirements.txt
915374a to
627d8f5
Compare
|
Thanks for the PR, especially the Windows service support effort. For the read-only part, we can already enforce that at deployment level (for example Docker volume mounts with :ro), so we may not need to add app-level read-only logic right now. For Windows service support: this might be somewhat useful, but it's a bit niche, and I'd like to keep it outside core app code (I run it myself under Ubuntu!). Another approach could be to install NoteDiscovery as a Windows service using external tooling (e.g. NSSM or a PowerShell setup script, although untested) that runs I appreciate the contribution but as I mention looks a little too specific to be part of the core stuff (adding dependencies etc etc) IMHO, what do you think? |
|
Thanks for the detailed feedback! To give some context: I'm hosting NoteDiscovery natively on a Windows server (no Docker available in that environment), so the :ro mount approach wasn't an option for me. I tried both NSSM and a PowerShell-based setup to run it as a Windows service, but couldn't get either to work reliably — that's what led me to run_service.py. The read-only mode came from the same context: without Docker, I needed an app-level way to prevent writes on that particular instance. I completely understand if these are too niche/platform-specific for the core codebase. Happy to maintain them as a separate fork for my use case. Thanks again for taking the time to review! |
Summary
Test plan