Skip to content

Callil Branch Merge: Requirements

REQ-SB-001: Remove Subpath Deployment Support

Section titled “REQ-SB-001: Remove Subpath Deployment Support”

Remove all Storybook subpath deployment infrastructure from the ux-prototype repository:

  • STORYBOOK_BASE environment variable handling in .storybook/main.ts
  • fix-mocker-entry-base-path Vite plugin in .storybook/main.ts
  • serviceWorker.url override in .storybook/preview.ts
  • STORYBOOK_BASE env in .github/workflows/deploy-pages.yml
  • Subpath deployment CI test job in .github/workflows/ci.yml
  • subpath-deployment Playwright project in playwright.config.ts
  • tests/smoke/subpath-deployment.spec.ts and tests/smoke/subpath-server.mjs

REQ-SB-002: Adopt CSS @import layer() for AG Grid

Section titled “REQ-SB-002: Adopt CSS @import layer() for AG Grid”

Replace the wrap-ag-grid-css-in-layer Vite plugin with native CSS @import layer(base) syntax:

  • In src/styles/ag-theme-arda.css: change @import 'ag-grid-community/styles/ag-grid.css'; to @import 'ag-grid-community/styles/ag-grid.css' layer(base); (same for ag-theme-alpine.css)
  • In src/styles/canary/ag-theme-arda.css: apply the same change
  • Remove the wrap-ag-grid-css-in-layer plugin from .storybook/main.ts
  • Remove the associated comment block explaining the old Rollup workaround

AG Grid styles must render identically in both dev and production Storybook builds — verified by VRT.

Remove the unused @storybook/addon-links addon from .storybook/main.ts addons array and from package.json dependencies.

REQ-SB-004: Simplify Storybook Sidebar Sort

Section titled “REQ-SB-004: Simplify Storybook Sidebar Sort”

Simplify the Business Affiliates section of the storySort configuration in .storybook/preview.ts. The current 44-line nested hierarchy should be collapsed to a simpler structure that still preserves correct ordering for the retained BA stories.

REQ-DSL-001: Adopt Create Supplier Happy Path DSL Rewrite

Section titled “REQ-DSL-001: Adopt Create Supplier Happy Path DSL Rewrite”

Replace the existing src/use-cases/reference/business-affiliates/create-supplier/happy-path.stories.tsx with the DSL framework version from Callil’s branch. The rewrite uses createUseCaseStories<T>() to produce Interactive, Stepwise, and Automated variants from a single configuration.

Import paths must be adjusted to match the jmpicnic/list-view-management-620 branch conventions (e.g., @/types/canary/utils for cn, canary shared formatters path).

REQ-DSL-002: Convert Edit Supplier Happy Path to DSL

Section titled “REQ-DSL-002: Convert Edit Supplier Happy Path to DSL”

Convert src/use-cases/reference/business-affiliates/edit-supplier/happy-path.stories.tsx from its current custom scene navigator implementation to use createUseCaseStories<T>(). The conversion should:

  • Preserve all three existing variants (Interactive, Stepwise, Automated)
  • Use the DSL’s Scene<T>, GuideEntry, and WizardProps<T> types
  • Eliminate the custom guide panel, step indicator, and story control bar code (~200 lines)
  • Maintain visual and behavioral parity with the current implementation

REQ-DSL-003: DSL Framework Workflow Documentation

Section titled “REQ-DSL-003: DSL Framework Workflow Documentation”

Create a workflow guide at src/docs/workflows/use-case-framework.mdx documenting:

  • Decision criteria for when to use the DSL framework
  • Step-by-step recipe for creating new use-case stories
  • Step-by-step migration pattern for converting existing stories
  • Worked before/after example from the edit-supplier conversion
  • Common pitfalls

Additionally, review and update existing documentation (creating-stories.mdx, storybook-structure/use-cases.mdx, canary-components/how-to-extract-and-publish.mdx, components/guidelines.mdx) to reflect conventions introduced by the list-view and callil branches (canary grid library, utility locations, ESLint boundary rules, barrel export patterns).

Capture VRT baselines before any story conversions. After each conversion, run VRT to verify:

  • Non-converted stories are visually unchanged
  • AG Grid theme renders correctly with the CSS @import layer() approach
  • Canary parity tests (items-grid, item-detail) still pass