Fantasia action manager

From vishiri/fantasia-archive · View interactive version

Fantasia action manager is an AI agent skill from the GitHub repository vishiri/fantasia-archive. Centralized renderer action manager: registry, sync FIFO queue, fire-and-forget async dispatch, unified error reporting (single console row + single toast), session-only action history, and the DialogActionMonitor surface. Use when adding or migrating user-meaningful UI actions, when a save/dialog n

How to use this skill

Skill file

Fantasia Archive — action manager (faActionManager)

What exists today

Single-toast rule

Action manager = only error toasts for registered actions. Handlers throw or return false; stores must not emit duplicate negative Notify. Success toasts may stay in store when user-relevant.

saveProjectSettings: project name + optional worlds snapshot via faProjectWorldsPersistSnapshotFromDialog.

Migrated call sites (today)

Adding a new action (checklist)

  1. types/I_faActionManagerDomain.ts — append id + payload map entry
  2. faActionDefinitionHandlers.ts + row in faActionDefinitions.ts (kind, optional dedup)
  3. Call sites → runFaAction / runFaActionAwait
  4. i18n: reuse globalFunctionality.faActionManager.actionFailed template
  5. Tests: src/scripts/actionManager/_tests/ + call site tests; keybind routes → faKeybindRunCommand tests
  6. Strip duplicate negative Notify from handlers/stores

File map

Tests

Key suites: faActionDefinitions, faActionManagerRun, faActionManagerSyncQueue, faActionManagerHistory, faActionManagerErrorReporting*, faActionManagerStoreBridge, migrated call sites, DialogActionMonitor Vitest/Playwright, checkActionMonitor.playwright.spec.ts

Related

Types

Shared types → types/. See types-folder.mdc.

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.