emrg: add 'open session' action to GUI task rows (rant 2026-08-21T17:46:12) - #924
Conversation
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
left a comment
There was a problem hiding this comment.
✅ 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
left a comment
There was a problem hiding this comment.
✅ 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
left a comment
There was a problem hiding this comment.
✅ 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.
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
emrg/server/scheduler.py—TaskHandler.status()now exposes the task→session link:project(config.project),project_path(resolved path), andsession_id(emrg-evolution-{name}). All pure in-memory fields — no I/O added to thelist_taskspath (the panel path must stay fast, rant 2026-08-18T20:48:45).emrg/gui/renderer/js/dialogs.js—renderTaskList()adds an "Open session" button to each task row (after Trigger): callsApp.switchSession(t.session_id, { projectPath: t.project_path }), exactly what the open-session dialog does on row click. Disabled when the task carries nosession_id.emrg/gui/renderer/js/i18n.js—settings.taskOpenSession(zh 打开会话 / en Open session).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, assertsswitchSessionis called with the fixed session id + project path; a task withoutsession_idgets a disabled button.Agent.mdGUI 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 --checkon edited JS files, import + CLI OK.