Broadcast read-state changes to experimental clients (#61852)

## Why

Clients need read-state updates for threads they have not opened so they can keep thread lists current.

## What changed

Broadcast `thread/readState/changed` to initialized experimental clients whenever a durable read receipt changes, regardless of thread subscription. Preserve filtering through `optOutNotificationMethods` and document refreshing the list after reconnecting to recover missed changes.

## Testing

Add a WebSocket regression test verifying that an unsubscribed experimental client receives updates while clients without the experimental capability and clients that opt out do not.

GitOrigin-RevId: a1a0f29405a856fdf6e379ded1376ed7d3d765cb
This commit is contained in:
yiqian-oai
2026-11-16 18:20:25 +00:00
committed by copyberry
parent effad7568c
commit 35145aba21
5 changed files with 97 additions and 17 deletions
@@ -2446,13 +2446,7 @@ impl ThreadRequestProcessor {
};
match retirement {
Ok(true) => {
super::thread_read_state::notify(
db,
&self.thread_state_manager,
&self.outgoing,
thread_id,
)
.await;
super::thread_read_state::notify(db, &self.outgoing, thread_id).await;
}
Ok(false) => {}
Err(err) => {