Skip to content

Run 9: canary-refactor Adaptation — Project Plan

Adapt existing src/canary-refactor/ stories to use the consolidated canary components instead of their current mix of inline implementations and branch-specific APIs. This run serves as an integration test for the consolidated library: divergences found during adaptation drive fixes back into the component library.

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 8 exit gate passedplan/run-8-acceptance/validate-exit.sh returns 0
E2All composition stories render and passnpm run test:storybook green
E3MDX documentation completePrimitives, atoms, molecules, organisms all documented
E4Branch clean, all Run 8 commits pushedgit status clean
E5Baseline tests passnpm run lint && npx tsc --noEmit && npm run test all green
ArtifactLocationDescription
Adapted ItemsPagesrc/canary-refactor/components/ItemsPage.tsxUses consolidated canary organisms
Adapted storiessrc/canary-refactor/reference/items/*.stories.tsxStories using consolidated components
Component fix listRun 9 commit messagesFixes to the component library discovered during adaptation

src/canary-refactor/ contains copies of selected dev-witness stories ported to use canary components. Both branches modified these files independently:

FileMain Clone StateWorktree State
components/ItemsPage.tsxLarge monolithic pageReduced, delegates to callil organisms
components/ItemDetailsPanel.tsxPresentDeleted (absorbed into item-details organism)
components/ItemTableAGGrid.tsxNot presentAdded (extracted grid logic)
components/columnPresets.tsxNot presentAdded (extracted column definitions)
components/ItemDetailPage.tsxPresentModified
reference/items/item-detail.stories.tsxPresentModified
reference/items/items-grid.stories.tsxPresentModified

Neither version survives as-is. Both were written against their branch’s component APIs, which changed during Runs 1-8.

#TaskPersonaDepends OnStatusAcceptance Criteria
9.1Assess canary-refactor storiesfront-end-engineerE1-E5PendingWritten inventory of all files in src/canary-refactor/. For each file: current state (which branch version is present), which consolidated components it should use, what changes are needed. Categorize as: (a) uses consolidated components already, (b) needs adaptation, (c) should be deleted (superseded).
9.2Determine ItemDetailsPanel.tsx dispositionfront-end-engineer9.1PendingDecision documented: was ItemDetailsPanel’s functionality absorbed into the item-details organism (from Run 3), or does it need to be recreated against the consolidated API? If absorbed, delete the file. If needed, adapt it to import from @/components/canary/organisms/item-details.
9.3Determine ItemTableAGGrid.tsx and columnPresets.tsx dispositionfront-end-engineer9.1PendingDecision documented: are these files superseded by the consolidated item-grid organism (which uses entity-data-grid as of Run 6), or do the canary-refactor stories need their own grid wrapper? If superseded, delete and replace usages with item-grid imports. If needed, adapt to use consolidated components.
9.4Adapt all canary-refactor stories to use consolidated canary componentsfront-end-engineer9.2, 9.3PendingAll files in src/canary-refactor/ import from @/components/canary/ paths (organisms, molecules, atoms). No imports from @/components/ui/, no inline component implementations that duplicate what the canary library provides. npx tsc --noEmit passes. Stories render in Storybook.
9.5Fix component issues discovered during adaptationfront-end-engineer9.4PendingAny gaps, API mismatches, or missing capabilities discovered while adapting canary-refactor stories are fixed in the component library (not worked around in canary-refactor). Each fix committed separately with a descriptive message. If a fix is too large for this run, it is documented as a follow-up issue. Affected Run 1-8 tests re-verified after each fix.
9.6Visual comparison against dev-witness originalsfront-end-engineer9.4, 9.5PendingNavigate to each canary-refactor story and the corresponding dev-witness story in Storybook. Visual comparison confirms the canary-refactor version is recognizably similar to the dev-witness version. Discrepancies documented and justified (expected differences from component tree change vs bugs).
9.7Playwright MCP verificationfront-end-engineer9.6PendingUse Playwright MCP to navigate through canary-refactor stories: items grid (search, click row, drawer), item detail page. Screenshot and compare against dev-witness equivalents. All interaction flows work (no broken callbacks, no missing data, no layout regressions).
E1-E5 (entry criteria)
|
v
9.1 Assess canary-refactor stories
|
+-------+
| |
v v
9.2 9.3
| |
+---+---+
|
v
9.4 Adapt all stories
|
v
9.5 Fix component issues (feedback loop)
|
v
9.6 Visual comparison
|
v
9.7 Playwright MCP verification

Parallelization: Tasks 9.2 and 9.3 can run in parallel (they assess different files). All other tasks are sequential, as each depends on the prior task’s output.

Feedback loop: Task 9.5 may require iterating back to the component library. If fixes are needed, the agent should:

  1. Make the fix in the component source (e.g., src/components/canary/organisms/)
  2. Verify the fix does not break existing tests (npm run test)
  3. Commit the fix separately
  4. Continue adapting canary-refactor stories

Single agent: All tasks assigned to one front-end-engineer. The canary-refactor directory is small (6 files) and tightly coupled.

#CriterionVerification
X1npm run lint passesCI gate
X2npx tsc --noEmit passesCI gate
X3npm run test passesCI gate
X4npm run build-storybook passesCI gate
X5canary-refactor stories render in StorybookManual or npm run test:storybook
X6canary-refactor stories visually equivalent to dev-witnessPlaywright MCP comparison documented
X7No imports from @/components/ui/ in canary-refactorgrep verification
X8All component fixes committed separatelygit log shows distinct fix commits
X9All discovered issues resolved or trackedNo open issues remaining without documentation
X10All Run 9 commits on jmpicnic/component-consolidationgit log
You are adapting canary-refactor stories to use the consolidated canary component library.
Working directory: /Users/jmp/code/arda/ux-prototype/
Branch: jmpicnic/component-consolidation
Read-only reference: /Users/jmp/code/arda/callil-consolidation-worktree/
Key files:
- canary-refactor: src/canary-refactor/
- components/ItemsPage.tsx
- components/ItemDetailsPanel.tsx (may not exist)
- components/ItemTableAGGrid.tsx
- components/columnPresets.tsx
- components/ItemDetailPage.tsx
- reference/items/items-grid.stories.tsx
- reference/items/item-detail.stories.tsx
Consolidated components (use these):
- src/components/canary/organisms/item-grid/ (ItemGrid via entity-data-grid)
- src/components/canary/organisms/item-details/ (ArdaItemDetails)
- src/components/canary/organisms/app-header/ (ArdaAppHeader)
- src/components/canary/organisms/sidebar/ (ArdaSidebar)
- src/components/canary/organisms/shared/entity-data-grid/ (createEntityDataGrid)
Dev-witness (visual comparison targets):
- src/dev-witness/ (original vendored pages)
Analysis:
- /Users/jmp/code/arda/documentation/src/content/docs/roadmap/backlog/requested/callil-consolidation/analysis/canary-refactor.md
Start with task 9.1: inventory all canary-refactor files, understand what each
does, and determine what consolidated components should replace inline code.
IMPORTANT: This is a feedback loop. If you discover that a consolidated component
is missing a capability needed by canary-refactor, fix the component FIRST
(in src/components/canary/), verify tests pass, commit the fix, then continue
adaptation. Do not work around component gaps in canary-refactor code.

At run completion, write the following to implementation/run-9-canary-refactor/:

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-9-canary-refactor/

Run 9 is the final run of the Callil Consolidation project. Upon completion:

  • The consolidated canary component library is proven across three validation layers:
    1. Unit tests (Runs 1-7): every component has tests
    2. Composition stories (Run 8): use-case-mapped stories prove page-level equivalence
    3. canary-refactor (Run 9): existing validation harness adapted to consolidated components
  • Branch jmpicnic/component-consolidation is ready for PR review against jmpicnic/list-view-management-620
  • Any component gaps documented in Run 9 task 9.5 that were deferred as too large
  • CHANGELOG update (deferred per cross-cutting decision: evaluate against main CHANGELOG)
  • PR creation and review process