Skip to content

emrg: restore task-row "Open Session" button in React GUI (vanilla #924 regression) - #1059

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

emrg: restore task-row "Open Session" button in React GUI (vanilla #924 regression)#1059
argszero merged 1 commit into
masterfrom
feature/task-row-open-session

Conversation

@argszero

Copy link
Copy Markdown
Owner

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_id from TaskHandler.status(); only the Batch 5 React migration dropped them.

Changes

  • renderer/src/lib/workspaceView.tsTaskRec gains project? / project_path? / session_id? (the daemon status() payload fields lost in the migration).
  • renderer/src/components/WorkspaceView.tsxTaskList inserts an "Open Session" button right after Trigger (vanilla order: Trigger → Open Session → Edit → Delete), disabled when the task has no session_id, click bubbles onOpenSession(task). New onOpenSessionTask prop wired through.
  • renderer/src/components/Shell.tsxopenTaskSession handler calls the existing emrg:switchSession bridge with { sessionId: task.session_id, projectPath: task.project_path } (bridge type extended with optional projectPath, matching main.js), then setActiveSid + 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 the 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 the sessions view.
  • Agent.md — renderer test count 448 → 449 (Shell 25 → 26).

The settings.taskOpenSession i18n key (zh 打开会话 / en "Open session") already existed but was an orphan — it is now referenced again.

Verification

  • Renderer: vitest run 449/449 passed, tsc --noEmit clean, vite build OK
  • GUI (main process): 87 pass / 8 skip
  • Python: pytest 1147 passed + 1 skipped (1148, matches Agent.md), import + CLI green

Rant: 2026-08-28T11:16:47 (project: emrg)

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

@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 20260828-115726

Reviewed the full diff against the rant's acceptance criteria (2026-08-28T11:16:47, vanilla #924 regression):

  1. TaskRec type now carries project/project_path/session_id (daemon status() payload) ✓
  2. TaskList inserts the Open Session button after Trigger (vanilla 4-button order), disabled without session_id, click bubbles onOpenSession(task) ✓
  3. Shell wires openTaskSession → existing emrg:switchSession bridge with { sessionId, projectPath }, then setActiveSid + returns to the sessions view (vanilla #932 lesson) ✓
  4. Tests: WorkspaceView asserts 4-button order + disabled state + click callback; Shell asserts switchSession payload + view return ✓
  5. 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.

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

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

  1. TaskRec carries session_id/project/project_path — matches daemon TaskHandler.status() payload.
  2. TaskList renders the Open Session button after Trigger (vanilla #924 4-button order), disabled without session_id, click bubbles onOpenSession(task).
  3. Shell openTaskSession calls emrg:switchSession with { sessionId, projectPath } then setActiveSid + returns to sessions view (vanilla #932 lesson); errors surface openSession.loadFailed.
  4. Tests: 4-button order + disabled state + click callback (WorkspaceView), bridge payload + view return (Shell).
  5. Agent.md renderer count 448 -> 449 consistent with the static doc-count guard.

3 consecutive LGTMs from distinct cycles (115726, 121342, 122032), no ❌ — merging.

@argszero
argszero merged commit f840ac9 into masterAug 28, 2026
2 checks passed
@argszero
argszero deleted the feature/task-row-open-session branch August 28, 2026 04:25
argszero added a commit that referenced this pull request Aug 28, 2026
… 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>
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