Make folder pin feedback immediate - #49
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8005e722b7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const previousPinned = normalizeDockerPinnedFolderIdList(folderTypePrefs?.pinnedFolderIds); | ||
| const optimisticPinned = requestedPinned === true ? (previousPinned.includes(id) ? previousPinned : [...previousPinned, id]) : previousPinned.filter((entry) => entry !== id); |
There was a problem hiding this comment.
Roll back to the last confirmed pin state
When multiple Pin/Unpin intents are submitted while a save is in flight, folderTypePrefs already contains the preceding optimistic intent, so previousPinned may represent a state that was never persisted. For example, if Pin is followed by Unpin and both requests fail during a network outage, the latest failure restores the transient pinned state even though the server and the user's latest selection are unpinned. Keep a server-confirmed snapshot for rollback rather than capturing the current optimistic preferences; the VM implementation has the same pattern.
Useful? React with 👍 / 👎.
What changed
2026.07.28.09with curated release notes and refreshed SBOM/runtime integrity metadata.Root cause
Docker fetched current preferences before updating the row. The support evidence showed that preference request taking roughly 875 ms, making the network round trip directly visible. Queued reverse actions also could not apply visually until the previous persistence action finished.
Validation