Sub-issue of #488. webjs's RPC stub has no cancellation: a superseded async render() refetch keeps its network request in flight, and there is no way to abort an action call. TanStack Start passes a signal: AbortSignal to the server fn and the client can abort.
Design / approach
Pass an AbortSignal to the action (the server handler aborts when the client disconnects) and expose cancellation to the client stub. Crucially, wire it to webjs's existing async-render supersede token (__renderToken in component.js): when a prop change supersedes an in-flight async render(), abort the previous render's RPC instead of letting it complete and get dropped. Compose with streaming RPC (a cancelled stream stops on both ends). Keep it opt-in / automatic where safe (a superseded render auto-aborts).
Acceptance criteria
Sub-issue of #488. webjs's RPC stub has no cancellation: a superseded
async render()refetch keeps its network request in flight, and there is no way to abort an action call. TanStack Start passes asignal: AbortSignalto the server fn and the client can abort.Design / approach
Pass an
AbortSignalto the action (the server handler aborts when the client disconnects) and expose cancellation to the client stub. Crucially, wire it to webjs's existing async-render supersede token (__renderTokenin component.js): when a prop change supersedes an in-flightasync render(), abort the previous render's RPC instead of letting it complete and get dropped. Compose with streaming RPC (a cancelled stream stops on both ends). Keep it opt-in / automatic where safe (a superseded render auto-aborts).Acceptance criteria
AbortSignal; aborting it (client disconnect or explicit) stops server work where possible.async render()refetch aborts its in-flight RPC (network probe shows the request cancelled).