element-hq / element-hq/element-web

Labs notification settings never converge once the server stops serving the legacy mention push rules (MSC4210)

Open
#34,999 2 comments 0 reactions 0 assignees View on GitHub
A-Notifications A-User-Settings
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Run Synapse with `experimental_features.msc4210_enabled: true`, so it stops serving the legacy text-matching mention push rules (`.m.rule.contains_display_name`, `.m.rule.contains_user_name`, `.m.rule.roomnotif`). These rules were removed from the spec in Matrix v1.17 (MSC4210); Synapse is about to stop serving them by default (element-hq/synapse#19415).
2. Enable the `feature_notification_settings2` Labs flag.
3. Open Settings → Notifications.
4. Click "Proceed" on the "Update: We've simplified Notifications Settings..." banner, or change any setting.

### Outcome

**What did you expect?**

- The banner clears after "Proceed" and the page unlocks.
- Changing a setting writes only the rules the server has, and the page saves without errors.

**What happened instead?**

The Labs page writes the three legacy rules unconditionally on every save, and treats their absence from the server's rules as a pending change. It never converges:

- Against Synapse `develop` (1.161.0rc1) with `msc4210_enabled: true`, the `PUT .../enabled` and `.../actions` requests for the missing legacy rules are accepted with `200 {}`, but the rules still do not come back on `GET /pushrules/`. The banner never clears and the page stays locked no matter how many times "Proceed" is clicked.
- Once Synapse answers `404 M_NOT_FOUND` for rules it does not have, as the spec requires (element-hq/synapse#20202), the same writes make every save fail with "Your notification settings could not be updated".

Image

Contributor guide

Open the contributing guide

Research direction

Start in the Labs notification settings page and follow the save flow for the Matrix push-rules GET and PUT requests. Reproduce with MSC4210 enabled, then verify that saves omit legacy rules absent from the server, the update banner clears, and settings remain usable without errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.