Skip to content

query islands: useIslandMutation missing onMutate/onSettled (no true optimistic rollback) #210

Description

@rickylabs

Problem. In alpha.18, useIslandMutation exposes only mutationFn/onSuccess/onError. True optimistic UI (snapshot → optimistic cache write → reconcile/rollback) needs onMutate and onSettled. VS4's KnowledgePanel had to emulate optimistic prepend + rollback with a local overlay because those hooks aren't available.

Proposal. Add onMutate (returns a context/snapshot) and onSettled to the mutation options, matching TanStack Query semantics, so islands get real optimistic rollback + invalidation without per-app overlays.


Surfaced during the eis-chat v2 refactor (netscript alpha.18). Promotion candidate → @netscript/fresh-ui / web-layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions