mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-17 19:59:33 +01:00
fix: don't point the image watcher at a remote session's directory
A remote-SSH session's workingDir is a path on the remote host, and the image watcher watched it on the local disk: a folder that is not there, or a same-named local folder whose images then popped up as the remote session's. Same root cause as the Ralph @fix_plan.md watcher fix. Three places start a watch, and all three now skip a remote session: setupSessionListeners(), the app-wide toggle in PUT /api/settings (which re-watches every enabled session), and POST /api/sessions/:id/image-watcher, which refuses to turn it on (INVALID_INPUT, like the Git fetch settings route) and still lets it be turned off. The Session Options row is hidden for a remote session, the way the Git tab is, since the client's _apiPost() does not throw on a refused request.
This commit is contained in:
1 parent
ecf28fa3be
commit
2c2f69adba
5 files changed
+206
-5
No files matched your search
@@ -2709,7 +2709,10 @@ Object.assign(CodemanApp.prototype, {
|
||||
// Git: the session's own choice if it has one, otherwise the app setting. updateGitFetchStatus is also
|
||||
// what SSE calls when a scheduled run lands, so the rows stay current while the modal is open.
|
||||
this.updateGitFetchStatus(sessionId);
|
||||
document.getElementById('modalImageWatcherEnabled').checked = session.imageWatcherEnabled ?? true;
|
||||
const imageWatcherToggle = document.getElementById('modalImageWatcherEnabled');
|
||||
imageWatcherToggle.checked = session.imageWatcherEnabled ?? true;
|
||||
// The server never watches a remote session's directory (it is on another host), so the row is hidden.
|
||||
imageWatcherToggle.closest('.set-row').style.display = session.remote ? 'none' : '';
|
||||
document.getElementById('modalFlickerFilterEnabled').checked = session.flickerFilterEnabled ?? false;
|
||||
|
||||
// Populate session name input with prefix/suffix split
|
||||
|
||||
Reference in new issue
Block a user