Conversation
… to review when gate blocks - PendingGateBanner: skip gates with no data in gateDataMap — an external-approval gate with no DB entry has never been triggered, so the banner must not appear - ChannelRouter: add onGatePendingApproval callback; fires when gate data is written but the gate is still blocked, specifically for external-approval gates (approved field with empty writers array) - SpaceRuntimeService: add handleGatePendingApproval which transitions the canonical task from in_progress/open → review (pendingCheckpointType: 'gate') and emits space.task.updated; wire onGatePendingApproval into notifyGateDataChanged router - TaskAgentManager: wire onGatePendingApproval into the node-agent ChannelRouter - SpaceRuntime: when spawning node agents, treat review+gate tasks like open tasks — transition to in_progress and clear pendingCheckpointType so the gate re-activating the agent resets the task state correctly
Review: gate banners only show after activation; task transitions to review when gate blocksOverall: approve with one minor request — the two core fixes (premature banner + task status transition) are correct and well-implemented. Tests are thorough. One small gap in What's done well
Tests: all green
One minor requestSee the inline comment on |
💡 Suggested fix:
|
…nding When pendingCheckpointType === 'gate', the PendingGateBanner owns the approval UX. The generic Approve (review→done) and Cancel buttons must be hidden to prevent bypassing the gate — clicking Approve would mark the task done without opening the gate. Follows the same filter pattern already used for completion_action and task_completion checkpoints.
|
Fixed in 789d44b. Added |
Review round 2: approved ✅The
All 43 tests pass (29 TaskStatusActions + 14 PendingGateBanner). Ready to merge. |
Review round 2: approved ✅The
All 43 tests pass (29 TaskStatusActions + 14 PendingGateBanner). Ready to merge. |
Fixes two related gate UX bugs:
Premature gate banner —
PendingGateBannerwas iterating all gates in the workflow definition and callingevaluateGateStatuseven when no gate data existed in the DB. For external-approval gates (emptywriters), this returnedwaiting_humanbefore the agent had even written anything. The fix: skip gates with no entry ingateDataMap.Task stays
in_progressinstead ofreview— when an agent writes gate data but a human hasn't approved yet, the task should surface in the "Needs Attention" group. The fix adds anonGatePendingApprovalcallback toChannelRouterthat fires for external-approval gates when they're still blocked, andSpaceRuntimeService.handleGatePendingApprovaltransitions the canonical task toreview(withpendingCheckpointType: 'gate'). The gate's eventual approval re-activates the node and clears the checkpoint type back toin_progress.Files changed:
packages/web/src/components/space/PendingGateBanner.tsx— skip ungated entriespackages/daemon/src/lib/space/runtime/channel-router.ts—onGatePendingApprovalconfig + wiringpackages/daemon/src/lib/space/runtime/space-runtime-service.ts—handleGatePendingApprovalmethod + router wiringpackages/daemon/src/lib/space/runtime/task-agent-manager.ts— router wiringpackages/daemon/src/lib/space/runtime/space-runtime.ts— handlereview+gate→in_progresson agent spawnonGatePendingApprovalcallback tests added