Targeted cancel for a single combat tracker action's in-flight prompt —
the GM "Mark Resolved" escape hatch's cancellation mechanism
(module:documents/combat.mjs#markActionResolved). Unlike
cancelAllPendingRequests (a blanket cancel of every outstanding
request, intentionally no longer called from the advance-lock conflict
path — see .claude/contexts/combat.md's "Advance-During-Pending-Prompt
Race"), this only ever touches the request(s) tied to actionId, leaving
every other in-flight prompt (for other actions, or non-action prompts)
completely untouched.
Checks two registries in order, since which one holds the live entry
depends on who's rendering the prompt:
_pendingRequests — this client (necessarily the lead GM, since combat
resolution only ever runs there) dispatched the prompt to a delegate/
lead-GM on another client (e.g. the player who owns the target actor).
Cancelling here rejects with BmsPromptAbort and also emits
prompt.cancel so the remote client's rendered dialog closes too.
_activeRemotePrompts — this client is itself rendering the prompt
locally because no other delegate was available (e.g. the GM's own
interactive target/template/burst picker, or the Survey Environment
dialog). Aborted via abortLocalPrompt, which invokes the
renderer's registered abort function — every renderer's abort path
ends in the same BmsPromptAbort throw as a normal user cancel.
Neither registry entry resolves/rejects synchronously in a way the caller
can await directly (the reject only starts the unwind — the awaiting
_resolveOneAction/system.resolve() chain still needs its own microtask
turns, and for the local-render path a DOM click-simulation + finally
cleanup, to actually finish propagating). Callers that need the associated
ResolvePass claim to be released before proceeding (as markActionResolved
does) must poll/await that separately once this returns found: true.
Targeted cancel for a single combat tracker action's in-flight prompt — the GM "Mark Resolved" escape hatch's cancellation mechanism (module:documents/combat.mjs#markActionResolved). Unlike cancelAllPendingRequests (a blanket cancel of every outstanding request, intentionally no longer called from the advance-lock conflict path — see
.claude/contexts/combat.md's "Advance-During-Pending-Prompt Race"), this only ever touches the request(s) tied toactionId, leaving every other in-flight prompt (for other actions, or non-action prompts) completely untouched.Checks two registries in order, since which one holds the live entry depends on who's rendering the prompt:
_pendingRequests— this client (necessarily the lead GM, since combat resolution only ever runs there) dispatched the prompt to a delegate/ lead-GM on another client (e.g. the player who owns the target actor). Cancelling here rejects with BmsPromptAbort and also emitsprompt.cancelso the remote client's rendered dialog closes too._activeRemotePrompts— this client is itself rendering the prompt locally because no other delegate was available (e.g. the GM's own interactive target/template/burst picker, or the Survey Environment dialog). Aborted via abortLocalPrompt, which invokes the renderer's registered abort function — every renderer's abort path ends in the same BmsPromptAbort throw as a normal user cancel.Neither registry entry resolves/rejects synchronously in a way the caller can await directly (the reject only starts the unwind — the awaiting
_resolveOneAction/system.resolve()chain still needs its own microtask turns, and for the local-render path a DOM click-simulation +finallycleanup, to actually finish propagating). Callers that need the associatedResolvePassclaim to be released before proceeding (asmarkActionResolveddoes) must poll/await that separately once this returnsfound: true.