Skip to content

[Application] Preserve scenario authoring state#201

Closed
SilverSupplier wants to merge 3 commits into
mainfrom
review/pr-193-authoring-state
Closed

[Application] Preserve scenario authoring state#201
SilverSupplier wants to merge 3 commits into
mainfrom
review/pr-193-authoring-state

Conversation

@SilverSupplier
Copy link
Copy Markdown
Collaborator

Summary

  • Rebase PR [Application] Add alternative scenario diff tracking and demo state #193 scenario duplication/demo work onto the latest main.
  • Preserve baseline/alternative authoring state when returning from results or using Run Again / fast-forward result paths.
  • Polish the scenario authoring inspector with structured scenario and change cards, and shorten the demo doorway block to 60 seconds.

Related Issue

Area

  • Engine
  • Domain
  • Application
  • Docs
  • Build
  • Analysis
  • Chore

Architecture Check

  • I kept the dependency direction application -> domain -> engine.
  • I did not add Qt UI code to src/domain.
  • I did not add domain or application dependencies to src/engine.
  • I used src/ as the include root.

Verification

  • cmake --preset windows-debug
  • cmake --build --preset build-debug
  • ctest --preset test-debug
  • Not run (reason below)

Risks / Follow-up

Move scenario duplication logic out of the widget into the domain layer
and compute variationDiffKeys from the actual baseline-vs-variant field
delta instead of a hardcoded "branch.duplicated" marker.

- domain: duplicateScenarioDraft, computeScenarioDiffKeys (new
  ScenarioAuthoring.cpp).
- application: ScenarioAuthoringWidget delegates duplication to the
  domain helper, recomputes variationDiffKeys on every mutation point
  (placements, events, connection blocks), and shows the keys in the
  inspector instead of synthetic counters.
- tests: ScenarioAuthoringTests covering deep copy, source preservation,
  and per-field diff detection.

Refs #188, #189.
@SilverSupplier SilverSupplier requested a review from learncold as a code owner May 7, 2026 15:21
@SilverSupplier
Copy link
Copy Markdown
Collaborator Author

Closing in favor of #193; the review branch changes have been applied to feature/us-06-scenario-duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant