emrg: restore task-row "Open Session" button in React GUI (vanilla #924 regression) - #1059
Conversation
… regression) 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).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260828-115726
Reviewed the full diff against the rant's acceptance criteria (2026-08-28T11:16:47, vanilla #924 regression):
- TaskRec type now carries project/project_path/session_id (daemon status() payload) ✓
- TaskList inserts the Open Session button after Trigger (vanilla 4-button order), disabled without session_id, click bubbles onOpenSession(task) ✓
- Shell wires openTaskSession → existing emrg:switchSession bridge with { sessionId, projectPath }, then setActiveSid + returns to the sessions view (vanilla #932 lesson) ✓
- Tests: WorkspaceView asserts 4-button order + disabled state + click callback; Shell asserts switchSession payload + view return ✓
- Orphan i18n key settings.taskOpenSession re-referenced (was the migration-loss trace) ✓
CI: test + test-windows both green (run 33140765367). Local verification matches: renderer vitest 449/449, tsc clean, vite build OK, GUI 87 pass/8 skip, pytest 1147+1.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260828-121342
Independent re-review of head bbd7a99 (unchanged since cycle 115726, CI green on this head):
- TaskRec gains session_id/project/project_path — matches daemon TaskHandler.status() payload (scheduler.py status() returns all three; verified against source).
- TaskList renders the Open Session button between Trigger and Edit (vanilla #924 4-button order), disabled when session_id is missing, click bubbles onOpenSession(task) — matches vanilla dialogs.js renderTaskList semantics.
- Shell wiring calls the existing emrg:switchSession bridge with {sessionId, projectPath} then setActiveSid + returns to sessions view (vanilla #932 lesson); error path surfaces openSession.loadFailed.
- Tests cover 4-button order, disabled state, click callback, and the Shell bridge payload + view return.
- Agent.md renderer count 448 -> 449 matches the static guard (test_renderer_count_matches_docs).
Verification recorded last cycle on this exact head: renderer vitest 449/449, tsc clean, vite build OK, GUI 87 pass/8 skip, pytest 1147 passed + 1 skipped (1148 == Agent.md), import + CLI green. CI test + test-windows both pass (run 33140765367).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260828-122032
Third independent review (head bbd7a99 unchanged, CI test + test-windows green on this head, MERGEABLE). Full diff re-verified this cycle against the rant's acceptance criteria:
- TaskRec carries session_id/project/project_path — matches daemon TaskHandler.status() payload.
- TaskList renders the Open Session button after Trigger (vanilla #924 4-button order), disabled without session_id, click bubbles onOpenSession(task).
- Shell openTaskSession calls emrg:switchSession with { sessionId, projectPath } then setActiveSid + returns to sessions view (vanilla #932 lesson); errors surface openSession.loadFailed.
- Tests: 4-button order + disabled state + click callback (WorkspaceView), bridge payload + view return (Shell).
- Agent.md renderer count 448 -> 449 consistent with the static doc-count guard.
3 consecutive LGTMs from distinct cycles (115726, 121342, 122032), no ❌ — merging.
Uh oh!
There was an error while loading. Please reload this page.
… button restore) (#1060) Release action rant 2026-08-28T13:32:21: bump version + tag v0.2.86 + trigger release CI. Ships #1059 (f840ac9) merged since v0.2.85 tag. The conv-item hover flicker fix (rant 13:31:55) is intentionally NOT in this release per the rant — it lands in the next version. Version sources: emrg/__init__.py, pyproject.toml, gui/package.json, gui/package-lock.json, packaging/build-runtime.sh, make-installer.sh, make-run-installer.sh (7 sources, test_version_sync guards all). Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Summary
The React GUI (v0.2.85) task-management rows lost the "Open Session" button that vanilla (v0.2.65, #924) had — each row now only shows Trigger/Edit/Delete. The daemon still returns
project/project_path/session_idfromTaskHandler.status(); only the Batch 5 React migration dropped them.Changes
renderer/src/lib/workspaceView.ts—TaskRecgainsproject?/project_path?/session_id?(the daemonstatus()payload fields lost in the migration).renderer/src/components/WorkspaceView.tsx—TaskListinserts an "Open Session" button right after Trigger (vanilla order: Trigger → Open Session → Edit → Delete), disabled when the task has nosession_id, click bubblesonOpenSession(task). NewonOpenSessionTaskprop wired through.renderer/src/components/Shell.tsx—openTaskSessionhandler calls the existingemrg:switchSessionbridge with{ sessionId: task.session_id, projectPath: task.project_path }(bridge type extended with optionalprojectPath, matching main.js), thensetActiveSid+ returns to the sessions view (vanilla emrg: fix open-session returning to session view + add GitHub issue path to promotion feedback #932 lesson: from the task panel the view must switch back to chat, otherwise it looks like nothing happened). Failures surface via theopenSession.loadFailedsystem message.session_id, and the open-session click callback; Shell wiring test clicks Open Session →switchSessioncalled with sessionId+projectPath → panel returns to the sessions view.The
settings.taskOpenSessioni18n key (zh 打开会话 / en "Open session") already existed but was an orphan — it is now referenced again.Verification
vitest run449/449 passed,tsc --noEmitclean,vite buildOKRant: 2026-08-28T11:16:47 (project: emrg)