Skip to content

feat(ux): optimistic swipe-delete on list (perceived speed)#138

Merged
os-zhuang merged 1 commit into
mainfrom
feat/speed-optimistic-list-delete
Jun 11, 2026
Merged

feat(ux): optimistic swipe-delete on list (perceived speed)#138
os-zhuang merged 1 commit into
mainfrom
feat/speed-optimistic-list-delete

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

Second slice of the 感知速度 (perceived speed) track.

Swipe-deleting a list row previously did await client.data.delete() then refetch() — the row lingered until the round-trip and refetch completed. Now the row disappears the instant you confirm:

  • a pendingDeletes set hides the row optimistically (and updates the record count)
  • a failed delete restores the row and toasts the error
  • the set auto-prunes once a refetch reflects the deletion, so it can't grow unbounded across a session

Verification

  • tsc --noEmit clean
  • eslint clean
  • 1337 tests pass

(Swipe gestures can't be driven via the web-preview harness's synthetic events; the optimistic/restore logic is type- and unit-checked. Verified no render regression on the live 9.0 account list.)

🤖 Generated with Claude Code

Deleting a row from the list now removes it instantly on confirm instead
of waiting for the server round-trip + refetch. A pendingDeletes set hides
the row optimistically; a failed delete restores it and toasts the error,
and the set auto-prunes once a refetch reflects the deletion so it can't
grow across a long session. The record count reflects the optimistic state
too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@os-zhuang os-zhuang merged commit 90e6955 into main Jun 11, 2026
@os-zhuang os-zhuang deleted the feat/speed-optimistic-list-delete branch June 11, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant