fix(notifications): click payload in wire shape, no legacy context - #58
Merged
pavlo-flamingo merged 1 commit intoSep 14, 2026
Merged
Conversation
The shell projected an envelope's routing fields into a `{ context: {…} }`
click payload, read field by field from the `type` + `attributes` pair with a
fallback onto the typed `context` the backend no longer writes. The frontend's
`resolveNatsNotificationRoute` now reads `type` + `attributes` only, so a
`{ context }` payload resolved to nothing and every OS-toast click would land
on the notifications page.
The click payload is now the envelope narrowed to its routing fields, in the
envelope's own shape: top-level `type` plus `attributes` with `ticketId`,
`dialogId` and `approvalRequestId`. The action buttons read the same shape,
and `note_resolution` takes the envelope's `attributes` only. The Windows
activation URI and the button arguments carry the payload as `payload=`
instead of `context=`; a toast left in the Action Center by a previous build
opens the window without navigating.
🦩 Flamingo Code Review2 finding(s) — 0 action required · 2 recommended · 0 informational Mode: advisory · 2 defect(s) outside any rule Inline comments: 2 new Need another pass? Commits pushed after this review are not reviewed automatically.
Prefer typing? Comment React 👍/👎 on inline comments to teach the reviewer. Started 2026-09-14 18:29 UTC · updated 2026-09-14 18:29 UTC · workflow run |
aliaska-varieva
approved these changes
Sep 14, 2026
pavlo-flamingo
deleted the
fix/notification-click-payload-in-wire-shape
branch
September 14, 2026 18:51
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.
Problem
The shell projects an envelope's routing fields into a
{ context: { type, ticketId, dialogId, approvalRequestId } }click payload, read field by field from thetype+attributespair with a fallback onto the typedcontextunion. The backend has retired that union, and the frontend'sresolveNatsNotificationRoute(flamingo-stack/openframe-oss-frontend#404) now readstype+attributesonly — a{ context }payload resolves to nothing, so every OS-toast click would land on the notifications page instead of the ticket or dialog.Fix
click_payloademits the envelope narrowed to its routing fields, in the envelope's own shape: top-leveltypeplusattributeswithticketId,dialogId,approvalRequestId. The legacycontexton an envelope is ignored.notification_actionsreads the same shape:approval_request_id/dialog_idofftype+attributes.*;APPROVAL_TYPESis the catalog pair (TICKET_APPROVAL_REQUEST,MINGO_APPROVAL_REQUEST),ADMIN_APPROVAL_REQUESTis gone;note_resolutiontakes the envelope'sattributesonly.payload=(activation URI, button arguments) instead ofcontext=;payload_from_context_jsonbecomespayload_from_json. macOSuserInfoalready carried the payload verbatim.a_legacy_context_on_the_envelope_is_ignoredandids_outside_attributes_earn_no_buttons. Docs updated.Caveats
contextoff the click payload and will not route from a toast; a newer bundle with an older shell has the same problem the other way round.context=, which this build no longer parses: clicking it opens the window without navigating. Transient.Verification
cargo test: 80 passed (Windows toast codec paths are compiled under the macOS test cfg).cargo clippy --all-targets -- -D warningsandcargo fmt --all -- --checkclean.