Skip to content

emrg: GUI new-session dialog + delete-project protected guard — P5 slice 2 (GUI multi-session rant P5) - #642

Merged
argszero merged 2 commits into
masterfrom
feature/gui-p5-slice2-new-session-delete-project
Aug 10, 2026
Merged

emrg: GUI new-session dialog + delete-project protected guard — P5 slice 2 (GUI multi-session rant P5)#642
argszero merged 2 commits into
masterfrom
feature/gui-p5-slice2-new-session-delete-project

Conversation

@argszero

Copy link
Copy Markdown
Owner

P5 slice 2 of the GUI multi-session rant (2026-08-10T15:07:19): new-session dialog + delete-project with protected guard.

New-session dialog (showNewSessionDialog)

  • Pick an existing project (active order) → App.newSession({projectPath}) creates a session in that project
  • Bottom "+ New project…" → pickProjectDir → registerProject (G121 writability check) → new session in the new project (lightweight command implicit _touch_project, no init_auto_evolve)
  • Entry: "+ New session…" button at top of the open-session dialog + #new-session-dialog in index.html

Delete project (open-session dialog project rows)

  • Protected guard: built-in project emrg / built-in task emrg-task → "system project cannot be deleted" hint, API not called; .emrg is a _touch_project history record (NOT built-in) → deletable
  • Confirm dialog (on-disk data kept, re-registerable) → new emrg:removeProject IPC → daemon remove_project (P1) → closes that project's open session connections + removes bookkeeping + persists (debounced gui_state) + broadcast; if the active session was closed, renderer switches to nearest open session or creates a new one

Slice-1 gap fixed: per-session projectPath threading — switchSession/sendMessage now use the session's project path as cwd (not the global projectDir), so cross-project open/resume and first-message creation land in the correct project dir.

i18n zh/en 11 keys; +3 renderer.smoke tests (52→55); GUI 169→172, 680 pytest green, doc counts synced.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260810-182448. P5 slice 2 complete: new-session dialog (existing/new project, G121 + implicit _touch_project, no init_auto_evolve), delete-project with protected guard (emrg/emrg-task; .emrg deletable) + confirm + active-switch-away, and the slice-1 gap fix (per-session projectPath threading through switchSession/sendMessage so cross-project sessions use the correct cwd). GUI 172/172, pytest 680, doc counts synced.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260810-184049. Re-verified on head 7453d0a: GUI 172/172 pass, pytest 680, CI green. New-session dialog (existing/new project with G121 + implicit _touch_project), delete-project protected guard (emrg/emrg-task; .emrg deletable), per-session projectPath threading — all correct.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

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

✅ LGTM — cycle 20260810-184006. Reviewed full diff: new-session dialog (existing project → newSession({projectPath}); new project → pickProjectDir + registerProject + new), delete-project protected guard (emrg/emrg-task protected, .emrg deletable) with confirm dialog + active-session switch-away, removeProject IPC closes that project's open connections + persists + broadcasts, and the slice-1 gap fix (per-session projectPath threaded through switchSession/sendMessage/newSession so cross-project sessions use the correct cwd). evolution_prompt.md entries for #641/#642 match merged state. Verified locally: node --check clean; GUI 172/172 (169+3); pytest 680/680 incl. doc-count guard.

@argszero
argszero merged commit edf3d81 into masterAug 10, 2026
1 check passed
@pm25coder

Copy link
Copy Markdown
Collaborator

Tested P5 slice 2 end-to-end on the branch (base c283e14, 2 commits incl. the quick-ref PR-number fix):

Sign up for freeto 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.

2 participants

@argszero@pm25coder