Skip to content

Settings saves have no durable retry, and a failed save is silently reverted #128

Closed

Description

@zhollis21

Problem

A settings auto-save that fails has exactly one durable recovery path: a snackbar the user has to
notice and tap within 20 seconds. Miss it and the change never reaches AniList — and is then
silently reverted the next time Settings is opened.

What retry exists today

One automatic in-client retry. AniListClient.SendAsync retries once after 750 ms
(AniListClient.cs:771), but only for kinds it classifies as transient — Network,
Authentication, Unknown. Deliberately excluded: RateLimited (AniListRateLimitHandler owns
that backoff), NotFound (deterministic), and ServiceOutage (a maintenance window will not clear
in 750 ms). So a save attempted during an AniList outage gets no automatic retry.

One manual retry. SaveSettingsAsync's catch surfaces ShowSaveFailureSnackbarAsync
(SettingsPageModel.cs:574), held for 20 seconds rather than the default precisely because "a
settings save that failed is only recoverable if the user actually notices the Retry".

Nothing else. No background queue, no retry on next launch, no retry when connectivity returns.

Two aggravating details:

  • The snackbar always offers Retry, even for ServiceOutage, where it cannot succeed for minutes or
    hours. UserFeedbackExtensions.ShowFailureSnackbarAsync already drops the retry action for that
    kind, but this call site does not go through it.
  • The save is fire-and-forget from a singleton page model, so it completes regardless of where the
    user has navigated. A failure surfaces on whatever page they are now looking at, with no context
    for what failed. (Pre-existing, and unchanged by the FlushPendingSaveAsync added in Adult-content setting commits 1.5s late and notifies nobody, leaving 18+ results on screen #118 —
    the debounce already behaved this way.)

The silent revert

