Skip to content

[Application] Add alternative scenario diff tracking and demo state#193

Merged
SilverSupplier merged 3 commits into
mainfrom
feature/us-06-scenario-duplication
May 7, 2026
Merged

[Application] Add alternative scenario diff tracking and demo state#193
SilverSupplier merged 3 commits into
mainfrom
feature/us-06-scenario-duplication

Conversation

@SilverSupplier
Copy link
Copy Markdown
Collaborator

Summary

  • Add domain helpers for duplicating scenario drafts and computing baseline-vs-alternative diff keys.
  • Show richer alternative change summaries in the Scenario inspector, including changed counts and before/after values.
  • Keep alternative copies linked to the original baseline and refresh dependent diffs when a baseline changes.
  • Add an Evacuation Scenario Demo built-in project that opens as a saved post-run scenario project.

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

Risks / Follow-up

  • Evacuation Scenario Demo result artifacts are seeded as representative saved state, not regenerated from a live simulation run.

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 force-pushed the feature/us-06-scenario-duplication branch from 4cfe580 to c935584 Compare May 7, 2026 15:28
@SilverSupplier SilverSupplier merged commit 7ea3ca6 into main May 7, 2026
4 checks passed
@SilverSupplier SilverSupplier deleted the feature/us-06-scenario-duplication branch May 7, 2026 15:51
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.

Task- US-06 대안 시나리오 복제·변경 (Application/Domain)

1 participant