prometeu-studio/discussion/workflow/plans/PLN-0055-assets-workspace-scene-bank-validation-and-acceptance-flow.md
2026-04-18 18:15:23 +01:00

6.0 KiB

id ticket title status created completed tags
PLN-0055 studio-tiled-parser-assets-scene-asset-type Assets Workspace Scene Bank Validation and Acceptance Flow open 2026-04-17
studio
assets
scene
validation
ux

Objective

Implement the Assets workspace flow that validates external Tiled edits, surfaces diagnostics, and requires explicit Studio-side acceptance before a Scene Bank is considered ready.

Background

DEC-0027 requires the initial workflow to be:

  1. create the scene asset in Studio;
  2. edit generated TMX/TSX in Tiled;
  3. return to Studio;
  4. validate;
  5. explicitly accept the converged changes.

The decision explicitly forbids silent auto-acceptance and requires the same general diagnostic discipline already used for glyph assets. The current Assets workspace already contains refresh, detail, action, and diagnostics surfaces that can host this flow without creating a dedicated scene workspace.

Scope

Included

  • Add scene-bank validation state to the Assets workspace projections.
  • Add explicit actions to validate and accept external scene-bank changes.
  • Surface scene/Tiled diagnostics in the existing asset details/logging patterns.
  • Ensure readiness/build participation reflects acceptance state for scene banks.

Excluded

  • Automatic merge/convergence of external edits.
  • A dedicated scene-editing workspace.
  • Pack/runtime publication.

Execution Steps

Step 1 - Extend asset details state for scene-bank validation

What: Add the projection/state needed to represent scene-bank validation and acceptance status in the assets UI.

How: Extend the asset workspace message and detail-state models so scene-bank assets can expose pending external changes, validation result, acceptance readiness, and scene-specific actions while reusing the current details/action host rather than adding a separate workspace.

File(s):

  • prometeu-studio/src/main/java/p/studio/workspaces/assets/messages/AssetWorkspaceAssetDetails.java
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/messages/AssetWorkspaceDetailsViewState.java
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/messages/AssetWorkspaceAssetAction.java
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/details/AssetDetailsControl.java
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/dialogs/AssetDiagnosticsDialog.java

Step 2 - Add validate/accept actions to existing assets action surface

What: Add the concrete user actions for scene-bank validation and explicit acceptance.

How: Extend the existing asset actions surface so scene-bank assets can trigger validation against current TMX/TSX and then explicitly accept the converged result. Keep these actions stacked with existing asset actions, in line with DEC-0027, and ensure availability is driven by asset family/state rather than a new intermediate panel.

File(s):

  • prometeu-studio/src/main/java/p/studio/workspaces/assets/details/summary/AssetDetailsSummaryControl.java
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/details/AssetDetailsUiSupport.java
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/details/... action-host controls discovered during implementation
  • prometeu-studio/src/main/resources/i18n/messages.properties

Step 3 - Connect validation results to diagnostics and readiness gates

What: Make validation outcome meaningful to the workflow.

How: Reuse the current diagnostic/log/event patterns so unsupported references, broken paths, invalid tilemap-to-layer mapping, and unsupported Tiled constructs surface as diagnostics. Mark the scene bank as not ready until validation succeeds and explicit acceptance is recorded. Reflect this status in build participation or equivalent readiness signals without implementing pack publication itself.

File(s):

  • prometeu-studio/src/main/java/p/studio/workspaces/assets/messages/events/...
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetLogsPane.java
  • prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetWorkspace.java
  • any validation coordinator/services created for scene-bank acceptance

Test Requirements

Unit Tests

  • Add tests for scene-bank details state transitions: created, externally changed, validation failed, validation passed, accepted.
  • Add tests proving accept is unavailable when validation diagnostics remain.
  • Add tests proving scene-bank actions are hosted in the existing asset actions surface.

Integration Tests

  • Add assets workspace tests covering refresh after external file edits, validation, diagnostics surfacing, and explicit acceptance.
  • Add fixture-backed tests covering invalid TSX references, unsupported TMX features, and broken layer-to-tilemap mappings.

Manual Verification

  • Create a scene bank in Studio, edit its TMX/TSX externally in Tiled, return to Studio, validate, and explicitly accept.
  • Confirm the asset stays unready when diagnostics remain and becomes ready only after successful validation plus explicit acceptance.

Acceptance Criteria

  • Scene-bank assets expose validate/accept actions in the existing asset action surface.
  • Studio surfaces scene-bank diagnostics using the existing general diagnostic discipline.
  • Studio does not silently auto-accept external Tiled edits.
  • A scene bank is not considered ready until validation succeeds and the user explicitly accepts the result.
  • No part of the workflow introduces a dedicated scene workspace.

Dependencies

  • Depends on DEC-0027.
  • Depends on PLN-0053 for asset/state foundations.
  • Depends on PLN-0054 for TMX/TSX ingest and validation inputs.

Risks

  • If refresh and validation state are coupled too loosely, the UI can show stale readiness after external edits.
  • If acceptance is represented only in transient UI state, Studio may lose the required gate after reload.
  • If diagnostics are not normalized with existing asset flows, scene-bank errors will feel like a separate subsystem.