Skip to content

Run 6: Item-grid Integration — Project Plan

Refactor item-grid to use entity-data-grid as its base instead of building directly on the DataGrid molecule. This is the core consolidation goal: proving that entity-data-grid’s promoted capabilities (Run 5) can absorb item-grid’s general-purpose framework code, leaving item-grid as domain-config only.

Repository: ux-prototype at /Users/jmp/code/arda/ux-prototype/ Branch: jmpicnic/component-consolidation Worktree (read-only reference): /Users/jmp/code/arda/callil-consolidation-worktree/

#CriterionVerification
E1Run 5 exit gate passedplan/run-5-entity-grid-evolution/validate-exit.sh returns 0
E2Entity-data-grid has auto-publish, actions, search, pagination, toolbar, auto-height, drag-to-scrollStories for each capability render and pass in Storybook
E3Branch clean, all Run 5 commits pushedgit status clean, git log shows Run 5 commits
E4Baseline tests passnpm run lint && npx tsc --noEmit && npm run test all green
ArtifactLocationDescription
Refactored item-gridsrc/components/canary/organisms/item-grid/item-grid delegating to entity-data-grid for all general-purpose capabilities
Updated item-grid storiessrc/components/canary/organisms/item-grid/item-grid.stories.tsxStories working with refactored implementation
Updated item-grid testssrc/components/canary/organisms/item-grid/item-grid.test.tsxUnit tests adapted to new internal structure
VRT baselinesVRT project configComparison against Run 3 baselines
#TaskPersonaDepends OnStatusAcceptance Criteria
6.1Evaluate factory config vs wrapperfront-end-engineerE1-E4PendingWritten assessment: can item-grid be a pure createEntityDataGrid(itemGridConfig) call, or does it need a thin wrapper? Document which capabilities map to factory config, which need runtime wrapper logic. Decision recorded.
6.2Create item-grid factory config or wrapper implementationfront-end-engineer6.1Pendingitem-grid implemented using entity-data-grid as its base. No direct DataGrid molecule usage. npx tsc --noEmit passes.
6.3Replace useItemGridEditing with entity-data-grid auto-publishfront-end-engineer6.2PendinguseItemGridEditing hook deleted or reduced to a thin adapter. Row editing lifecycle (edit, blur, save/error) delegated to entity-data-grid’s built-in auto-publish. onPublishRow callback wired through.
6.4Replace inline search, drag-to-scroll, toolbar, actions with entity-data-grid capabilitiesfront-end-engineer6.2PendingNo inline search bar implementation in item-grid (uses entity-data-grid searchConfig). No inline drag-to-scroll (uses enableDragToScroll). No inline toolbar rendering (uses toolbar slot). No inline actions column (uses actionsColumn InitConfig).
6.5Keep domain-specific code: curated columns, typeahead lookups, nested field value getters/setters, custom renderersfront-end-engineer6.3, 6.4Pendingitem-grid still defines its 10 curated columns (Image, Name, SKU, GL Code, Classification, Supplier, Order Method, Unit Cost, Order Cost, Taxable, Notes). Typeahead lookups (ItemGridLookups) still work. Nested field value getters/setters (primarySupply.supplier, primarySupply.unitCost.value) still work. OrderMethod badge renderer, Notes icon renderer, Image thumbnail renderer all functional.
6.6Update item-grid stories to work with refactored implementationfront-end-engineer6.5PendingAll existing item-grid story variants render: Default, Empty, Loading, WithSelection, WithSearch, Editable, Paginated, Composition. Stories use the same props/data as before. Play functions in Empty and WithSearch stories pass.
6.7Update item-grid unit testsfront-end-engineer6.5PendingAll 6 existing item-grid tests pass. Tests adapted to new internal structure where necessary (e.g., if mocking entity-data-grid instead of DataGrid molecule). npm run test green.
6.8Playwright MCP visual comparison against worktree item-grid storiesfront-end-engineer6.6PendingNavigate to each item-grid story in both Storybook instances. Screenshot comparison confirms visual equivalence: search filtering, editable cells with save lifecycle, selection count, pagination, actions column, drag-to-scroll. Discrepancies documented and justified.
6.9VRT comparison against Run 3 baselinesfront-end-engineer6.6Pendingnpx playwright test --project=vrt run against item-grid stories. Comparison against Run 3 baselines. Expected: minimal or no visual diff (the refactoring is internal, not visual). Any diffs reviewed and baselines regenerated if changes are intentional.
E1-E4 (entry criteria)
|
v
6.1 Evaluate factory config vs wrapper
|
v
6.2 Create item-grid implementation
|
+-------+-------+
| |
v v
6.3 Replace 6.4 Replace search,
editing drag, toolbar, actions
| |
+-------+-------+
|
v
6.5 Keep domain-specific code
|
+-------+-------+
| |
v v
6.6 Update 6.7 Update
stories tests
| |
+-------+-------+
|
v
6.8 Playwright MCP comparison
|
v
6.9 VRT comparison

