emrg: gui renderer — wire workspace panels to real daemon data (projects/tasks/rants + project sessions) - #1028
Merged
argszero merged 1 commit intoAug 27, 2026
Conversation
…cts/tasks/rants + project sessions)
argszero
left a comment
Owner
There was a problem hiding this comment.
✅ 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
WorkspaceViewcomponent 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:listProjects/listTasks/listRantswhen the corresponding panel activates (vanillaloadTaskMeta/renderRantListsemantics — refresh on every entry).listProjectSessions({ projectPath })with loading / empty / error states.pickProjectDir→registerProject→ reload), delete-project (ConfirmDialog +removeProject+ reload, protected-project errors surfaced), trigger-task (triggerTask+app.triggeredsystem message + reload).ConfirmDialogvia the sharedlib/dialogreducer for the delete confirmation.window.emrgabsent → no-op loads, empty lists (jsdom / preload-less safe).renderer/src/components/WorkspaceView.tsx:projectSessions/projectSessionsError/currentSidprops;ProjectSessionsnow renders real session rows (title || full id, "current" mark + relative time viasessionRowView, 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 --noEmitclean;vitest426 passed (42 files);npm run buildsucceeds.Not in scope (future slices)
onEditTask/onNewRantremain unwired no-ops — they need form UI, the bridge methods exist).