[Foundry] Live-push UX on WikiArticle & CampaignPlanning #154
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Motivation/Context
#152 delivers the backend/adapter capability to place a token on the active scene; this issue delivers the GM-facing surface that makes it discoverable and safe to use during play, on the two pages where NPCs are read/managed today.
Approach
Add a GM-only "Send to Foundry" split-button:
webapp/frontend/src/pages/WikiArticle.jsxfor npc/creature entries, next to the #130 "Generate stat block" button.webapp/frontend/src/pages/CampaignPlanning.jsxNPC listings.Default action is "Send to live scene" (#152's
target=active_scene) when the campaign's current session isSessionStatus.in_progress(app/models/session.py:60, auto-transitioned by Celery Beat inreminder_tasks.py:1154–1196whenconfirmed_time/end_timepass — Quest Board already knows server-side when a session is live) and the connection health check (#6) passes. Otherwise the button falls back to "Send to actor directory" (#9's existingtarget=directorybehavior).Per #24's hide-don't-disable rule: the button is hidden entirely (not shown-but-disabled) when the campaign's adapter returns
Nonefornpc_to_actor.Pre-flight: reuse #6's health check on page load to decide whether the button should present itself in "live" mode, so the GM isn't surprised mid-scene by a push that silently falls back to the directory.
Feedback: queued/pushed/failed toast states matching #152's status contract, with the "no Foundry client connected" case rendered as an explicit, actionable message ("Open your Foundry world and try again").
Dependencies
Out of scope
Acceptance criteria
WikiArticle.jsx(npc/creature entries) andCampaignPlanning.jsxNPC listings.in_progressand health check passes; falls back to "Send to actor directory" otherwise.npc_to_actor.in_progresssession.[Foundry] Live-push UX on WikiArticle & CampaignPlanningto [Foundry] Live-push UX on WikiArticle & CampaignPlanning