Skip to content

fix: refresh notification settings after Web Push updates - #178640

Merged
shakkernerd merged 1 commit into
mainfrom
settings-notification-state
Oct 20, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
settings-notification-state

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #178631

What Problem This Solves

Settings → Notifications can stay on Checking and Not requested after Web Push registration completes, leaving users without the Unsubscribe action until they reload. Progress publications can also leave the Enable notifications label unchanged while registration is running.

User Impact

The mounted Settings page updates its Web Push status, preferences and available actions when the existing notification capability publishes state. Browser consent, registration and unsubscribe behavior stay with their current owners. This change adds no configuration, permissions, persistence or dependencies.

Why This Change Was Made

Web Push updates one mutable snapshot in place. Settings already observes each capability publication, but forwards the same snapshot object through a downstream Solid equality check. The page now derives a shallow presentation value at that existing boundary so each publication reaches the rendered controls. Native notifications already replace their snapshot and are unchanged.

The regression mounts the existing ConfigPage once, publishes loading and registration/preferences updates from a stable snapshot, checks the visible controls, then clicks Unsubscribe and verifies the disable action. It exercises the rendering boundary that the existing direct snapshot assertions could not cover.

Evidence

On unchanged production baseline 432bada3bd86902d7486472f6dbc973e2d4898cf, the mounted regression fails because the button remains Enable notifications after the loading publication. The focused baseline command is pnpm test ui/src/pages/config/config-page.test.ts --maxWorkers=1 -t "renders Web Push registration publications"; Vitest reported 4.17s, with 5.52s for the native test invocation.

The corrected tree passed changed-file formatting with Bun parity, source lint, UI catalog verification, and all 14 selected compiler graphs. The related test batch passed 139 cases across nine Settings files, including the complete ConfigPage file and its loading, granted/registered, preference and Unsubscribe assertions. The native test batch took 24.71s; its two Vitest shards took 9.16s and 11.26s. Hosted CI run 39473923740 passed. Its three UI unit rows took 432s, 376s and 365s, and its selected mocked UI E2E row took 116s; these include the wider selected suites, not just this regression.

Actual browser verification on a built integration runtime containing the same presentation change completed Ready → Subscribed/Granted → Ready/Not subscribed without reloading between the actions. Exactly one browser/Gateway registration and one unsubscribe completed, leaving no browser subscription. The owned test device was removed through its native owner and existing authority/configuration was preserved. Independent review accepted this evidence together with the public-head regression and CI.

The recording's integration producer is d76083dff482e736914be6da5a237b736f76c4a8, distinct from public PR head 7419dcdeba3810c347dc6ed545181d001bc825d1. Scoped source comparison confirms that the recorded baseline-to-candidate notification path differs only by this PR's snapshot-copy hunk. Browser permission was granted in the isolated test profile; this does not demonstrate a human consent dialog, and no notification delivery was tested. The older capture already showed Checking before Enable; the comparison establishes stale state after successful registration, not the cause of its initial Checking state.

Visual evidence

Open preview

Before After
Earlier build: registration succeeded but Settings stays Checking with no Unsubscribe Corrected integration build: Subscribed and Granted with Unsubscribe available

Continuous registration and unsubscribe on the corrected integration runtime

notifications-enable-unsubscribe-continuous.mp4

Visual verification

  • Baseline: 617f152e8112ae21211e84f3461d74efdff218b4
  • Exact head: d76083dff482e736914be6da5a237b736f76c4a8
  • Scenario: Enable browser notifications, observe Subscribed and Granted without reloading, then use Unsubscribe. Browser permission is pre-granted in an isolated test profile; no human-consent-dialog or notification-delivery claim.
  • Runtime/build: Built integration runtime d76083dff482e736914be6da5a237b736f76c4a8, tree 5a50037043c9fc8b138356d1c605d73e3082a05e; contains the exact Settings presentation change from public PR head 7419dcd. Public-head mounted regression and CI are separate proof.
  • Actual effects: One browser/Gateway subscribe and one browser/Gateway unsubscribe; final browser subscription absent.
  • Final state: Ready, Granted, Not subscribed; no Checking or error state.
  • Same Notifications card, dark theme, 1280×720 source viewport and x400/y40 crop to 880×360. Separate captures, not synchronized; baseline already showed Checking before Enable.
  • The only changed file in this notification path between the retained baseline and corrected integration producer is the exact shallow snapshot-copy hunk.
  • All 825 frames of the continuous 33-second interval were inspected; no splice, retiming or synthetic product content.
  • The test device was removed through its native owner; existing device authority and profiles were preserved.
  • Existing keypair/configuration preserved. Permission grant is not human-consent-dialog proof; no notification was sent.

@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Refreshes mounted notification controls when Web Push publishes changes to its mutable snapshot.

Example: Enable browser notifications while Settings → Notifications remains open.

  • Before: Completed registration can leave Checking and Not requested visible without Unsubscribe.
  • After: Publications update progress, Granted and Subscribed status, saved preferences, and Unsubscribe.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused patch and meaningful mounted regression support correctness, while the explicitly pending browser evidence prevents completion.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Settings can display stale notification status and omit Unsubscribe after successful browser registration.
Reason: The maintainer-authored direction restores documented notification management without adding settings, permissions, persistence, or competing owners.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a current Settings rendering defect with a focused patch; no actionable code findings were identified.

Priority: P2
Reviewed head: 7419dcdeba3810c347dc6ed545181d001bc825d1

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide the pending browser run showing registration updates the same mounted Settings page and its Unsubscribe action completes, with sanitized before/after screenshots or a recording.
Agent review details

How this fits together

The Web Push capability publishes browser and Gateway notification state; Settings projects that state into rendered status, preferences, and action callbacks.

flowchart LR
  A[Browser and Gateway] --> B[Web Push capability]
  B --> C[Owner projection]
  C --> D[Settings presentation]
  D --> E[Notification controls]
  E --> B
Loading

Technical review

Best possible solution:

Retain the existing capability and projection owners, deriving a fresh notification presentation value at the Settings boundary.

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

Current main exposes the stable mutable snapshot to an identity-sensitive Show boundary, matching the reported baseline mounted-test failure; this read-only review executed no tests or browser reproduction.

Is this the best way to solve the issue?

The shallow derived value is the smallest complete repair at the existing presentation boundary, and the added mounted regression covers the failure missed by direct snapshot assertions.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Settings notification snapshot projection keeps the original intent (d5c323b: Move redraw-only subscriptions into owner projections while preserving page behavior; this identifies the projection change, not the original introduction of the rendering defect.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +1, Tests +56. Total +57 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 1 +1
Tests 1 56 0 +56
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 58 1 +57

Labels

Label changes:

  • add P2: Incorrect notification progress and completion controls cause limited Settings friction, with reload providing recovery.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Incorrect notification progress and completion controls cause limited Settings friction, with reload providing recovery.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the pending browser registration and Settings unsubscribe verification with sanitized visual evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 20, 2026, 2:54 PM ET / 18:54 UTC.

@shakkernerd
shakkernerd merged commit f6ed661 into main Oct 20, 2026
117 checks passed
@shakkernerd
shakkernerd deleted the settings-notification-state branch October 20, 2026 22:43
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: notification Settings updates its status and actions after Web Push state changes without requiring a reload.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
…78640)

Keep notification status, preferences and Unsubscribe current after Web Push state updates.

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

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Settings keeps stale notification status after Web Push updates

1 participant