Skip to content

fix(desktop): queue agent draft requests - #3610

Open
kiranmagic7 wants to merge 1 commit into
block:mainfrom
kiranmagic7:fix/queue-agent-drafts-3559
Open

fix(desktop): queue agent draft requests#3610
kiranmagic7 wants to merge 1 commit into
block:mainfrom
kiranmagic7:fix/queue-agent-drafts-3559

Conversation

@kiranmagic7

Copy link
Copy Markdown
Contributor

Summary

Fixes #3559.

The desktop previously marked every accepted agent management request as seen before checking whether another draft was open. Requests arriving during an active review were therefore discarded permanently.

This change keeps accepted requests in a FIFO queue and advances to the next draft after the current one is saved or dismissed. The requesting agent pubkey follows each queued item, and request errors are cleared between drafts.

Tests

  1. pnpm --dir desktop exec node --experimental-strip-types --test src/features/agents/agentManagementBuffer.test.mjs
  2. pnpm --dir desktop typecheck
  3. just ci

Notes for review

The queue is intentionally not capped. These frames are already authenticated and owner scoped, and introducing a cap would preserve the silent data loss described in the issue.

Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.com>
@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Status check on head 5b8d967411a7c55b8a4a97eaa555a079e498a571: the PR is still mergeable, with DCO Check, Semgrep OSS, and zizmor green. The full Actions run is waiting on fork workflow approval rather than failing code: https://github.com/block/buzz/actions/runs/30485508497 (action_required, 0 jobs).

Review focus: the small draft-request buffer in agentManagementBuffer.ts and its regression coverage in agentManagementBuffer.test.mjs for #3559. The repo CODEOWNERS path is already @block/buzz-oss-team, so I am leaving routing as-is.

Sign up for free to 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.

buzz agents draft-update silently drops a draft when one is already pending

1 participant