Skip to content

emrg: add 'open session' action to GUI task rows (rant 2026-08-21T17:46:12) - #924

Merged
argszero merged 1 commit into
masterfrom
feature/gui-task-open-session
Aug 21, 2026
Merged

emrg: add 'open session' action to GUI task rows (rant 2026-08-21T17:46:12)#924
argszero merged 1 commit into
masterfrom
feature/gui-task-open-session

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Host rant 2026-08-21T17:46:12: the GUI tasks panel rows have trigger / edit / delete actions but no way to jump straight into a task's session. Add an Open session button that opens the task's fixed session (emrg-evolution-{name}) — same effect as picking the session in the open-session dialog (appears in the left list + activates).

Changes

  1. emrg/server/scheduler.pyTaskHandler.status() now exposes the task→session link: project (config.project), project_path (resolved path), and session_id (emrg-evolution-{name}). All pure in-memory fields — no I/O added to the list_tasks path (the panel path must stay fast, rant 2026-08-18T20:48:45).
  2. emrg/gui/renderer/js/dialogs.jsrenderTaskList() adds an "Open session" button to each task row (after Trigger): calls App.switchSession(t.session_id, { projectPath: t.project_path }), exactly what the open-session dialog does on row click. Disabled when the task carries no session_id.
  3. emrg/gui/renderer/js/i18n.jssettings.taskOpenSession (zh 打开会话 / en Open session).
  4. Tests:
    • tests/test_scheduler.py — status test asserts the three new fields (session_id = emrg-evolution-{name}, project fallback, path fallback).
    • test/renderer.smoke.test.js — new test: opens the tasks panel, clicks the open-session button, asserts switchSession is called with the fixed session id + project path; a task without session_id gets a disabled button.
    • Existing edit-button index updated (0=trigger 1=open-session 2=edit 3=delete).
    • Agent.md GUI count 257 → 258 (renderer smoke 128 → 129).

Verification

  • npm test → 258 tests (250 passed + 8 skipped); renderer smoke 129/129.
  • uv run pytest tests/ → 1000 passed + 1 skipped (doc-count guard green with the 258 GUI line).
  • node --check on edited JS files, import + CLI OK.

Rant 2026-08-21T17:46:12: the tasks panel has trigger/edit/delete
actions per row but no way to jump straight into a task's session.

- scheduler.py TaskHandler.status(): expose project (config.project),
  project_path (resolved) and session_id (emrg-evolution-{name}) — the
  task→session link. Pure in-memory fields, no I/O.
- dialogs.js renderTaskList: add an 'open session' button to each task
  row (after trigger) that calls App.switchSession(session_id,
  { projectPath }) — identical effect to picking the session in the
  open-session dialog (appears in the left list + activates). Disabled
  when the task has no session_id.
- i18n.js: settings.taskOpenSession (zh/en).
- Tests: scheduler status test asserts the three new fields; renderer
  smoke test clicks the new button and verifies switchSession is called
  with the fixed session id + project path, and that a task without
  session_id gets a disabled button.
- Agent.md GUI count 257 -> 258 (renderer smoke 128 -> 129).

@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 1216. Implements rant 2026-08-21T17:46:12 (task rows get an 'open session' action):

  • status() adds project/project_path/session_id — pure in-memory, keeps the list_tasks path I/O-free (rant 2026-08-18T20:48:45 constraint respected).
  • The row button calls App.switchSession(session_id, { projectPath }) — byte-for-byte the open-session dialog's click behavior, so the session appears in the left list and activates.
  • session_id-less tasks get a disabled button (guarded at render).
  • Tests cover the daemon fields and the GUI click path (positive), plus the disabled button (negative); edit-button index shift (1→2) accounted for.
  • Local: GUI npm test 258 (250+8), renderer smoke 129/129, pytest 1000+1, import/CLI OK, node --check clean. CI test + test-windows 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 1219. Re-verified on unchanged head 38db608 (MERGEABLE, CI test + test-windows PASS): status() exposes project/project_path/session_id in-memory (list_tasks fast-path constraint respected), the row button reuses the open-session dialog's switchSession semantics, session_id-less tasks get a disabled button, and both scheduler + renderer tests cover the new surface (edit-button index shift accounted for). Local pytest 1000+1, GUI 258 (250+8), import OK. 2/3 LGTMs — one more needed.

@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 R2167. Independent verification on head 38db608 (MERGEABLE/CLEAN; CI test + test-windows PASS):

  • Scheduler status() diff audited: exposes project/_project_name, project_path (resolved, fallback to name), session_id (emrg-evolution-{name}, line 285) — all pre-existing in-memory attributes, zero I/O added to the list_tasks path (rant 2026-08-18T20:48:45 fast-path constraint respected).
  • GUI: open-session button inserted at index 1 (0=trigger), calls App.switchSession(session_id, {projectPath}) — identical semantics to the open-session dialog row click; disabled when session_id absent; error path surfaces toast.
  • Tests: new smoke test asserts switchSession called with fixed id + project path, disabled button for session_id-less task, button order 0-3; edit-button index updated accordingly; test_scheduler asserts the 3 new fields + fallbacks.
  • Local verification: pytest 1000 passed + 1 skipped (1001 collected); GUI 258 tests / 250 pass / 0 fail / 8 skipped (renderer smoke 129); node --check OK; import + CLI OK. Agent.md GUI count synced to 258 (doc-count guard green).
    3 consecutive ✅ from different cycles — merging.

@argszero
argszero merged commit 52e0051 into master Aug 21, 2026
2 checks passed
argszero added a commit that referenced this pull request Aug 21, 2026
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
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