emrg: remove GUI 'working directory' (project_dir) concept - #888
Conversation
…-08-20T16:03:31) Host design-finalized: the GUI's global project_dir is useless — a session's real cwd is its project path (projectPath, P5 slice 2). Remove the concept; keep cwd semantics (real project dir per session). - config.toml [gui] project_dir: no longer read/written/validated - GUI fallback cwd fixed to os.homedir() (DEFAULT_CWD in main.js) - Settings panel: workdir tab removed (6 → 5 tabs); settings-body-workdir block deleted - Welcome page: step 2 'choose a working directory' removed - daemon_client: TOKEN_FILE/EMRGD_LOG fixed to canonical ~/.emrg/emrgd.token and ~/.emrg/emrgd.log — projectDir parameter and G129 fallback logic removed (emrgd.token is the sole canonical location since #884) - conn-manager: projectDir passthrough removed - renderer app.js: state.projectDir gone; project_dir_valid startup check gone; sessionProjectName fallback → 'home'; projectPathFor fallback → '' - dialogs/i18n/index.html: workdir inputs, tabs, step2 and keys removed - Tests: 45 daemon_client + 16 i18n + 246 unit green (7 integration fail locally by design); pytest 980 passed + 1 skipped; import + CLI OK
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 1 (12 files: GUI project_dir concept removed — DEFAULT_CWD=home, daemon_client fixed to canonical ~/.emrg/emrgd.token, settings 5 tabs, welcome no step2, app.js home/'' fallbacks; GUI 246 unit + pytest 980 green, test + test-windows CI PASS)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 2 (independent re-review: head unchanged, 12 files −277/+161, GUI project_dir concept cleanly removed with canonical token path; GUI 246 unit + pytest 980 green, test + test-windows CI PASS)
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 3 (independent re-review: 12 files −277/+161, GUI project_dir concept fully removed — DEFAULT_CWD=home, daemon_client reads canonical ~/.emrg/emrgd.token only (G129 fallback gone), settings 5 tabs, welcome no step2, home/'' fallbacks in app.js; GUI 246 unit + pytest 980 green, test + test-windows CI PASS)
Remove the GUI's global 'working directory' (project_dir) concept, per host design-finalized rant 2026-08-20T16:03:31. A session's real cwd is its project path (projectPath); the global project_dir was only a fallback for no-project contexts — the host confirmed it is useless.
Changes
[gui] project_dir: no longer read, written, or validatedprojectDirvariable → fixedDEFAULT_CWD = os.homedir(); fallback cwd for first-launch/session-less IPC = home; skills dir fallback = home;getSettings/saveSettingsno longer carry projectDirsettings-body-workdirblock deletedTOKEN_FILE/EMRGD_LOGfixed to canonical~/.emrg/emrgd.token/~/.emrg/emrgd.log;projectDirconstructor param and G129 fallback logic removed (emrgd.token is the sole canonical location since emrg: daemon auth credentials emrgd.port → emrgd.token — single-line token, constant port (rant 2026-08-20T14:32:52) #884)state.projectDirgone;project_dir_validstartup check gone;sessionProjectName()no-project fallback → 'home';projectPathFor()no-project fallback → ''Verification