Skip to content

emrg: gui renderer — wire workspace panels to real daemon data (projects/tasks/rants + project sessions) - #1028

Merged
argszero merged 1 commit into
argszero:masterfrom
how2how2how2-arch:feature/gui-workspace-data-wiring
Aug 27, 2026
Merged

emrg: gui renderer — wire workspace panels to real daemon data (projects/tasks/rants + project sessions)#1028
argszero merged 1 commit into
argszero:masterfrom
how2how2how2-arch:feature/gui-workspace-data-wiring

Conversation

@how2how2how2-arch

Copy link
Copy Markdown
Contributor

Summary

Wires the workspace panels (projects / tasks / rants) to real daemon data in the React renderer — the last big "stub" from the Batch 5 migration. The WorkspaceView component was fully built with all callbacks and pure logic (lib/workspaceView.ts) but Shell passed empty arrays and the project-sessions sub-view always rendered "no sessions".

Changes

  • renderer/src/components/Shell.tsx — the wiring layer:
    • Loads listProjects / listTasks / listRants when the corresponding panel activates (vanilla loadTaskMeta / renderRantList semantics — refresh on every entry).
    • Project sessions sub-view: listProjectSessions({ projectPath }) with loading / empty / error states.
    • Actions wired to the bridge: switch-session (from a project's session list), add-project (pickProjectDirregisterProject → reload), delete-project (ConfirmDialog + removeProject + reload, protected-project errors surfaced), trigger-task (triggerTask + app.triggered system message + reload).
    • Owns a ConfirmDialog via the shared lib/dialog reducer for the delete confirmation.
    • Degradation unchanged: window.emrg absent → no-op loads, empty lists (jsdom / preload-less safe).
  • renderer/src/components/WorkspaceView.tsx:
    • New projectSessions / projectSessionsError / currentSid props; ProjectSessions now renders real session rows (title || full id, "current" mark + relative time via sessionRowView, click → select) instead of the static "no sessions" stub.
  • renderer/src/components/Shell.test.tsx: +3 tests (tasks panel loads listTasks, rants panel loads listRants, projects panel loads listProjects + session sub-view loads listProjectSessions).
  • renderer/src/components/WorkspaceView.test.tsx: +2 tests (sessions sub-view loading → rows → select; empty + error states).
  • Agent.md: renderer 421 → 426; Batch 5 workspace description updated.

Verification

  • tsc --noEmit clean; vitest426 passed (42 files); npm run build succeeds.
  • Full Python suite 1106 passed + 1 skipped; doc-count guard 4 passed; import OK.

Not in scope (future slices)

  • Task create/edit form and the "new rant" compose dialog (onEditTask / onNewRant remain unwired no-ops — they need form UI, the bridge methods exist).

@argszeroargszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 2026-08-27T08:07:30. First vote (1/3).

Deep review of the workspace data wiring:

  • WorkspaceView/Shell: panel-activation loaders (projects/tasks/rants) refresh on every activation (vanilla semantics); project-sessions sub-view has loading/error/empty states; current-sid marker via sessionRowView.
  • Actions wired through the real bridge: switchSession (sid validated in main.js), addProject (pickProjectDir + registerProject via implicit list_sessions touch-register, dir writability check), deleteProject (ConfirmDialog + removeProject with protected emrg/emrg-task guard + open-session close), triggerTask (trigger_task + system message feedback).
  • All 9 bridge methods exist in preload.js and main.js, mapping to daemon commands list_projects / list_sessions(cwd) / remove_project / list_tasks / trigger_task — production wiring verified end-to-end (not stubs).
  • window.emrg missing degrades gracefully (no-op), errors surface via transcript.addSystemMessage.
  • Tests: 5 new (3 Shell + 2 WorkspaceView) covering load/render/select/empty/error paths; vitest 426/426 (Agent.md count arithmetic 421→426 = +2 workspaceView +3 Shell correct), tsc clean.
  • CI: run 33024025355 test + test-windows green on head 666a924.

@argszeroargszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM 2/3 — cycle 2026-08-27T08:20:07. Independent re-verification: head 666a924 unchanged, CI run 33024025355 still green (test + test-windows), MERGEABLE/CLEAN. No new review feedback since 1/3.

@argszeroargszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM 3/3 — cycle 2026-08-27T08:30:36. Independent 3rd consecutive vote (080730 → 082007 → 083036). Head 666a924 unchanged, CI 33024025355 green, diff re-verified (5 files +311/-5, Agent.md 421→426 arithmetic correct). Merging.

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.

2 participants

@how2how2how2-arch@argszero