4.6 KiB
4.6 KiB
PR-23 Move Asset Action Wizard and Fs-First Relocation
Domain Owner: docs/packer
Cross-Domain Impact: docs/studio
Briefing
The action capability track already delivers REGISTER and DELETE.
The next operational action is MOVE, which must let the user relocate an asset root inside the project's assets/ tree and optionally rename the asset directory in the same flow.
Studio should own the wizard and the interaction flow. The packer should own the validation semantics, the filesystem move, the registry update, and the point snapshot patch after durable commit.
Objective
Deliver AssetAction.MOVE end to end with a Studio relocation wizard, packer-owned constraints, filesystem-first directory move, and minimal in-memory snapshot update.
Dependencies
./PR-20-asset-action-capabilities-and-register-first-delivery.md./PR-21-point-in-memory-snapshot-updates-after-write-commit.md./PR-22-delete-asset-action-confirmation-and-fs-first-manifest-removal.md
Scope
- extend the public action contract and write messages for
MOVE - expose
MOVEcapability from the packer - add a Studio wizard that collects:
- destination parent directory
- destination directory name
- derived target root inside
assets/
- add a confirmation step before execution
- add an execution/waiting step with spinner while the move is running
- allow the wizard to work as both relocate and rename of the asset directory
- enforce packer constraints that:
- the target must stay inside the project's
assets/ - the target root must not already contain
asset.json
- the target must stay inside the project's
- perform the actual move in the filesystem inside the packer write lane
- update
index.jsonand patch the runtime snapshot minimally after commit
Non-Goals
- no move outside the project's
assets/ - no directory merge behavior
- no recursive validation of non-manifest file contents
- no batch move
- no frontend-local move semantics
Execution Method
- Extend the action contract with
MOVEand add write request/response messages for asset relocation. - Add packer capability resolution for
MOVE. - Build a Studio wizard dedicated to move/rename, with:
- current asset root display
- destination parent picker constrained to
assets/ - destination directory name field
- derived target root preview
- validation feedback
- confirmation step before submit
- waiting state with spinner after submit until the write result is known
- Enforce these constraints in the packer:
- the target root must remain under
assets/ - the target root must not already contain
asset.json
- the target root must remain under
- Execute the move in the packer write lane by:
- moving the asset directory in the filesystem
- updating the registry entry root when the asset is registered
- preserving
asset_uuid
- Patch the runtime snapshot in memory after the move, without whole-project reload in the normal path.
- Let Studio refresh and reselect the moved asset after success.
- Keep the wizard open in waiting state while the move is running, then close only after success; on failure, leave the wizard recoverable with feedback.
Acceptance Criteria
MOVEis exposed through the packer action capability contract- Studio opens a wizard for
MOVE - the wizard has an explicit confirmation step before execution
- the wizard enters a waiting state with spinner while the move is in flight
- the wizard lets the user relocate and/or rename the asset directory
- the move target cannot be outside the project's
assets/ - the move target cannot already contain
asset.json - the packer performs the filesystem move
index.jsonis updated when needed- the runtime snapshot is patched minimally after success
- Studio refreshes and keeps the moved asset selected
Validation
- packer tests for move capability visibility
- packer tests for successful relocate and successful rename
- packer tests for blockers when target is outside
assets/ - packer tests for blockers when target already contains
asset.json - packer tests proving snapshot patching after move
- Studio smoke validation for wizard confirmation flow, waiting state, and post-move reselection
Affected Artifacts
prometeu-packer/prometeu-packer-api/src/main/java/p/packer/**prometeu-packer/prometeu-packer-v1/src/main/java/p/packer/**prometeu-packer/prometeu-packer-v1/src/test/java/p/packer/**prometeu-studio/src/main/java/p/studio/**prometeu-studio/src/main/resources/**