Callil Consolidation — Project Blueprint
Design Principles
Section titled “Design Principles”- Each run is independently verifiable — build, lint, tsc, tests, and VRT (where applicable) must pass at the end of every run.
- Expose risks early — visual changes (theme migration) and complex new code (auto-publish) are scheduled before mechanical integration work.
- Clear entry/exit criteria — each run has prerequisites, deliverables, and a verification gate. A run is not complete until its gate passes.
- Incremental commits — each run produces one or more commits on the target branch. No run depends on uncommitted work from a prior run.
Playwright MCP for Visual Verification
Section titled “Playwright MCP for Visual Verification”Steps marked with [Playwright MCP] can use the Playwright MCP server to automate visual verification against the running Storybook dev server. This replaces manual spot-checks with reproducible browser-driven inspection:
- Navigate to specific story URLs
- Take screenshots for visual comparison
- Interact with components (click, type, hover) to verify behavior
- Compare against
dev-witnessstories side-by-side
Start Storybook (npm run dev in ux-prototype/) before running Playwright MCP checks.
Target Branch
Section titled “Target Branch”jmpicnic/component-consolidation created off HEAD of jmpicnic/list-view-management-620 in the main clone (ux-prototype/).
Analysis Documents
Section titled “Analysis Documents”All design decisions are recorded in analysis/:
| Document | Governs |
|---|---|
| analysis/index.md | Master decisions and dispatch |
| analysis/primitives.md | Component organization, organism import mapping |
| analysis/styles.md | CSS tokens, globals, sonner/next-themes |
| analysis/dependencies.md | package.json changes, library build |
| analysis/grid-integration.md | Entity-data-grid evolution |
| analysis/test-coverage.md | Stories, tests, VRT, play function convention |
| analysis/canary-refactor.md | Follow-on adaptation |
Run 0: Branch Setup
Section titled “Run 0: Branch Setup”Risk: None Effort: Trivial
Entry Criteria
Section titled “Entry Criteria”- Main clone on
jmpicnic/list-view-management-620with clean working tree - Worktree at
callil-consolidation-worktreeonjmpicnic/callil-consolidationavailable for reference
Deliverables
Section titled “Deliverables”- Branch
jmpicnic/component-consolidationcreated off HEAD ofjmpicnic/list-view-management-620 - Verified:
npm ci && npm run lint && npx tsc --noEmit && npm run testpass on the new branch (baseline)
Exit Criteria
Section titled “Exit Criteria”- Green baseline on the new branch — all existing tests pass, no regressions from branch creation
Run 1: Foundation
Section titled “Run 1: Foundation”Risk: High blast radius (many file moves and import rewrites), low per-file risk Effort: Medium Governs: analysis/primitives.md, analysis/styles.md
Intermediate gates are blocking. If an intermediate gate fails, stop and fix before proceeding to the next task. This isolates failures to the task that caused them. The final verification gate re-runs everything as a comprehensive check before committing.
This run establishes the new directory structure, design tokens, and import conventions that everything else depends on.
Entry Criteria
Section titled “Entry Criteria”- Run 0 complete (branch exists, baseline green)
1a. Styles and Tokens
Section titled “1a. Styles and Tokens”- Update
src/styles/tokens.cssto Arda orange palette (worktree values), add new tokens (control heights, state ramp, font vars, destructive-foreground, dark mode) - Refactor
src/styles/globals.cssto@import './tokens.css'instead of redeclaring values - Replace remaining globals.css content with worktree version (Arda orange, Geist Mono font, touch media queries, sidebar-inset dark override)
- Drop legacy sidebar CSS (
.sidebar-menu-button-hover,[data-active='true'],.add-company-button) - Drop duplicate
:rootblock
Intermediate gate (1a): npx tsc --noEmit + npm run test — token changes could break any component referencing CSS vars.
1b. Primitives Directory
Section titled “1b. Primitives Directory”- Create
src/components/canary/primitives/ - Copy 13 stock shadcn files from worktree
src/components/ui/(collapsible, dropdown-menu, input, label, separator, sheet, sidebar, skeleton, table, tabs, textarea, toggle, tooltip) - Rewrite
cnimports in primitives from@/utilsto@/types/canary/utils - Do NOT copy
sonner.tsx(dropped per styles.md decision)
Intermediate gate (1b): npx tsc --noEmit — verifies imports resolve. Tests won’t exercise primitives directly (no consumers yet).
1c. Custom Atoms
Section titled “1c. Custom Atoms”- Copy custom components from worktree
src/components/ui/tosrc/components/canary/atoms/:avatar.tsx→atoms/avatar/badge.tsx→atoms/badge/(merge with existing callil ArdaBadge wrapper)button.tsx→atoms/button/(merge with existing callil ArdaButton wrapper)card.tsx→atoms/card/dialog.tsx→atoms/dialog/input-group.tsx→atoms/input-group/
- Copy existing callil canary atoms from worktree: brand-logo, drawer, icon-button, icon-label, read-only-field, search-input (with their stories and tests)
- Rewrite
cnimports from@/utilsto@/types/canary/utils - Rewrite
@/components/ui/*imports to@/components/canary/primitives/*
Intermediate gate (1c): npx tsc --noEmit + npm run test — atoms have unit tests from the worktree; verifies they pass in the new location.
1d. Hook Migration
Section titled “1d. Hook Migration”- Copy
src/hooks/use-mobile.tsfrom worktree tosrc/types/canary/hooks/use-mobile.ts - Update any imports referencing
@/hooks/use-mobileto@/types/canary/hooks/use-mobile
Intermediate gate (1d): npx tsc --noEmit — small change, verify the import resolves.
1e. cn Import Rewrite
Section titled “1e. cn Import Rewrite”- Rewrite 38+ files from
import { cn } from '@/utils'toimport { cn } from '@/types/canary/utils' - Verify
src/utils.tsis not needed (if no other exports, do not copy it)
Intermediate gate (1e): npx tsc --noEmit + npm run lint + npm run test — full gate. This is the highest-risk task in Run 1 (broadest file change set). Any missed or malformed import shows up here. Lint catches import ordering. Run this gate before 1f so cn issues are debugged in isolation.
1f. Primitives Import Check Story
Section titled “1f. Primitives Import Check Story”- Add
src/components/canary/primitives/primitives.stories.tsx— one integration story importing from several primitives and rendering a composed example
Intermediate gate (1f): npm run build-storybook — verifies Storybook can index and build with the new structure. [Playwright MCP] Navigate to the primitives import check story and verify components render.
Deliverables
Section titled “Deliverables”- New directory structure:
canary/primitives/, updatedcanary/atoms/,types/canary/hooks/ - Updated
tokens.cssandglobals.css - All imports rewritten to canonical paths
- Primitives import check story
Final Verification Gate (Run 1)
Section titled “Final Verification Gate (Run 1)”npm run lint— passnpx tsc --noEmit— passnpm run test— pass (all existing tests, no regressions)npm run build-storybook— pass- VRT: generate new baselines for all new atom stories (badge, button, drawer, etc.)
- [Playwright MCP] Spot-check new atom stories (badge, button, drawer, etc.) render correctly in Storybook
Exit Criteria
Section titled “Exit Criteria”- All files in canonical locations with canonical import paths
- No references to
@/components/ui/*or@/utilsremain (except in vendored code) - Build green, Storybook builds
Run 2: Visual Foundation (Theme Migration)
Section titled “Run 2: Visual Foundation (Theme Migration)”Risk: Highest visual risk — diffs every grid story Effort: Small (code change is small, validation is thorough) Governs: analysis/grid-integration.md (decision #5)
Entry Criteria
Section titled “Entry Criteria”- Run 1 complete (styles, primitives, atoms in place)
- Retrofit DataGrid molecule (
src/components/canary/molecules/data-grid/data-grid.tsx) from'legacy'theme string tothemeQuartzwith design-system token mapping - Apply item-grid’s theme configuration: row height (48px), header height (36px), font (Geist Sans 14px, 13px headers, 600 weight), cell padding (12px), color token mapping, column border styling, wrapper border radius
- Add
ThemedGridvisual story to DataGrid molecule
Deliverables
Section titled “Deliverables”- DataGrid molecule using
themeQuartzwith Arda design tokens ThemedGridstory
Verification Gate
Section titled “Verification Gate”npm run test— pass (existing DataGrid tests)- VRT: before/after comparison is the critical gate. Every grid story will diff — this includes DataGrid molecule stories, EntityDataGrid factory stories, EntityDataGridShim stories, and any other stories rendering an AG Grid. Expected variances: row heights, fonts, colors, borders all change from browser defaults to Arda tokens. Regenerate all affected baselines after review confirms visual correctness.
- [Playwright MCP] Navigate to DataGrid and EntityDataGrid stories; screenshot before and after the theme change. Visually verify: row heights, header styling, font rendering, cell padding, color tokens applied correctly. Compare ThemedGrid story against item-grid’s existing appearance in the worktree Storybook for reference.
Exit Criteria
Section titled “Exit Criteria”- All grid stories render with Arda-themed appearance
- VRT baselines regenerated and committed
- No regressions in non-grid stories
Run 3: Organism Port
Section titled “Run 3: Organism Port”Risk: Medium (many files, but mechanical) Effort: Medium-Large Governs: analysis/primitives.md (organism import mapping section)
Move callil organisms and their supporting molecules into the main clone as-is (with import rewrites only, no behavioral changes). This validates that the foundation from Run 1 supports the organisms correctly.
Entry Criteria
Section titled “Entry Criteria”- Run 2 complete (themed DataGrid in place)
3a. Supporting Molecules
Section titled “3a. Supporting Molecules”- Copy from worktree to main clone
src/components/canary/molecules/:sidebar/(sidebar-header, sidebar-nav, sidebar-nav-item, sidebar-nav-group, sidebar-user-menu) — with stories and testsitem-grid/(item-grid-columns, item-grid-fixtures, typeahead-cell-editor, select-cell-editor) — with stories and testsitem-details/(item-details-header, item-details-card-preview, action-toolbar, field-list) — with stories and testsoverflow-toolbar/— with stories
- Rewrite all
@/components/ui/*imports per the mapping in primitives.md - Rewrite
@/utils→@/types/canary/utils
3b. Organisms
Section titled “3b. Organisms”- Copy from worktree to main clone
src/components/canary/organisms/:sidebar/(sidebar.tsx, sidebar-context.tsx, sidebar.stories.tsx, sidebar.test.tsx, sidebar.mdx, index.ts)app-header/(all files)item-details/(all files)item-grid/(all files)
- Rewrite all imports per mapping
3c. Assets
Section titled “3c. Assets”- Copy any assets from the worktree (
callil-consolidation-worktree/public/canary/) into the main clone (ux-prototype/public/canary/) that the organisms reference (brand logos, images), if not already present in the main clone - Note: all copy operations in Run 3 follow this same direction — source: worktree (callil branch, read-only reference) → target: main clone (component-consolidation branch, where edits happen)
Deliverables
Section titled “Deliverables”- All 4 callil organisms and their supporting molecules in the main clone
- All imports rewritten to canonical canary paths
- All organism stories render in Storybook
Verification Gate
Section titled “Verification Gate”npm run lint— passnpx tsc --noEmit— passnpm run test— pass (existing + new organism tests)- Storybook build succeeds (
npm run build-storybook) - [Playwright MCP] Navigate to each organism’s stories in Storybook and verify rendering:
- Sidebar: Default, WithBadges, Composition (check nav items, dark theme, collapse/expand)
- AppHeader: Default, WithSearch (check action buttons, search input)
- ItemGrid: Default, WithSearch, Editable (check grid renders with data, search filters)
- ItemDetails: Default (check drawer opens, fields display, tabs work)
Exit Criteria
Section titled “Exit Criteria”- All organisms functional in Storybook with correct imports
- No references to
@/components/ui/*in any canary code
Run 4: Cell Editor Upgrade
Section titled “Run 4: Cell Editor Upgrade”Risk: Medium (replaces existing atom, could break grid stories) Effort: Small-Medium Governs: analysis/grid-integration.md (decision #2)
Entry Criteria
Section titled “Entry Criteria”- Run 3 complete (organisms ported, including callil’s select-cell-editor molecule)
- Promote callil’s
SelectCellEditorfrommolecules/item-grid/toatoms/grid/select/as a first-class canary atom - Generalize options format to accept both
SelectOption[]andRecord<string, string> - Update the atom to follow canary conventions (StaticConfig/RuntimeConfig split, factory function
createSelectCellEditor) - Add stories: Default, WithManyOptions, KeyboardNavigation, BothFormats
- Add unit tests: highlight cycling, Enter/Escape, ARIA roles, checkmark rendering
- Add play function with step DSL: open → Arrow Down 3x → Enter → verify
- Update
EnumCellEditorto delegate toSelectCellEditor(or replace entirely and update all references) - Delete deprecated
EnumCellEditorif fully replaced
Deliverables
Section titled “Deliverables”src/components/canary/atoms/grid/select/with full story/test/play coverageEnumCellEditorreplaced or deprecated- All grid stories using enum editors still work
Verification Gate
Section titled “Verification Gate”npm run test— pass- New SelectCellEditor stories render correctly
- Existing grid stories with enum columns render correctly (regression check)
- VRT: capture SelectCellEditor popup baseline
- [Playwright MCP] Navigate to SelectCellEditor stories; verify popup rendering, keyboard navigation (Arrow Down cycling, Enter to select, Escape to cancel), checkmark on selected item. Also check an existing enum grid story to confirm no regression.
Exit Criteria
Section titled “Exit Criteria”- Single canonical select/enum cell editor in canary atoms
- All consumers updated
Run 5: Entity-data-grid Evolution
Section titled “Run 5: Entity-data-grid Evolution”Risk: Highest complexity — core of the project Effort: Large Governs: analysis/grid-integration.md (decisions #1, #3, #4), analysis/test-coverage.md
Promote general-purpose capabilities from item-grid into entity-data-grid. Each sub-run adds one capability with its own stories and tests. Sub-runs are ordered by risk (highest first).
Entry Criteria
Section titled “Entry Criteria”- Run 4 complete (SelectCellEditor in place)
Sub-run 5a: Row Auto-Publish Lifecycle
Section titled “Sub-run 5a: Row Auto-Publish Lifecycle”Risk: Highest — new editing paradigm replacing cell-granular mode
- Implement row-auto-publish as the entity-data-grid editing mode
- Remove cell-granular
onEntityUpdatedcallback - Add
onRowPublish(rowId, changes, entity?)async callback - Implement pending changes accumulation per row
- Implement 50ms debounce on row blur before publish
- Add row visual states: idle → saving (
.ag-row-saving) → success/error (.ag-row-error) - Implement imperative ref API:
saveAll(),discardAll(),getDirtyRowIds() - Add stories:
RowAutoPublish,RowAutoPublishError,SaveAllDrafts,DiscardAllDrafts(all with step DSL play functions) - Add unit tests for pending changes, publish lifecycle, ref API, CSS class injection
- Gate: stories + tests + play functions pass; VRT for row visual states
- [Playwright MCP] Navigate to RowAutoPublish story; edit a cell, edit another cell in same row, click a different row. Verify: saving row background appears briefly, then clears. Navigate to RowAutoPublishError; verify error row background persists. Check SaveAllDrafts/DiscardAllDrafts via toolbar button interactions.
Sub-run 5b: Actions Column
Section titled “Sub-run 5b: Actions Column”Risk: Medium — new InitConfig property
- Add
actionsColumnas InitConfig property (mount-time ColDef with optionalactionCount) - Inject as pinned-right column with auto-width calculation
- Add story:
WithActionsColumn(with step DSL play function) - Add unit tests: column injection, width calc, action callbacks
- Gate: story + test + play function pass
- [Playwright MCP] Navigate to WithActionsColumn story; click action buttons in rows; verify visual pinned-right column appearance.
Sub-run 5c: Search/Filter UI
Section titled “Sub-run 5c: Search/Filter UI”Risk: Medium — new UI elements in entity-data-grid
- Add
searchConfigto factory config (field list, placeholder) - Implement search bar with 150ms debounce
- Implement filtered count display (“3 of 12 items” / “3 of 12 selected”)
- Add stories:
WithSearch,WithSearchAndSelection(with step DSL play functions) - Add unit tests: debounce timing, filter predicate, count updates
- Gate: stories + tests + play functions pass
- [Playwright MCP] Navigate to WithSearch story; type a search term; verify row count updates after debounce; verify count display text. Check WithSearchAndSelection: select rows, verify count switches to “X of Y selected”.
Sub-run 5d: Pagination Modes
Section titled “Sub-run 5d: Pagination Modes”Risk: Low-Medium — StaticConfig property, both modes already implemented elsewhere
- Add pagination mode as StaticConfig (design-time) property
- Support server-driven (
PaginationData+ callbacks) — existing behavior - Support client-side (AG Grid built-in
pageSize) — from item-grid - Modes are mutually exclusive
- Add story:
ClientPagination; verify existingServerPaginationstill works - Add unit tests: both modes produce correct grid config
- Gate: stories + tests pass
Sub-run 5e: Toolbar, Auto-Height, Drag-to-Scroll
Section titled “Sub-run 5e: Toolbar, Auto-Height, Drag-to-Scroll”Risk: Low — additive features
- Add
toolbarprop (ReactNode slot above grid) - Add
autoHeightStaticConfig property (domLayout: 'autoHeight') - Add
enableDragToScrollopt-in withuseDragToScrollhook (~80 lines pointer-event logic) - Add stories:
WithToolbar,AutoHeight,DragToScroll - Add unit tests: toolbar render, autoHeight pass-through
- Gate: stories + tests pass
Deliverables (Run 5 overall)
Section titled “Deliverables (Run 5 overall)”- Entity-data-grid with all promoted capabilities
- 10+ new stories with step DSL play functions
- Comprehensive unit test coverage for each capability
- VRT baselines for row visual states
Exit Criteria
Section titled “Exit Criteria”- Entity-data-grid API supports all capabilities needed for item-grid to use it as a base
- All new stories render and pass
- All existing entity-data-grid stories still pass (no regressions)
Run 6: Item-grid Integration
Section titled “Run 6: Item-grid Integration”Risk: Integration risk — the core consolidation goal Effort: Medium-Large Governs: analysis/grid-integration.md (overall goal)
Refactor item-grid to use entity-data-grid as its base instead of building directly on the DataGrid molecule.
Entry Criteria
Section titled “Entry Criteria”- Run 5 complete (entity-data-grid has all needed capabilities)
- Evaluate whether item-grid can be a pure factory config call (
createEntityDataGrid(itemGridConfig)) or needs a thin wrapper - Refactor item-grid implementation:
- Replace
useItemGridEditingwith entity-data-grid’s built-in auto-publish - Replace inline search with entity-data-grid’s search/filter
- Replace inline drag-to-scroll with entity-data-grid’s built-in
- Replace inline toolbar with entity-data-grid’s toolbar slot
- Replace inline actions column with entity-data-grid’s InitConfig actions
- Keep item-domain-specific code: curated columns, typeahead lookups, nested field value getters/setters, custom renderers
- Replace
- Verify item-grid stories render identically to pre-refactor
- Update item-grid tests
Deliverables
Section titled “Deliverables”- Refactored item-grid using entity-data-grid as base
- Reduced item-grid code (domain config only, no framework reimplementation)
- item-grid stories visually equivalent to pre-refactor
Verification Gate
Section titled “Verification Gate”npm run test— pass- Item-grid stories render correctly (VRT comparison against Run 3 baselines)
- Entity-data-grid stories still pass (no regressions from refactoring)
- Play functions in item-grid stories pass
- [Playwright MCP] Navigate to all item-grid stories (Default, Empty, Loading, WithSelection, WithSearch, Editable, Paginated, Composition). Compare visually against the same stories rendered from the worktree Storybook to verify equivalence. Key checks: search filtering, editable cells with save lifecycle, selection count, pagination, actions column, drag-to-scroll.
Exit Criteria
Section titled “Exit Criteria”- Item-grid delegates to entity-data-grid for all general-purpose capabilities
- No duplicated framework code between item-grid and entity-data-grid
Run 7: Package API
Section titled “Run 7: Package API”Risk: Low (mechanical, but affects published package) Effort: Small Governs: analysis/dependencies.md, analysis/index.md (barrel exports)
Entry Criteria
Section titled “Entry Criteria”- Run 6 complete (all components in final state)
7a. Barrel Exports
Section titled “7a. Barrel Exports”- Update
src/canary.ts: union of both branches minusArdaDetailField, plus all worktree additions (sidebar, app-header, item-grid, new atoms, new molecules) - Note:
ArdaBadgeis exported from bothcanary.tsandextras.ts— this collision is acceptable (different import paths). The canary version is canonical long-term; the extras version must not be used outside**/extras/**paths. - Verify
src/extras.tsandsrc/index.tsunchanged (identical in both branches)
7b. Dependencies
Section titled “7b. Dependencies”- Add
radix-uito production dependencies - Remove
@radix-ui/react-tooltip(superseded) - Add to devDependencies:
@reduxjs/toolkit,react-redux,redux-persist,sonner - Remove from devDependencies:
next-themes,react-icons,shadcn,pako,qr-scanner,react-dropzone - Resolve
@storybook/addon-links(drop if nolinkTousage confirmed)
7c. Cleanup
Section titled “7c. Cleanup”- Delete
src/components/canary/atoms/detail-field/(replaced by ReadOnlyField) - Delete
src/components/ui/directory if still present (all contents moved) - Delete
src/utils.tsif no remaining references - Delete
src/hooks/use-mobile.tsif moved totypes/canary/hooks/
Deliverables
Section titled “Deliverables”- Updated barrel exports
- Updated package.json
- No orphaned files
Verification Gate
Section titled “Verification Gate”npm run lint— passnpx tsc --noEmit— passnpm run test— passnpm run build:lib— pass (library build produces dist/)- Verify dist/ contains expected entry points
Exit Criteria
Section titled “Exit Criteria”- Published package API reflects consolidated component library
- Library builds successfully
- No unused dependencies
Run 8: Acceptance
Section titled “Run 8: Acceptance”Risk: Low (verification, not implementation) Effort: Medium Governs: analysis/test-coverage.md (composition stories section)
Entry Criteria
Section titled “Entry Criteria”- Run 7 complete (package API finalized)
8a. Composition Stories
Section titled “8a. Composition Stories”- Add items browse/view/edit stories in
src/use-cases/reference/items/(REF::ITM::0001, 0002, 0004) - Add suppliers browse/view stories in
src/use-cases/reference/business-affiliates/as canary variants (REF::BA::0001, 0002) - Add list view general behavior stories in
src/use-cases/general-behaviors/list-views/(GEN::LST::0002, 0003, 0004, 0006) - Add KitchenSink developer reference in
entity-data-grid/ - All play functions use step DSL
8b. VRT Baselines
Section titled “8b. VRT Baselines”- Generate VRT baselines for all new composition pages
- Generate VRT baselines for any components not yet captured
- [Playwright MCP] Visual comparison of composition stories against
dev-witnessequivalents: navigate to each composition story and the corresponding dev-witness story side-by-side; screenshot both; verify layout, spacing, colors, and interaction patterns are recognizably similar
8c. Documentation
Section titled “8c. Documentation”- Ensure MDX docs exist for all components at every level:
- Primitives: one
primitives.mdxdescribing the purpose of the primitives layer, what’s included, shadcn/ui origin, import convention, and regeneration instructions. No individual primitive descriptions needed. - Atoms: MDX for each new atom (badge, button, avatar, card, dialog, drawer, input-group, icon-button, icon-label, read-only-field, search-input, SelectCellEditor)
- Molecules: MDX for new molecules (sidebar sub-components, action-toolbar, field-list, overflow-toolbar)
- Organisms: MDX for all organisms (sidebar, app-header, item-details — currently lacks MDX, item-grid, entity-data-grid, entity-data-grid-shim)
- Primitives: one
- Update any stale MDX docs from the worktree that reference old import paths
Deliverables
Section titled “Deliverables”- 6+ composition stories mapped to product use cases
- Complete VRT baseline set
- MDX documentation for all organisms
Verification Gate
Section titled “Verification Gate”npm run test— passnpm run build-storybook— passnpm run test:storybook— all play functions pass- VRT baselines committed
- [Playwright MCP] Final walkthrough of all composition stories: navigate through items page (sidebar → grid → search → row click → drawer), suppliers page (grid → search → row click), KitchenSink (exercise all capabilities). Verify end-to-end interaction flow works.
Exit Criteria
Section titled “Exit Criteria”- Consolidated component library is proven to reproduce
dev-witnesspage layouts using only canary components - Full test/story/VRT coverage per test-coverage.md metrics
Run 9: canary-refactor Adaptation (Follow-on)
Section titled “Run 9: canary-refactor Adaptation (Follow-on)”Risk: Medium (may surface component gaps) Effort: Medium Governs: analysis/canary-refactor.md
Entry Criteria
Section titled “Entry Criteria”- Run 8 complete (acceptance passed)
- Adapt existing
src/canary-refactor/stories to use consolidated canary components - Determine if
ItemDetailsPanel.tsxwas absorbed intoitem-detailsorganism or needs recreation - Determine if
ItemTableAGGrid.tsxandcolumnPresets.tsxare still needed - Use divergences found during adaptation to drive fixes back into the component library
Deliverables
Section titled “Deliverables”- canary-refactor stories using consolidated components
- List of component fixes/enhancements discovered during adaptation
Verification Gate
Section titled “Verification Gate”- canary-refactor stories render and pass
- Visual comparison against
dev-witnessoriginals
Exit Criteria
Section titled “Exit Criteria”- canary-refactor stories demonstrate visual/behavioral equivalence with vendored pages
- All discovered issues resolved or tracked
Pre-Push Gate (All Runs)
Section titled “Pre-Push Gate (All Runs)”Before any push to origin, the following must pass locally:
npm run lintnpx tsc --noEmitnpm run test- VRT if snapshots changed (
npx playwright test --project=vrt)
Risk Summary
Section titled “Risk Summary”| Risk | Run | Mitigation |
|---|---|---|
| Theme migration diffs every grid story | Run 2 | Scheduled early; VRT before/after is explicit gate |
| Auto-publish is complex new code | Run 5a | First sub-run of capability promotion; isolated with its own tests |
| Import rewrite blast radius (38+ files) | Run 1 | Mechanical with grep verification; build gate catches misses |
| SelectCellEditor replaces existing atom | Run 4 | Existing enum stories serve as regression tests |
| Item-grid refactoring may need wrapper | Run 6 | Entity-data-grid capabilities proven in Run 5 before refactoring begins |
| Barrel export changes affect published API | Run 7 | Library build gate; deferred until all components finalized |
| canary-refactor may surface gaps | Run 9 | Explicitly last; gaps drive fixes back into library |
Dependency Graph
Section titled “Dependency Graph”Run 0: Branch Setup └─► Run 1: Foundation (styles, primitives, atoms, imports) └─► Run 2: Visual Foundation (theme migration) └─► Run 3: Organism Port (sidebar, app-header, item-details, item-grid as-is) └─► Run 4: Cell Editor Upgrade (SelectCellEditor) └─► Run 5: Entity-data-grid Evolution │ ├─ 5a: Auto-publish lifecycle │ ├─ 5b: Actions column │ ├─ 5c: Search/filter UI │ ├─ 5d: Pagination modes │ └─ 5e: Toolbar, auto-height, drag-to-scroll │ └─► Run 6: Item-grid Integration └─► Run 7: Package API └─► Run 8: Acceptance (composition stories) └─► Run 9: canary-refactor (follow-on)All runs are sequential — each depends on the prior run’s exit criteria being met. Sub-runs within Run 5 are also sequential (5a → 5b → 5c → 5d → 5e) to allow incremental verification.
Copyright: © Arda Systems 2025-2026, All rights reserved