c4a2830 (#129 review) landed after this was filed and closed this path for DisplayAdultContent
only. PopulateFromUser now assigns AppSettings.ResolveDisplayAdultContent(...) at
SettingsPageModel.cs:335, and SyncFromViewer clears the pending marker only when the server
reports the value being held (AppSettings.Storage.cs:148-156) — the unconditional clear that used
to sit at :353 is gone. So the adult toggle now survives a failed save.

Every other setting still reverts, because the pending marker is deliberately scoped to that one
field (AppSettings.Storage.cs:50-55):

  1. User changes a setting. It is applied locally.
  2. The save fails past both retries. The change now exists only on this device.
  3. User opens Settings later. LoadAsync fetches the viewer, which still holds the old value.
  4. PopulateFromUser assigns it straight from the viewer — SelectedTitleLanguage (:325),
    SelectedStaffNameLanguage (:326), SelectedScoreFormat (:327), AiringNotifications
    (:336), RestrictMessagesToFollowing (:337), ActivityMergeTime (:340) — and re-snapshots
    the dirty-tracking baseline at :346-352, so nothing is left to re-save.
  5. The control flips back with no explanation. The user's explicit choice is gone.

This is self-consistent — the control and AppSettings never disagree, so nothing renders a lie — and
defensible on the grounds that the server is the source of truth. But an explicit change to a
user-facing setting disappearing without a word is poor. DisplayAdultContent was called out here as
the worst case for it; it is now the only one that is protected.

Also silently dropped

SaveSettingsAsync returns immediately when IsSaving (SettingsPageModel.cs:530-533) without
scheduling anything. Both the snackbar's Retry (:577) and FlushPendingSaveAsync (:499-509) call
it directly, so either landing while a save is in flight is discarded — and HasUnsavedChanges
staying true does not re-trigger a save on its own.

Worth considering

  • Retry on connectivity restored, or on next app launch, for a change known to be unsent.
  • Persist the pending change so it survives a process kill, rather than living in memory.
  • Drop the Retry action for ServiceOutage here, the way ShowFailureSnackbarAsync already does.
  • If a change is ultimately discarded, say so rather than silently reverting the control.
  • The persistent inline banner in Improve in-app banners and status messages #26 is the natural surface for "your change did not save" — the
    snackbar is the wrong affordance for something that needs to outlive 20 seconds.

Acceptance

  • A settings change that fails to save is not silently discarded; the user is told, or it is retried.
  • No Retry affordance is offered for a failure kind where a retry cannot succeed.
  • A save request arriving while another is in flight is coalesced, not dropped.
  • A pending change survives navigating away from Settings and back. Surviving a process kill is
    explicitly out of scope here
    — it needs the change persisted to disk and reconciled against a
    possibly-newer server value, which belongs with Improve in-app banners and status messages #26's persistent banner. Tracked there.

Related

Activity

  1. added
    bug
    on Aug 24, 2026
  2. zhollis21 commented on Aug 24, 2026

    @zhollis21
    OwnerAuthor

    Verification notes (kickoff)

    Re-checked against origin/main @ 57f4d4e. The retry gap is confirmed; the "silent revert" walkthrough has been overtaken by a commit that landed after this was filed.

    Confirmed — retry.

    • SendAsync retries once after 750 ms (AniListClient.cs:771-772), gated on IsTransient = Network / Authentication / Unknown (:774-775), applied at :787. RateLimited, NotFound and ServiceOutage are excluded.
    • SaveSettingsAsync's catch calls ShowSaveFailureSnackbarAsync (SettingsPageModel.cs:567), defined at :577, which calls _feedback.ShowSnackbarAsync(message, "Retry", …, 20s) directly and so always offers Retry.
    • UserFeedbackExtensions.ShowFailureSnackbarAsync does drop the retry action for ServiceOutage (UserFeedbackExtensions.cs:20-23); this call site does not go through it.
    • No queue, launch-time retry or connectivity-triggered retry exists anywhere in the settings path.

    Stale — the walkthrough's line numbers and its adult-content conclusion.

    c4a2830 ("Don't treat every viewer response as confirming a pending adult-content change", #129 review) landed 2026-08-24 08:58 EDT, after this issue was filed, and changed exactly the code steps 3-5 describe:

    • PopulateFromUser no longer assigns the viewer's value straight through. It now assigns AppSettings.ResolveDisplayAdultContent(user.Options.DisplayAdultContent) at SettingsPageModel.cs:335.
    • SyncFromViewer (AppSettings.Storage.cs:132-159) clears _displayAdultContentAwaitingUpstream only when the server reports the value being held (:148-156); a plain load no longer clears it. The old unconditional clear at :353 is gone.

    So for DisplayAdultContent the marker now survives a failed save and subsequent Settings visits, and the toggle does not flip back.

    Still live for every other setting.

    The pending marker is scoped to that one field by design (AppSettings.Storage.cs:50-55). PopulateFromUser assigns the rest straight from the viewer — SelectedTitleLanguage (:325), SelectedStaffNameLanguage (:326), SelectedScoreFormat (:327), AiringNotifications (:336), RestrictMessagesToFollowing (:337), ActivityMergeTime (:340) — and re-snapshots the dirty-tracking baseline at :346-352. A failed save of any of those is still reverted on the next Settings visit with no message.

    One more silent-drop path.

    SaveSettingsAsync returns immediately when IsSaving (SettingsPageModel.cs:530-533) without scheduling anything. Both ShowSaveFailureSnackbarAsync's Retry (:577) and FlushPendingSaveAsync (:499-509) call it directly, so either one landing while a save is in flight is dropped, and HasUnsavedChanges staying true does not by itself re-trigger a save.

  3. zhollis21 commented on Aug 24, 2026

    @zhollis21
    OwnerAuthor

    Updated during planning:

    • "The silent revert" was rewritten. c4a2830 landed about eleven hours after this was filed and fixed exactly steps 3-5 — but only for DisplayAdultContent, so its line references (:330, :353) no longer exist and the conclusion had inverted: that setting is now the only protected one, and every other setting still reverts. The walkthrough now cites the assignments that actually still do it.
    • Added the IsSaving early-return as a second silent-drop path. A Retry tap or a navigate-away flush landing during an in-flight save is discarded, with nothing to re-trigger it.
    • Acceptance: added coalescing, and narrowed "not lost by backgrounding or killing the app" to surviving navigation. Persisting an unsent change to disk needs a reconciliation rule against a possibly-newer server value, which belongs with Improve in-app banners and status messages #26 rather than here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions