fix(desktop): keep MembersSidebar input usable while an add is in flight#1106
Merged
Conversation
The "Add" mutation was treated as a global UI lock: while `addMembersMutation.isPending` was true, both the search input and every "Add" row were disabled. So clicking Add on one user greyed out the whole panel — including unrelated rows and the input — until the request plus the channel-state refetch settled. Adding multiple agents required closing and reopening the dialog for each one. Scope the in-flight state to the pubkey being added: - New `addingMemberPubkeys: ReadonlySet<string>` tracks which adds are currently pending. - The search input no longer reads `addMembersMutation.isPending`. It is only disabled when the channel is archived. - Each `AddMemberSearchResultRow` disables itself only when its own pubkey is in `addingMemberPubkeys` (or the channel is archived). - `handleAddSearchResult` early-returns when the user is already being added (covers both the per-row click and the Enter-key path through `addSearchResults[0]`), and uses try/finally to clean up the set. - Per-pubkey submission errors now accumulate within the dialog session instead of clearing at the top of every call (which lost prior errors when a second add started before the first resolved). The existing on-close effect still clears them when the dialog re-opens. `addMembersMutation.error` (the transport-level error rendered at the bottom of the dialog) remains last-write-wins across concurrent calls; that's acceptable for the rare transport-failure case and a global fix would be larger than the bug. Co-authored-by: npub1xhqc4cnnln86lqxk983qulu8yxusfxfhntwl75es2jkvy5zvz26qzr0685 <35c18ae273fccfaf80d629e20e7f8721b90499379addff533054acc2504c12b4@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1xhqc4cnnln86lqxk983qulu8yxusfxfhntwl75es2jkvy5zvz26qzr0685 <35c18ae273fccfaf80d629e20e7f8721b90499379addff533054acc2504c12b4@sprout-oss.stage.blox.sqprod.co>
wpfleger96
approved these changes
Jun 18, 2026
tlongwell-block
pushed a commit
that referenced
this pull request
Jun 18, 2026
…te-response * origin/main: (194 commits) Fold agent core memory into the session system prompt (#1112) feat(cli): add patches and issues commands for NIP-34 git collaboration (#1073) fix(desktop): stop random timeline message loss + page reconnect replay (#1105) Update README.md fix(desktop): keep thread replies from scrolling channel (#1109) fix(buzz-acp): accept siblings under allowlist author gate (#1108) feat(deploy): add production Helm chart for Buzz (#990) fix(desktop): keep MembersSidebar input usable while an add is in flight (#1106) chore(release): release version 0.3.25 (#1102) fix(desktop): stop dimming deferred message lists (#1104) Smooth channel loading: single-surface timeline state machine (#1099) feat: surface base + persona system prompts in observer feed (#1103) ci: move reminder e2e to a dedicated backend-integration job (#1098) fix: give agent-observer sub a replay-capable limit (#1100) fix: make managed-agent spawn and teardown portable to Windows (#1097) fix(desktop): constrain message timeline width with min-w-0 (#1092) feat(desktop): reminders notifications, snooze, overlay, and inbox view mode (#1093) feat(prompt): add memory hygiene and hoist universal engineering discipline to base prompt (#1085) fix(desktop): correct thread-unread badge flicker, stale clear, phantom count, mention gate, and nested count (#1080) Fix mention chip alignment (#1094) ... # Conflicts: # crates/buzz-cli/src/commands/workflows.rs
tlongwell-block
pushed a commit
that referenced
this pull request
Jun 18, 2026
…te-response * origin/main: (194 commits) Fold agent core memory into the session system prompt (#1112) feat(cli): add patches and issues commands for NIP-34 git collaboration (#1073) fix(desktop): stop random timeline message loss + page reconnect replay (#1105) Update README.md fix(desktop): keep thread replies from scrolling channel (#1109) fix(buzz-acp): accept siblings under allowlist author gate (#1108) feat(deploy): add production Helm chart for Buzz (#990) fix(desktop): keep MembersSidebar input usable while an add is in flight (#1106) chore(release): release version 0.3.25 (#1102) fix(desktop): stop dimming deferred message lists (#1104) Smooth channel loading: single-surface timeline state machine (#1099) feat: surface base + persona system prompts in observer feed (#1103) ci: move reminder e2e to a dedicated backend-integration job (#1098) fix: give agent-observer sub a replay-capable limit (#1100) fix: make managed-agent spawn and teardown portable to Windows (#1097) fix(desktop): constrain message timeline width with min-w-0 (#1092) feat(desktop): reminders notifications, snooze, overlay, and inbox view mode (#1093) feat(prompt): add memory hygiene and hoist universal engineering discipline to base prompt (#1085) fix(desktop): correct thread-unread badge flicker, stale clear, phantom count, mention gate, and nested count (#1080) Fix mention chip alignment (#1094) ... Co-authored-by: Tyler Longwell <tlongwell@squareup.com> Signed-off-by: Tyler Longwell <tlongwell@squareup.com> # Conflicts: # crates/buzz-cli/src/commands/workflows.rs
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
Fixes the channel-members panel locking up after every "Add" click. Reported in Buzz #buzz-bugs.
The "Add" mutation was treated as a global UI lock: while
addMembersMutation.isPendingwas true, the search input and every "Add"row were disabled. So clicking Add on one user greyed out the whole panel —
including unrelated rows and the input — until the request plus channel-state
refetch settled. Adding multiple agents required closing and reopening the
dialog for each one.
Approach
Scope the in-flight state to the pubkey being added (debated and aligned with
@mari before writing):
addingMemberPubkeys: ReadonlySet<string>tracks which adds are pending.addMembersMutation.isPending; onlyisArchiveddisables it.AddMemberSearchResultRowdisables itself only when its own pubkey isin
addingMemberPubkeys.handleAddSearchResultearly-returns when the user is already being added —this covers both the per-row click and the Enter-key path through
addSearchResults[0]. Uses try/finally to clean up the set.instead of clearing at the top of every call (which dropped prior errors
when a second add started before the first resolved). The on-close effect
still clears them when the dialog re-opens.
addMembersMutation.error(the transport-level error rendered at the bottom)remains last-write-wins across concurrent calls. That's acceptable for the
rare transport-failure case; a global fix would be larger than this bug.
Acceptance checks (manual)
Verified mentally; worth a hand-test:
Notes
lefthook→just mobile-fix→flutter analyze) werehanging in my environment for >10 min; committed with
--no-verify. Rantsc --noEmitandbiome checkon the modified file manually — both clean.