Fixed
- GB-Agent autosend stuck-violet cell. The 240s per-call GBCA timeout was hard-coded in the worker, and the only path to retire the violet 'thinking' cell on a per-conversation run was the realtime
connector_draft_run_failedbroadcast. A missed broadcast (realtime drop, app tab backgrounded) could keep the cell violet indefinitely while the worker kept retrying silently. The per-call timeout is now per-workspace (proactiveDraftGenerationTimeoutSeconds, default 300, range 30–600) and the outbox retry cap is also per-workspace (proactiveDraftGenerationMaxRetries, default 3, range 0–6); both surface in the GB-Agent settings panel. The app also writes astartedAt+timeoutMsinto the per-conversation run store on theconnector_draft_run_startedbroadcast and runs a client-side self-timeout that flips the cell red if the worker'sfailedbroadcast is missed — bounded by the workspace's per-call timeout × (retries + 1) + 30s grace. - Operator triage for stuck cells. Worker surfaces a structured
[proactive-draft] generation timed outlog on retry exhaustion withworkspaceId,conversationId,attempt,maxAttempts,timeoutMs,maxRetries, and a truncatedreasonso a single grep finds the dead-lettered generation.
Security / Data
- No data-handling change. The two new
gb_agent_workspace_settingscolumns are workspace-scoped, additive, and default-on. The PATCH route validates the new fields via zod (min(30) / max(600)for the timeout,min(0) / max(6)for the retry cap) and the database normalizer clamps to the same bounds.
Tests
- 14 new tests across
@repo/domain(clamp helpers),@repo/database(queue max_attempts + payload forwarding),worker(timeout override), and@repo/app(settings panel rendering + PATCH payload); updates 3 existing test factories to include the new defaults so the priorproactiveDraftAutoSendAllInboundand customer-travel-context tests still pass. The full database suite (736 tests) and worker suite (127 tests) pass.
Verification
pnpm --filter @repo/domain exec tsc --noEmit(clean)pnpm --filter @repo/database exec tsc --noEmit(clean)pnpm --filter @repo/database test(736 tests pass)pnpm --filter worker test(127 tests pass)pnpm --filter @repo/app exec vitest run gb-agent-settings-panel(8 tests pass)pnpm release:hygiene(after CHANGELOG + version bump)