Repository navigation
feat: a socket client can take over the banner for agent questions while it stays connected - #476
Merged
Merged
Conversation
…ile it stays connected
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
What this does: when Mesinyer is connected to Programa, an agent question shows one macOS banner (Mesinyer's, with answer buttons) instead of two. Programa still adds the question to its notification list, sidebar and Dock badge, and its own banner comes back by itself as soon as Mesinyer quits or disconnects.
notification.claim_banners(auth required), params{"kinds": ["needs_input"]}, result{"claimed": [...]}. The claim belongs to the calling connection: calling again replaces it,kinds: []releases it, andSocketConnection.teardown()releases it on every close path, so a client that crashes never leaves banners off.needs_input, notifications posted byagent.needs_inputskipnotificationDeliveryHandler. Every other notification is unchanged.contracts/v2/methods.json, then the generatedV2CommandCatalog.swiftandV2MethodNames.swift.docs/socket-api.mddocuments the method; CHANGELOG has an entry.debug.notification.banner_countanddebug.notification.banner_reset, count notifications handed to the banner path (counted before the permission check, so a CI runner without notification permission still sees them).Why: Mesinyer (the team's Slack client) now posts actionable banners for agent questions; without this, every question raised two banners.
Testing
./scripts/reload.sh --tag notif-claimbuilds the Debug app.scripts/check-v2-contract.sh: OK.tests_v2/test_notification_claim_banners.py(added toci_subset.txt): an unclaimedneeds_inputreaches the banner path; with a second connection's claim it is listed unread but not bannered;kinds: []releases; a renewed claim holds again; closing the claiming connection restores banners; unknown kinds and a missingkindsareinvalid_params. Not run locally, per the repo's testing policy; CI runs it.Demo Video
None: no visible UI change; the effect is the missing duplicate banner, covered by the socket test.
Review Trigger (Copy/Paste as PR comment)
Checklist
./scripts/reload.sh --tag <name>)