Skip to content

emrg: GUI open-sessions sidebar shows title for cross-project sessions (rant 2026-08-14T12:01:44) - #782

Merged
argszero merged 3 commits into
masterfrom
feature/gui-open-session-cross-project-title
Aug 14, 2026
Merged

emrg: GUI open-sessions sidebar shows title for cross-project sessions (rant 2026-08-14T12:01:44)#782
argszero merged 3 commits into
masterfrom
feature/gui-open-session-cross-project-title

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Host rant 2026-08-14T12:01:44: in the GUI "open sessions" sidebar region, cross-project opened sessions show only the session id even when the session has a name/title. Current-project sessions are unaffected (they resolve via App.state.sessions).

Root cause (verified)

  • renderOpenSessions (sidebar.js) looks up titles only in App.state.sessions, which is populated by list_sessions(cwd=projectDir) — i.e. only sessions of the current global project dir.
  • openSessionsList() (main.js) entries were {sid, projectName, projectPath, lastActive} — no title field.
  • → Cross-project opened sessions (e.g. an emrg-evolution-emrg-task session opened while the global project dir is ~/.emrg) are missing from state.sessionscur = {} → title falls back to entry.sid.

Fix

  • main.js: listSessions(cwd = projectDir) gains an optional cwd param; touchOpenSession asynchronously fetches the session's own project list (listSessions(projectPath)) and sets v.title when found (fail/no title → stays undefined → sid fallback); openSessionsList() now includes title; renameSession handler syncs v.title + rebroadcasts after a successful rename.
  • sidebar.js: title priority chain entry.title || cur.title || entry.sid (entry.title wins for cross-project, cur.title for current-project, sid last).
  • test: new renderer.smoke case covering all three branches (cross-project entry.title shown, no-title+unknown-sid falls back to sid, current-project still resolves via state.sessions).

Verification

  • GUI npm test: 245/245 pass (120 renderer smoke, was 119).
  • Python: pytest 804 passed; import + CLI checks green; doc-count guard (test_doc_counts.py) 3/3.
  • Agent.md GUI breakdown synced 244→245.

@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 (verified locally: pytest 804 green, GUI npm test 245/245 with the new cross-project title test, import + CLI checks pass; CI test + test-windows both PASS on this PR; diff matches the rant 12:01:44 spec: entry.title || cur.title || entry.sid priority chain + async per-project title fetch in touchOpenSession + rename sync)

@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/3)

Reviewed on rebased head 319c649 (conflict resolved after #781 merge: merged master in, kept Agent.md GUI 245 — rebase dropped #781's already-merged commit, GUI delta unchanged).

Verified GUI delta (4 files, +49/-6):

  • main.js: rename_session success → immediately sync openSessions[sid].title + broadcast; touchOpenSession → async per-project listSessions(projectPath) fetch, sets v.title + broadcast if found (fail → undefined → sid fallback); openSessionsList() passes title through; listSessions(cwd=projectDir) parameterized for cross-project query.
  • sidebar.js: title priority chain entry.title || cur.title || entry.sid — cross-project entries (not in current project's state.sessions) now resolve via entry.title instead of raw sid.
  • New smoke test (3 states): entry.title present → wins over sid; cross-project no title → sid fallback; current-project → state.sessions title. Discriminating, not smoke-only.
  • Agent.md GUI 244→245 synced.

Local: GUI npm test 245/245 (incl. new test) + pytest 804 green. CI test + test-windows re-running on new head (watch). MERGEABLE.

Needs 1 more ✅ from a different cycle.

@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 (2nd consecutive ✅ from a different cycle: merge-conflict resolved locally (Agent.md GUI count 244→245, master #781 merged into this branch), head 319c649; CI test + test-windows both PASS on re-fired run 31769294080; doc-count guard 3/3 + pytest 804 green on the resolved head)

@argszero
argszero merged commit f39763d into master Aug 14, 2026
2 checks passed
@argszero
argszero deleted the feature/gui-open-session-cross-project-title branch August 14, 2026 04:20
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