Skip to content

Bug: Web push notifications don't link to the channel or thread #315

Closed

Description

@chmac

To reproduce

  • Configure vapid keys, enable notifications
  • Install app to home screen on iOS in Safari
  • Create two channels, #one and #two
  • Focus your UI on #two
  • Have somebody post a message to #one
  • Tap on the notification to open it

Expected result

I expect to tap the notification and see the channel and thread that the message is in.

Actual result

The site reopens where it was last, in this case in #two

Activity

  1. chmac commented on Nov 4, 2026

    @chmac
    Author

    I think this is only on iOS Safari and not on macOS Safari.

  2. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    P2Normal priority bug or improvement with limited blast radius.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Nov 4, 2026
  3. clawsweeper commented on Nov 4, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep this issue open: the reported iOS channel-navigation failure contradicts documented behavior, and current main provides no verified fix for that scenario.

    Reproducibility: The report provides a concrete two-channel iOS scenario, but no live reproduction was run; current source supports multiple explanations and does not prove which path fails.

    Maintainer decision needed

    • Question: Should thread-reply notifications open the exact thread, extending the current channel-only destination?
    • Recommendation: Investigate channel navigation first: Preserve the current destination contract while isolating the reported iOS failure, and decide thread targeting separately.
    • Why: The report requests thread targeting, but current source and tests deliberately route replies to their channel; no maintainer decision in the discussion changes that contract.

    Next step
    Reproduce a notification tap from channel two to channel one on installed iOS, recording preview type and lifecycle state before selecting a repair.

    Review details

    Best possible solution:

    Restore reliable authorized channel navigation on installed iOS apps while preserving recipient privacy, with thread targeting explicitly scoped.

    Do we have a high-confidence way to reproduce the issue?

    The report provides a concrete two-channel iOS scenario, but no live reproduction was run; current source supports multiple explanations and does not prove which path fails.

    Is this the best way to solve the issue?

    A channel-navigation repair should follow an installed-iOS reproduction that separates generic fallback from click delivery; changing focus order or adding thread routing now would be speculative.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The affected build, iOS version, notification preview type, and app lifecycle state remain unknown.
    • The available evidence cannot distinguish recipient-verification fallback from an iOS notification-click handoff failure.
    • Exact thread targeting extends the currently implemented and tested channel-only destination.

    Codex review notes: model internal, reasoning medium; reviewed against 03e85d6c704a.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P2: The reported failure requires manually finding the conversation, while messages remain accessible and no urgent regression is established.
    • impact:ux-friction: Tapping a notification reportedly returns to the previously viewed channel instead of the relevant conversation.
    Evidence reviewed

    Acceptance criteria:

    • On an installed iOS app viewing channel two, receive an authorized push for channel one and verify that tapping opens channel one.
    • Repeat with the app suspended and fully closed, recording destination URL and notification preview type.
    • Verify that failed recipient verification continues to display a generic alert without exposing a conversation path.
    • Establish a failing regression for the identified cause and retain existing warm-window and fresh-window navigation coverage.

    What I checked:

    • Report and discussion: The reporter describes receiving a push for channel one while viewing channel two, then returning to channel two after tapping it in an installed iOS Safari app. They suspect macOS Safari is unaffected and later request an explicit mention for further contact after unsubscribing from automation emails. No affected build or iOS version is supplied.
    • Verified default branch and repository policy: GitHub main and the checkout both resolve to the reviewed SHA. The full root AGENTS.md requires sqlc for SQL generation; no SQL changes are proposed. (AGENTS.md:1, 03e85d6c704a)
    • Documented navigation and intentional generic fallback: Documentation promises conversation navigation on notification taps, but explicitly withholds the conversation path when recipient verification fails, times out, or cannot reach the same-origin API. The worker implements that fallback as /app, so the report does not yet distinguish intentional fallback from failed click delivery. (docs/features/push-notifications.md:92, 03e85d6c704a)
    • Existing window and fresh window handoff: openApp posts the destination before focusing an existing app client; otherwise it opens a URL marked with from=push. ChatApp handles the message with goto and consumes the fresh-window marker during boot. These paths establish intended navigation, not successful real iOS notification delivery. (apps/web/src/service-worker.ts:140, 03e85d6c704a)
    • Coverage leaves the reported platform unverified: The existing-window test injects a service-worker message. The fresh-window test synthesizes notificationclick and replaces openWindow before manually opening the captured URL. Playwright selects Desktop Chrome; these tests do not establish installed-iOS notification-tap behavior. (tests/e2e/web-push.spec.ts:619, 03e85d6c704a)
    • Thread destination deliberately remains channel-only: webPushURL explicitly routes thread replies to their channel because message routes are minted on demand. TestWebPushBodyAndRouteDescribeTheMessage asserts /app/wsp_1/chn_1 for a reply with thread root msg_root. (apps/api/internal/httpapi/notifications.go:141, 03e85d6c704a)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 10, 2026, 8:42 AM ET / 13:42 UTC.

  4. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Nov 4, 2026
  5. 33 remaining items

  6. added
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    and removed
    clawsweeper:intake:bugPreliminary submission classification; full source review pending.
    on Nov 7, 2026
  7. steipete commented on Nov 14, 2026

    @steipete
    Contributor

    Fixed in #328. A notification click could focus an existing window without delivering navigation when the app listener was suspended or not ready. The worker now waits for a navigation acknowledgement and falls back to the destination URL if it does not receive one. Thread-reply notifications also now address the thread root instead of the channel.

    Both failures were reproduced before the fix. API regressions and all 22 notification browser tests pass, including navigation without reloading a responsive app. The combined dependency candidate also passed the full project gate, a clean vulnerability scan, and 25 focused notification/settings browser tests. The PR contains synthetic before/after captures. Physical iOS push delivery has not been exercised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions