Skip to content

DSL Framework Migration Candidates

Date: 2026-03-17 Context: Branch Merge Analysis — OQ-6 deliverable

Assessment of all use-case story files for migration to the DSL framework (createUseCaseStories<T>() from src/use-cases/framework.tsx). The framework produces Interactive, Stepwise, and Automated story variants from a single configuration and is designed for multi-step wizard-like workflows.

FileUse CaseLinesDSL?PatternCandidateJustificationDecision
create-supplier/experimental-wizard.stories.tsxBA-0003-0003 Experimental Wizard601YWizard flow (4-step form)Already doneFull DSL adoption with 9 scenes and guidesY
items/add-supply/happy-path.stories.tsxItems Add Supply416YWizard flow (3-step form)Already doneFull DSL adoption with 7 scenes and guidesY
samples/add-item/happy-path.stories.tsxSamples Add Item423YWizard flow (3-step form)Already doneFull DSL adoption with 9 scenes and guidesY
create-supplier/happy-path.stories.tsxBA-0003-0001 Create Happy Path170NPage interaction (drawer + form)YMulti-step create flow (open drawer, fill form, submit). Callil already rewrote this on his branch using the framework — adopt that rewrite.Y
edit-supplier/happy-path.stories.tsxBA-0004-0001 Edit Happy Path351NPage interaction (view/edit mode)YHas 3 variants (Interactive, Stepwise, Automated) with a custom scene navigator that mirrors the DSL pattern. Direct conversion to createUseCaseStories() eliminates ~200 lines of custom chrome.Y
delete-supplier/delete-from-list.stories.tsxBA-0005-0001 Delete from List198NMulti-step dialog (delete + confirm)NThree variants testing single delete, bulk delete, cancel. The confirm-dialog pattern is too short (2 steps) to benefit from DSL wizard scaffolding.N
create-supplier/validation-errors.stories.tsxBA-0003-0002 Validation Errors266NError flow variantsNTests 3 distinct error paths (empty name, network error, duplicate). Error-specific scenarios are better as targeted play functions than wizard scenes.N
edit-supplier/validation-errors.stories.tsxBA-0004-0002 Edit Validation Errors283NError flow variantsNTests 3 error/cancel paths. Same reasoning as create-supplier validation — targeted play functions are more appropriate.N
delete-supplier/delete-from-panel.stories.tsxBA-0005-0002 Delete from Panel175NDialog (delete from drawer)N2 variants (confirm + cancel) from detail panel. Single-step confirmation, not a wizard flow.N
delete-supplier/delete-error.stories.tsxBA-0005-0003 Delete Error105NDialog (error path)NSingle variant testing server error on delete. Too short for DSL.N
browse-and-search/view-suppliers-list.stories.tsxBA-0001-0001 View Suppliers List170NPage observation (grid states)N4 variants showing default, empty, loading, error states. Grid observation, no wizard flow.N
browse-and-search/search-by-name.stories.tsxBA-0001-0002 Search by Name119NGrid observation (search)N2 variants testing search debounce and filter. Single-action observation.N
browse-and-search/toggle-columns.stories.tsxBA-0001-0003 Toggle Columns154NGrid observation (column prefs)N2 variants testing column visibility dropdown. Single-action UI.N
browse-and-search/select-multiple.stories.tsxBA-0001-0005 Select Multiple134NGrid observation (bulk select)N2 variants testing multi-row selection. Single-action UI.N
browse-and-search/pagination.stories.tsxBA-0001-0006 Pagination120NGrid observation (pagination)NSingle variant testing page navigation. No wizard flow.N
browse-and-search/deep-link.stories.tsxBA-0001-0007 Deep Link76NPage observation (auto-open)NSingle variant verifying deep-link parameter. No interaction.N
view-details/supplier-details-panel.stories.tsxBA-0002-0001 Details Panel288NDrawer observationN4 variants testing drawer open/close, sections. Observation pattern.N
affiliate-typeahead/create-on-the-fly.stories.tsxBR-0002-0002 Create on the Fly285NComponent interactionN6 variants testing typeahead dropdown. Component-level story, not page-level wizard.N
pages/suppliers-list-view.stories.tsxSuppliers List Page407NPage layoutN3 variants (default, drawer open, empty). Component page story, not a use case flow.N
StatusCountStories
Already using DSL3experimental-wizard, items/add-supply, samples/add-item
Recommended for conversion2create-supplier/happy-path, edit-supplier/happy-path
Not recommended14All others — grid observation, error flows, dialogs, component stories

Total conversion effort: 2 stories (~520 lines to refactor). The create-supplier happy-path has Callil’s rewrite as a reference. The edit-supplier happy-path already has a custom scene navigator structure that maps directly to the DSL.