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

@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 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.

@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 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.

@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 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 masterAug 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>
@argszero
argszero deleted the feature/gui-task-open-session branch August 23, 2026 02:26
argszero added a commit that referenced this pull request Aug 28, 2026
… regression) (#1059)
Rant 2026-08-28T11:16:47: the React GUI (v0.2.85) task-management rows
only show Trigger/Edit/Delete; the vanilla (v0.2.65, #924) rows had a
fourth "Open Session" button that jumped straight into the task's
session. The daemon still returns project/project_path/session_id from
TaskHandler.status() — only the React port dropped them.
- workspaceView.ts TaskRec: add project/project_path/session_id fields
(daemon status() payload, lost in the Batch 5 migration).
- WorkspaceView.tsx TaskList: insert "Open Session" button after
Trigger (vanilla order 触发/打开会话/编辑/删除), disabled when the
task has no session_id, click bubbles onOpenSession(task); add
onOpenSessionTask prop + pass-through.
- Shell.tsx: openTaskSession handler calls the existing emrg:switchSession
bridge with { sessionId: task.session_id, projectPath: task.project_path }
(projectPath optional in the WorkspaceBridge type), then setActiveSid +
switch back to the sessions view (vanilla #932 lesson — from the task
panel the view must return to the chat or the user thinks nothing
happened). Errors surface via openSession.loadFailed system message.
- Tests: WorkspaceView task-list test asserts 4-button order, disabled
state without session_id, and the open-session click callback; Shell
wiring test clicks Open session → switchSession called with
sessionId+projectPath → panel returns to sessions view.
- Agent.md renderer count 448 -> 449 (Shell 25 -> 26).
Verified: renderer vitest 449/449 + tsc clean + vite build OK; GUI node
tests 87 pass/8 skip; pytest 1147 passed + 1 skipped (1148 == Agent.md).
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
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.

1 participant

@argszero