fix(mobile): stop warning about updates that were never coming, and stop blocking starts on an unknown outcome - #515
Merged
Merged
Conversation
…top blocking starts on an unknown outcome Two screens were telling operators something untrue and taking actions away from them. Both are removed rather than reworded. A closed event's timeline is final: the only transition out of `closed` is `reopen-as-correction`, which by contract creates a distinct event, so no further entry can ever arrive. The room polled it anyway, and any ordinary network blip then rendered "New updates are not arriving. What is shown may be out of date." over a Refresh control that could not produce anything, because nothing was coming. Server logs for one such sighting show every capability succeeding and zero 5xx, so the trigger was a dropped request on the device -- normal, and not something to alarm anyone about. Polling now stops once the event is closed and that banner is never shown there. The screen's own "This event is closed. Its timeline is still here." is the whole truth. On an active event the banner is unchanged, because there it is both true and useful. An unknown start or join outcome no longer blocks anything. It was a gate that took the entire screen and refused every later start until acknowledged, which in an emergency tool is the most expensive failure available, and it bought nothing: the duplicate it guarded against is already prevented on live data by the confirmation screen, which lists the events active at the site and sends `activeEventIdsSeen` with the start. That check runs on fresh data at the moment of starting; the fence was stale state from an earlier request that could prove nothing, which is the same reason the automatic version of it was deleted in `0196d411`. The record is now disclosed as a dismissible notice on the home and start screens, with the same copy that claims nothing about what the server did, and `submit` accepts from `unresolved`, superseding it. The read-only active-event list, its refresh-error copy, and the check action existed only to serve the blocking screen and are removed with it. Coverage: a closed event schedules no poll and reports no error even when a forced refresh fails; hydration still never replays an abandoned request and still exposes no event identity across sessions, but the other session can now start; the screens render the notice and no longer gate on an unknown outcome. Gate: Prettier, ESLint and typecheck clean across the repository; 6/6 test shards green and 61 mobile native tests pass.
Review — PSD engineering standardsScope: client-only mobile change ( IMPORTANT: none. I traced the two behavioral changes against their tests:
NITs (2):
Diff is otherwise clean — good test-to-behavior correspondence on the two substantive logic changes. |
The page() helper typed its event parameter as the active EVENT fixture, so a lifecycle test could not hand it a closed event at all. It now takes the contract's event type, which is what the schema parses anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two screens told operators something untrue and took actions away from them. Both are removed rather than reworded.
1. The false banner on a closed event
Reported in the field: a closed event showing "New updates are not arriving. What is shown may be out of date. PSD EOC keeps retrying." with a Refresh now button.
The banner isn't about closure — it fires on any timeline poll error while entries are on screen. But a closed event's timeline is final: the only transition out of
closedisreopen-as-correction, which by contract creates a distinct event (event.ts:1296). No further entry can ever arrive.So on a closed event the message is false by construction, and the Refresh control cannot produce anything.
Server logs for that sighting: every capability succeeded, zero 5xx, four scattered 4xx (normal auth refresh). The trigger was a dropped request on the device — ordinary, and not worth alarming anyone about.
Fix: stop polling once an event is closed; never show that banner there. The timeline stays fully readable and the screen's own "This event is closed. Its timeline is still here." is the whole truth. On an active event the banner is unchanged — there it's true and useful.
2. The unknown-outcome gate stops blocking
An unknown start/join outcome took the whole screen and refused every later start until acknowledged. In an emergency tool that is the most expensive failure available — and it bought nothing.
The duplicate it guarded against is already prevented on live data: the confirmation screen lists the events active at the site (start/index.tsx:1111) and the start sends
activeEventIdsSeen, which the server records (events.ts:274). That runs on fresh data at the moment of starting. The fence was stale state from an earlier request that could prove nothing — the same reason the automatic version was deleted in0196d411.Fix: the record is now a dismissible notice on the home and start screens, with the same copy that claims nothing about what the server did.
submitaccepts fromunresolvedand supersedes it. Nothing is blocked.The read-only active-event list, its refresh-error copy, and the check action existed only to serve the blocking screen and are removed with it.
Coverage
Gate
Prettier, ESLint, typecheck clean repo-wide. 6/6 shards green; 61 mobile native tests pass.
Platform parity
Client-only logic and shared React Native UI. Needs verifying on iOS and Android.