DSL Framework Migration Candidates
Date: 2026-03-17 Context: Branch Merge Analysis — OQ-6 deliverable
Overview
Section titled “Overview”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.
Assessment Table
Section titled “Assessment Table”| File | Use Case | Lines | DSL? | Pattern | Candidate | Justification | Decision |
|---|---|---|---|---|---|---|---|
create-supplier/experimental-wizard.stories.tsx | BA-0003-0003 Experimental Wizard | 601 | Y | Wizard flow (4-step form) | Already done | Full DSL adoption with 9 scenes and guides | Y |
items/add-supply/happy-path.stories.tsx | Items Add Supply | 416 | Y | Wizard flow (3-step form) | Already done | Full DSL adoption with 7 scenes and guides | Y |
samples/add-item/happy-path.stories.tsx | Samples Add Item | 423 | Y | Wizard flow (3-step form) | Already done | Full DSL adoption with 9 scenes and guides | Y |
create-supplier/happy-path.stories.tsx | BA-0003-0001 Create Happy Path | 170 | N | Page interaction (drawer + form) | Y | Multi-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.tsx | BA-0004-0001 Edit Happy Path | 351 | N | Page interaction (view/edit mode) | Y | Has 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.tsx | BA-0005-0001 Delete from List | 198 | N | Multi-step dialog (delete + confirm) | N | Three 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.tsx | BA-0003-0002 Validation Errors | 266 | N | Error flow variants | N | Tests 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.tsx | BA-0004-0002 Edit Validation Errors | 283 | N | Error flow variants | N | Tests 3 error/cancel paths. Same reasoning as create-supplier validation — targeted play functions are more appropriate. | N |
delete-supplier/delete-from-panel.stories.tsx | BA-0005-0002 Delete from Panel | 175 | N | Dialog (delete from drawer) | N | 2 variants (confirm + cancel) from detail panel. Single-step confirmation, not a wizard flow. | N |
delete-supplier/delete-error.stories.tsx | BA-0005-0003 Delete Error | 105 | N | Dialog (error path) | N | Single variant testing server error on delete. Too short for DSL. | N |
browse-and-search/view-suppliers-list.stories.tsx | BA-0001-0001 View Suppliers List | 170 | N | Page observation (grid states) | N | 4 variants showing default, empty, loading, error states. Grid observation, no wizard flow. | N |
browse-and-search/search-by-name.stories.tsx | BA-0001-0002 Search by Name | 119 | N | Grid observation (search) | N | 2 variants testing search debounce and filter. Single-action observation. | N |
browse-and-search/toggle-columns.stories.tsx | BA-0001-0003 Toggle Columns | 154 | N | Grid observation (column prefs) | N | 2 variants testing column visibility dropdown. Single-action UI. | N |
browse-and-search/select-multiple.stories.tsx | BA-0001-0005 Select Multiple | 134 | N | Grid observation (bulk select) | N | 2 variants testing multi-row selection. Single-action UI. | N |
browse-and-search/pagination.stories.tsx | BA-0001-0006 Pagination | 120 | N | Grid observation (pagination) | N | Single variant testing page navigation. No wizard flow. | N |
browse-and-search/deep-link.stories.tsx | BA-0001-0007 Deep Link | 76 | N | Page observation (auto-open) | N | Single variant verifying deep-link parameter. No interaction. | N |
view-details/supplier-details-panel.stories.tsx | BA-0002-0001 Details Panel | 288 | N | Drawer observation | N | 4 variants testing drawer open/close, sections. Observation pattern. | N |
affiliate-typeahead/create-on-the-fly.stories.tsx | BR-0002-0002 Create on the Fly | 285 | N | Component interaction | N | 6 variants testing typeahead dropdown. Component-level story, not page-level wizard. | N |
pages/suppliers-list-view.stories.tsx | Suppliers List Page | 407 | N | Page layout | N | 3 variants (default, drawer open, empty). Component page story, not a use case flow. | N |
Summary
Section titled “Summary”| Status | Count | Stories |
|---|---|---|
| Already using DSL | 3 | experimental-wizard, items/add-supply, samples/add-item |
| Recommended for conversion | 2 | create-supplier/happy-path, edit-supplier/happy-path |
| Not recommended | 14 | All 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.
Copyright: © Arda Systems 2025-2026, All rights reserved