-
-
Notifications
You must be signed in to change notification settings - Fork 679
Open
Labels
P1 high-prioritya-data-syncZulip's event system, event queues, staleness/livenessZulip's event system, event queues, staleness/livenessa-redux
Description
In the office last week, @gnprice and I found some bundles of problems with how our reducers handle LOGIN_SUCCESS, REGISTER_COMPLETE, and DEAD_QUEUE. Here's a summary I put together just now, made a bit more specific with help from git grep:
- Consistently clear old data on all ways of leaving an account #4446: A bunch of server data, and some per-account client-side data (
outboxanddrafts) isn't being cleared onLOGIN_SUCCESS, but it should be - (done in model: Make REGISTER_COMPLETE reset some state we forgot about #5613)
REGISTER_COMPLETEshould reset or replace all server data and server-data metadata, but it isn't in some cases:- server data:
topics,typing(should reset) - server-data metadata:
fetching(should reset)
- server data:
- (Open PR: model [nfc]: Comment on rest of REGISTER_COMPLETE handlers that reset state #5630) Some reducers don't have a comment saying why they reset state on
REGISTER_COMPLETEinstead of taking data from its payload:- For example,
flagsReducershould point out thatmessagesReducerdoesn't store messages onREGISTER_COMPLETE, andmessagesReducershould say that it doesn't do that because we fetch messages withGET /messages. - (Probably plenty of other instances.)
- For example,
-
DEAD_QUEUEshould clear out server-data metadata, but it isn't in some cases:caughtUpfetching
- (Open PR: typing model: Don't reset on DEAD_QUEUE #5631)
DEAD_QUEUEis clearing outtypingbut probably doesn't need to; we don't clear other server data onDEAD_QUEUE, plus there's already a client-side component that makes this feature fail gracefully in the presence of stale server data (a timeout to clear typing indicators)
gnprice
Metadata
Metadata
Assignees
Labels
P1 high-prioritya-data-syncZulip's event system, event queues, staleness/livenessZulip's event system, event queues, staleness/livenessa-redux