Repository navigation
Description
Summary
onTogglePaginatedLists (clients/web/src/App.tsx) derives its rollback baseline from the servers list:
const current = servers.find((s) => s.id === activeServerId);
const prevSettings = current.settings ?? EMPTY_SETTINGS;servers only advances when a GET /api/servers succeeds. So once a list read fails, prevSettings is pinned to a value that is no longer what is on disk — and the #1721 rollback path then reverts to it.
Steps to reproduce
- Toggle pagination on. The
PUTsucceeds, the list reload afterwards fails (a container with no reachable keychain used to do this — KeyringSecretStore throws from the AsyncEntry constructor, defeating its own degradation contract (500 on GET /api/servers) #1848 — but any list-read failure will). - Toggle pagination off. This time the
PUTitself fails. - The Primitive lists: raw-request controls — cacheMode (bypass/refresh) + single-page fetch #1721 catch reverts to
prevSettings, read from the staleserversentry:paginatedLists: false.
Expected: the UI reverts to what is on disk — true, written in step 1.
Actual: the UI shows false, contradicting disk until the next successful list read.
Not a regression from #1914
Worth stating plainly, since this was found while reviewing #2087: the end state is identical before and after that PR.
Before it, a failed reload was silent — updateServerSettings resolved, no catch ran, so the optimistic override stayed set while servers went stale. After it, the reload rejects with a ServerListReloadError and the toggle deliberately skips its rollback, leaving the same override set and the same servers stale. Either way step 2 reads its baseline from the same stale entry and lands on the same wrong value.
So this is a pre-existing weakness in where the #1721 rollback reads its baseline, not something the reload-error handling introduced. It was left out of #2087 on that basis rather than expanding a bug fix into an adjacent one.
Suggested fix
Track the last successfully written settings — a ref updated when a PUT resolves — and roll back to that instead of to the servers entry, falling back to servers when no write has happened this session. A regression test needs the full two-toggle sequence (reload-failure, then PUT-failure); asserting on a single failed toggle cannot distinguish the baselines.
Credit: spotted by Copilot in review round 2 of #2087.
Activity
cliffhall commentedon Aug 23, 2026
Triage: Priority Low (total 5)
buglabel, +1 milestoned (filed through the create flow, so approved on arrival)Board: #28, Status
Todo, milestone v2.4.0.fix(web): follow a rename whose list reload failed, and drop a double…
fix(web): key the rollback baseline per server, and pair it at comple…
Merge branch 'v2/main' into v2/fix/1914-surface-post-add-refresh-failure
fix(web): roll a failed settings write back to what actually landed