Parallelization: Tasks 6.3 and 6.4 can run in parallel (both modify item-grid internals but touch different capability areas). Tasks 6.6 and 6.7 can run in parallel (stories and tests are independent files). All other tasks are sequential.

Single agent: All tasks are assigned to a single front-end-engineer agent since they modify the same file set in the same directory. Parallelization is within-task (agent can work on 6.3 and 6.4 together), not across agents.

#CriterionVerification
X1npm run lint passesCI gate
X2npx tsc --noEmit passesCI gate
X3npm run test passes (all existing + updated tests)CI gate
X4npm run build-storybook succeedsCI gate
X5Item-grid stories visually equivalent to pre-refactor (Run 3 baselines)VRT comparison + Playwright MCP
X6Entity-data-grid stories still pass (no regressions)npm run test includes entity-data-grid tests
X7No duplicated framework code between item-grid and entity-data-gridCode review: no inline search, no inline drag-to-scroll, no inline toolbar, no inline actions column, no inline auto-publish in item-grid
X8Item-grid play functions passnpm run test:storybook or manual verification
X9All Run 6 commits on jmpicnic/component-consolidationgit log
You are refactoring item-grid to use entity-data-grid as its base.
Working directory: /Users/jmp/code/arda/ux-prototype/
Branch: jmpicnic/component-consolidation
Read-only reference: /Users/jmp/code/arda/callil-consolidation-worktree/
Key files:
- Item-grid organism: src/components/canary/organisms/item-grid/
- Entity-data-grid: src/components/canary/organisms/shared/entity-data-grid/
- DataGrid molecule: src/components/canary/molecules/data-grid/
- Item-grid molecules: src/components/canary/molecules/item-grid/
Analysis documents:
- Grid integration: /Users/jmp/code/arda/documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/analysis/grid-integration.md
- Blueprint Run 6: /Users/jmp/code/arda/documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/project-blueprint.md
The goal is to make item-grid delegate to entity-data-grid for ALL general-purpose
capabilities (auto-publish, search, toolbar, actions, drag-to-scroll, pagination,
auto-height). Item-grid should retain ONLY domain-specific code: curated columns,
typeahead lookups, nested field value getters/setters, custom renderers.
Start with task 6.1: read the entity-data-grid factory API (Run 5 output) and
compare against item-grid's requirements. Determine whether item-grid can be a
pure factory config call or needs a thin wrapper. Document your assessment.
After each task, run `npx tsc --noEmit` to verify compilation. After 6.5, run
`npm run test` to verify all tests pass.

At run completion, write the following to implementation/run-6-item-grid-integration/:

ArtifactFileDescription
Run summarysummary.mdWhat was done, decisions made during implementation, deviations from plan
Byproducts logbyproducts.mdDiscovered issues, TODOs, observations for later runs
Validation outputvalidation-output.txtStdout from validate-exit.sh execution
Session logsession-log.mdAgent session IDs, timestamps, notable events

Path: documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/implementation/run-6-item-grid-integration/

  • All item-grid code now delegates to entity-data-grid
  • No duplicated framework code remains
  • Item-grid’s useItemGridEditing hook is deleted or reduced to a thin adapter
  • Stories and tests pass
  • VRT baselines for item-grid are current (regenerated if any visual changes occurred)
  • The refactoring may have changed item-grid’s export surface (e.g., if useItemGridEditing was deleted, it should no longer be in canary.ts barrel)
  • Run 7 task 7.1 (barrel exports) should account for any exports added or removed in Run 6