Save as you go: a field that failed to save is not sent again when the connection returns, and a server error is reported as no connection #1157
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#1157
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What exists today
static/js/app.js:2436-2477sendField()posts one field withfetchand reads the answer as JSON. On any failure the.catch(2473-2476) writes the region'sdata-offlinesentence, "Not saved: Postulo could not be reached. Press Save when it can.", and stops. The field keepsdata-unsaved, so the leave guard still asks (settleGuard, 2430-2434): nothing is lost silently, and the person is told what to do. That part is sound, and why the scout's claim is narrowed.What is missing:
windowonlineevent) or to the tab does nothing.response.json()(2449-2451) is called whatever the status; a 500 or a proxy's 502 answers HTML,json()throws, and the person is told Postulo could not be reached when it could and failed. The status is never checked.Only two pages use it:
templates/settings/appearance.html:14andsettings/accessibility.html:14, when the person has switched the feature on.What would change
online, and onvisibilitychangeto visible, queue them again throughqueueSave(which already serialises saves and carries the stamp). Clear the set on success. No timer back-off is needed: the browser'sonlineevent is the signal, and the page can always be saved with Save.response.okbeforejson(). A non-OK answer that is not the JSON refusal the view sends becomes a second sentence in the template, for exampledata-failed="Not saved: Postulo answered with an error. Press Save to try again.", translated with the page.What it saves or protects
small: on the two settings pages that save as they go, a change made while offline is saved when the connection returns instead of waiting for Save; a 5xx is described as what it is
Accessibility
must be checked: the
role="status"region (templates/settings/_save_status.html:9) must announce each state once (Saving…, Saved at…, Not saved…), and a retry that fails again must not rewrite the same sentence and announce it again; the guard must keep asking while a field is unsaved. Guarded bytests/e2e/test_save_as_you_go.py(live region present from the start, line 66; guard asks while refused, 164; scripts off, 212); no test covers a failed requestDecisions
onlineand on return to the tab only, never on a timer; the sentence still says Save works.Found by the efficiency and reliability audit of 2026-10-30 (finding A12; index postulo/postulo#1108). Checked against
mainatdaee30b15(2026-10-30).