Asyncredux action status

From marcglasberg/async_redux · View interactive version

Asyncredux action status is an AI agent skill from the GitHub repository marcglasberg/async_redux. Inspect one AsyncRedux action's completion, errors, or lifecycle for follow-up behavior and tests.

How to use this skill

Skill file

Inspect dispatch completion

Await dispatchAndWait and use status.isCompletedOk for a follow-up that depends

on success. isCompletedFailed identifies a completed failure. Each ActionStatus

is an immutable snapshot, so read action.status again after waiting if you captured

it earlier. For reactive UI, use selected state and the waiting and failure helpers.

This helper uses the app base action from the setup skill.

Future<void> saveAndClose(BuildContext context, AppAction saveAction) async {
  final status = await context.dispatchAndWait(saveAction);
  if (status.isCompletedOk && context.mounted) {
    Navigator.of(context).pop();
  }
}

In tests, originalError is the error from the action and wrappedError is the

final error after local and global error handling. The hasFinishedMethodBefore,

hasFinishedMethodReduce, and hasFinishedMethodAfter flags help diagnose where

the lifecycle stopped. Unhandled errors can propagate from a dispatch.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.