Repository navigation
Fix four front-history bugs from the docs pass - #113
Merged
Merged
Conversation
…e rewrites Four from the docs pass, all reproduced against a live instance first. Deleting an entry sent a bare DELETE with no body. System Safety's auth tier guards every deletion whether or not Fronts is a ticked category, so the server answered 400 "Password required" and the screen showed "Delete failed" with nowhere to type. Confirmed with Fronts unticked. The delete now carries credentials and asks for them first, through the same sheet the sharing screens use. That sheet's copy was hardcoded to publishing, so it now takes a title and rationale, defaulting to what it already said; the other callers are all privacy raises and are unchanged. A deletion the server only queued was treated as done. With a grace period the server answers 202 and keeps the entry, but the call returned nothing, so the row was removed and came back on the next load with nothing marking it. The row already knows how to render a pending delete, dimmed with a badge, so it just had to stop being removed. The confirmation no longer promises "cannot be undone" when the entry will be held for a grace period instead. Emptying the custom status did nothing. The sheet trims a blank status to null and the adapter omits null, which the server reads as "leave as-is", so the old status survived. Adds clearCustomStatus alongside the existing clearEndedAt, which is the same problem already solved one field up. Every edit rewrote both timestamps. The pickers drop seconds and the sheet resent both times on every save, so a status-only edit rounded them to the minute. That shows up as edits you did not make in the web history, and it breaks contiguous-front coalescing, which the server walks by strict equality between one entry's end and the next one's start. Reproduced: a status-only edit moved a member's fronting-since from 07:00 to 09:15. Edits now send only the fields that changed, which also preserves the seconds, because an absent field leaves the stored value alone.
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.
Four front-history bugs from the docs pass. All reproduced against a live instance before fixing.
Deleting an entry failed under any auth tier. The delete was a bare DELETE with no body, and System Safety's tier guards every deletion whether or not Fronts is a ticked category, so the server answered 400 "Password required" and the screen showed "Delete failed" with nowhere to type. Confirmed with Fronts unticked. It now carries credentials and asks for them first, through the same sheet the sharing screens use. That sheet's copy was hardcoded to publishing, so it takes a title and rationale now, defaulting to what it already said; the other callers are all privacy raises and are untouched.
A queued deletion was treated as done. With a grace period the server answers 202 and keeps the entry, but the call returned nothing so the row was removed, then reappeared on the next load with nothing marking it. The row already knew how to render a pending delete, dimmed with a badge, so it mostly had to stop being removed. The confirmation also stops promising "cannot be undone" when the entry is going to be held instead.
Emptying the custom status did nothing. The sheet trims a blank status to null, the adapter omits null, and the server reads an absent field as "leave as-is". Adds
clearCustomStatusnext to the existingclearEndedAt, which is the same problem already solved one field up.Every edit rewrote both timestamps. The pickers drop seconds and the sheet resent both times on every save, so a status-only edit rounded them to the minute. That adds edits you did not make to the entry's history on the web, and it breaks contiguous-front coalescing, which the server walks by strict equality between one entry's end and the next one's start. Reproduced: a status-only edit moved a member's fronting-since from 07:00 to 09:15. Edits now send only what changed, which also preserves the seconds, since an absent field leaves the stored value alone.
Checked on device end to end: the credentials sheet appears with delete-specific wording, a wrong password is reported without losing the dialog, and a queued deletion leaves the entry in place with its pending badge. Server-side, a status-only patch leaves
ended_atat its exact sub-second value, and an explicit null clears a status where omitting it did not.