Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix: prevent user-input activities from leaking into pending approvals projection (#2051)
Marcus Grandod22c6f528006
diff --git a/apps/server/src/orchestration/Layers/ProjectionPipeline.ts b/apps/server/src/orchestration/Layers/ProjectionPipeline.tsindex aa1109a4d..d981ae0da 100644--- a/apps/server/src/orchestration/Layers/ProjectionPipeline.ts+++ b/apps/server/src/orchestration/Layers/ProjectionPipeline.ts@@ -1284,6 +1284,14 @@ const makeOrchestrationProjectionPipeline = Effect.fn("makeOrchestrationProjecti}return;}+ // Only approval-requested activities should create pending-approval+ // rows. Other activity kinds that happen to carry a requestId+ // (e.g. user-input.requested / user-input.resolved) must not+ // pollute this projection — they have their own accounting via+ // derivePendingUserInputCountFromActivities.+ if (event.payload.activity.kind !== "approval.requested") {+ return;+ }if (Option.isSome(existingRow) && existingRow.value.status === "resolved") {return;}