You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a Pokémon Studio contributor
I want entity mutations and unsaved changes to be managed by the back end
So that every create, update, and delete operation changes validated project state predictably
The parent contract requires getEntity, createEntity, deleteEntity, updateEntity, getEntityList, and hasProjectAnyChanges. Updates also establish the entity-scoped history used by #49.
The back-end history may be keyed by entity type and identifier, but its user-visible lifetime must remain consistent with #49: changing entity or page clears the active history, and returning does not restore it.
Acceptance Criteria
The back end can create a valid entity for a registered entity type and identifier.
Creating an entity makes it available through both the entity read operation and the relevant entity list.
The back end rejects an invalid or conflicting entity creation with an actionable error and without changing existing project data.
The back end can update an existing entity with data that passes the registered validator.
Updating an entity changes only the targeted entity and any entity lists explicitly identified as affected.
The back end rejects an invalid update with an actionable error and preserves the last valid entity state.
A successful entity update records the previous state in the history entry for that entity.
A new successful update after an undo clears the obsolete redo branch for that entity.
The back end can delete an existing entity without deleting unrelated entities.
Deleting an entity removes it from the relevant entity list and makes the prior entity query unavailable.
Creating, updating, or deleting an entity marks the project as containing unsaved changes.
A failed mutation does not mark an otherwise clean project as changed.
Each successful mutation identifies the entity and list query keys that must be invalidated.
Creating an entity invalidates the unsaved-change state and the relevant entity list.
Deleting an entity invalidates the unsaved-change state, the relevant entity list, and the deleted entity query.
Updating an entity invalidates the unsaved-change state, the affected entity query, and every affected entity-list query.
Validate valid and invalid creates, updates, and deletes; entity-list changes; dirty-state transitions; protection of unrelated entities; an update after undo; and clearing active history on entity or page change. Automated tests are strongly encouraged for validation, dirty state, and history branching, but are not required to complete this ticket.
As a Pokémon Studio contributor
I want entity mutations and unsaved changes to be managed by the back end
So that every create, update, and delete operation changes validated project state predictably
Parent
Context
The parent contract requires
getEntity,createEntity,deleteEntity,updateEntity,getEntityList, andhasProjectAnyChanges. Updates also establish the entity-scoped history used by #49.The back-end history may be keyed by entity type and identifier, but its user-visible lifetime must remain consistent with #49: changing entity or page clears the active history, and returning does not restore it.
Acceptance Criteria
Out of Scope
Decisions Still Required
Dependencies
Validation Notes
Validate valid and invalid creates, updates, and deletes; entity-list changes; dirty-state transitions; protection of unrelated entities; an update after undo; and clearing active history on entity or page change. Automated tests are strongly encouraged for validation, dirty state, and history branching, but are not required to complete this ticket.