fix(bulk-edit): await bulkUpdate dispatch before closing flyout#41
Merged
fathiraz merged 1 commit intoJun 1, 2026
Merged
Conversation
Return a fast accept/reject from the bulkUpdate handler so the edit flyout can surface queue-full and messaging failures without pinning Recent or dismissing the picker.
Contributor
There was a problem hiding this comment.
1 issue found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/background/bulk-update.ts">
<violation number="1" location="src/background/bulk-update.ts:57">
P1: Don’t broadcast `Done!` from the error path; it hides bulk-update failures as successes.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| if (isBulkFull()) { | ||
| console.warn('[rgp:bg] max concurrent bulk updates reached, rejecting') | ||
| try { | ||
| await broadcastQueue( |
Contributor
There was a problem hiding this comment.
P1: Don’t broadcast Done! from the error path; it hides bulk-update failures as successes.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/background/bulk-update.ts, line 57:
<comment>Don’t broadcast `Done!` from the error path; it hides bulk-update failures as successes.</comment>
<file context>
@@ -24,265 +25,291 @@ import { broadcastQueue } from '@/background/rest-helpers'
- if (isBulkFull()) {
- console.warn('[rgp:bg] max concurrent bulk updates reached, rejecting')
+ try {
+ await broadcastQueue(
+ {
+ total: data.itemIds.length,
</file context>
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 free
to 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
Addresses PR #38 review: the edit-fields flyout no longer pins Recent or closes after a failed
bulkUpdatedispatch.Changes
bulkUpdatereturns{ ok: true }immediately after accepting work, or{ ok: false, reason: 'concurrent' }when the bulk slot is full. Long-running queue work runs inrunBulkUpdatewithout blocking the message reply.submitBulkFieldUpdateawaits dispatch, checks the queue preflight (getActiveCount() >= 3), and shows a warningFlashon failure. Success path only then callsonAppliedFieldandonClose.Verification
All passed locally.
Summary by cubic
Stops the bulk edit flyout from closing when a bulk update can’t start. The flyout now waits for the
bulkUpdatedispatch and shows a warning if the queue is full or messaging fails.Bug Fixes
Applywaits forbulkUpdateto accept; on reject, shows a warningFlashand keeps the flyout open.queueStore.getActiveCount()); disablesApplywhile sending to avoid duplicates.Refactors
bulkUpdatenow returns an immediate dispatch result ({ ok: true } | { ok: false, reason: 'concurrent' }) and runs work inrunBulkUpdatewith acquire/release.BulkUpdateDispatchResult; added tests for dispatch behavior and flyout submission.Written for commit 8f89fbd. Summary will update on new commits.