Skip to content

emrg: remove GUI 'working directory' (project_dir) concept - #888

Merged
argszero merged 1 commit into
masterfrom
feature/gui-remove-workdir
Aug 20, 2026
Merged

argszero merged 1 commit into
masterfrom
feature/gui-remove-workdir

Conversation

@argszero

Copy link
Copy Markdown
Owner

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

  • config.toml [gui] project_dir: no longer read, written, or validated
  • main.js: projectDir variable → fixed DEFAULT_CWD = os.homedir(); fallback cwd for first-launch/session-less IPC = home; skills dir fallback = home; getSettings/saveSettings no longer carry projectDir
  • Settings panel: workdir tab removed (6 → 5 tabs: model/github/appearance/language/about); settings-body-workdir block deleted
  • Welcome page: step 2 'choose a working directory' removed (only API key + default model + save)
  • daemon_client.js: TOKEN_FILE/EMRGD_LOG fixed to canonical ~/.emrg/emrgd.token / ~/.emrg/emrgd.log; projectDir constructor 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)
  • conn-manager.js: projectDir passthrough removed
  • renderer app.js: state.projectDir gone; project_dir_valid startup check gone; sessionProjectName() no-project fallback → 'home'; projectPathFor() no-project fallback → ''
  • dialogs.js / index.html / i18n.js: workdir inputs, tabs, step2, and i18n keys removed
  • Tests: all projectDir/workdir assertions cleaned; the two G129 fallback tests rewritten for the single-canonical-location semantics (honest failure instead of fake reuse)

Verification

  • GUI: 253 tests — 246 pass, 7 integration fail locally by design (CI skips integration; real daemon holds port 56031)
  • pytest: 980 passed + 1 skipped; import + CLI OK
  • grep: no projectDir / project_dir / workdir references left in GUI code (only historical comments)

…-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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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)

@argszero
argszero merged commit 5e2e71f into master Aug 20, 2026
2 checks passed
argszero added a commit that referenced this pull request Aug 20, 2026
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
@argszero
argszero deleted the feature/gui-remove-workdir branch August 23, 2026 02:26
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