Migration Plan — Styles & Components to receive Coveris-e
Migration Plan — Styles & Components to receive Coveris-e
Sección titulada «Migration Plan — Styles & Components to receive Coveris-e»How -main is made ready to receive Coveris-e (../cotton-coveris-mvp) at the component/style level. Summarized map of Coveris-e’s out-of-component code → the kdx-* component that must exist here. Keep [[components|docs/stack/components.md]] as the live catalog; this file is the forward plan only.
[!info] Verdict Shared-component layer is essentially covered. All 33 reusable Coveris-e selectors already exist in
-main(base 30 + imported staffing + scheduling chrome).cv-tag/emp-tagare deliberately superseded by#kdx-tag(variant="requirement"/variant="category"). The real gaps are 3 feature subtrees-maindoes not have + the org-chart manager pair — listed in §1.
Status legend: ✅ already in -main · 🔄 building now (Wave 4) · ⏳ must be created to receive Coveris-e.
1. ⏳ Components to CREATE (inferred from Coveris-e code blocks)
Sección titulada «1. ⏳ Components to CREATE (inferred from Coveris-e code blocks)»1A — Scheduling subtree (features/scheduling/** — absent from -main)
Sección titulada «1A — Scheduling subtree (features/scheduling/** — absent from -main)»| Create | Inferred from (Coveris-e) | Why a component |
|---|---|---|
#kdx-month-covering-card | scheduling/components/month-covering-card.component.ts (whole, ~1–408) | Monthly grid mini-card (source stripe, avatar/dot reps, SWAP/conflict flags, draggable); sibling of #kdx-assigned-worker-card. Lift verbatim. |
#kdx-scheduling-month-grid | scheduling/components/scheduling-month-grid.component.ts (~115–2007) | The month-grid shell (sticky puesto col, ISO bands, day headers, drag-drop cells). Cohesive black-box container. |
#kdx-slot-tag | grid tpl ~L733–737 / 916–919 + styles ~L496–506 | M/T/N shift badge (colored square). Pure atom, reused in grid + cell-drawer. Tokenize its hex (§2). |
#kdx-schedule-chip | grid tpl ~L757–783 + styles ~L306–392 | Inline horario chip (HH:MM–HH:MM) + + horario add-button + rotation toggle (ADR-030/032). |
#kdx-time-range-popover | grid styles ~L399–484 + handlers | Fixed time-range editor (two time inputs, validate, save/clear). Isolate for testability. |
#kdx-scheduling-cell-drawer | scheduling/components/scheduling-cell-drawer.component.ts (whole, ~1–859) | Per-cell drawer (gap actions, ranked candidates, swap/absence undo, exception editor); sibling of node-detail-drawer. |
#kdx-candidate-row | cell-drawer ~L334–365 / 393–406 | Candidate/assigned row (avatar + name + reason/score + action). Reconcile with -main’s candidate-assign-panel into one atom. |
1B — Org-chart manager / jefatura (org-chart/components, Coveris-e-only)
Sección titulada «1B — Org-chart manager / jefatura (org-chart/components, Coveris-e-only)»| Create | Inferred from (Coveris-e) | Why a component |
|---|---|---|
#kdx-manager-badge | org-chart/components/manager-badge.component.ts (whole, ~1–100) | Jefatura slot chip on an OrgUnit card (ADR-027). Already a clean kdx-* — -main dropped it; lift verbatim. Requires re-opening the kdx-org-node-footer slot (§2). |
#kdx-manager-dialog | org-chart/components/manager-dialog.component.ts (~38–214) | Assign/clear a unit’s jefe (badge’s click target). Reconcile UX with -main’s assign-drawer. |
1C — Weekly-structure / staffing-plan board (subtrees absent; promote only the reusable cards)
Sección titulada «1C — Weekly-structure / staffing-plan board (subtrees absent; promote only the reusable cards)»| Create | Inferred from (Coveris-e) | Why a component |
|---|---|---|
#kdx-placement-card | structure/weekly-structure/components/placement-card.component.ts (whole, ~1–472) | Draggable placement card (accent stripe, coverage ratio, qty stepper, drop-target). Promote app-* → kdx-*. |
#kdx-template-chip | structure/weekly-structure/components/template-chip.component.ts (whole, ~1–131) | Draggable template-library chip (hours badge, edit/delete). Promote. |
#kdx-plan-line-card | structure/staffing-plan/plan-line-card.component.ts (whole, ~1–140) | Plan-demand line card (title, hours, required-tags, 3-metric grid). Promote; swap cv-tag → #kdx-tag [variant="requirement"]. |
The rest of the weekly-structure board (
board,tier-row,day-cell,template-sidebar,week-navigator, etc.) is store-coupledapp-*chrome — lift with the feature, do not promote tokdx-*.
2. ⚠️ Hard prerequisites (must land BEFORE §1A/1C compile)
Sección titulada «2. ⚠️ Hard prerequisites (must land BEFORE §1A/1C compile)»- Core deps into
-main/core(compile gate — nothing in §1A builds without them):core/models/scheduling.model.ts,core/data/hours-source-colors.config.ts,core/models/template-hours-label.ts. - Re-open
kdx-org-node-footerprojection slot on#kdx-org-nodeso#kdx-manager-badgecan project into the card footer (currently no footer slot). Re-validate org carousel spacing after. - Tokenize one hex set — M/T/N
kdx-slot-tagcolors (#d97706/#2563eb/#6d28d9, grid ~L504–506) →@themetokens (ADR-012-c). Everything else already uses PrimeNG tokens — no new design tokens or fonts required.
3. ✅/🔄 Already covered (scope reference — do NOT recreate)
Sección titulada «3. ✅/🔄 Already covered (scope reference — do NOT recreate)»- Imports ✅ —
#kdx-beta-badge+ staffing 7 (employee-capacity-bar,employee-chip,assigned-worker-card,position-card,position-day-grid,employee-sidebar,assign-drop-popup). - Scheduling host chrome ✅ —
scheduling-monthL519–598 →#kdx-focus-header; L633–711 →#kdx-coverage-strip; L715–796 →#kdx-scheduling-toolbar. - Page-pieces 🔄 (Wave 4) — dashboard KPIs →
#kdx-stat; section headers →#kdx-card-section; alerts →#kdx-alert-list; module grid →#kdx-module-grid; roster-detail balance →#kdx-hours-balance-card; tag grid →#kdx-tag-grid; assignment row →#kdx-assignment-row; hours table →#kdx-data-table; org tree →#kdx-org-tree-table. - Fully componentized pages ✅ —
coverage,audit-log(already purekdx-*composition in both repos).
4. Recommended build order (lowest-risk, keeps the tree green)
Sección titulada «4. Recommended build order (lowest-risk, keeps the tree green)»- Core deps (§2) — the compile gate for scheduling.
- Manager pair (§1B) — smallest, self-contained, already
kdx-; re-open the footer slot. - Scheduling leaf atoms (§1A:
slot-tag,schedule-chip,time-range-popover,month-covering-card) — each showcase-able first (ADR-012-a). - Scheduling containers (
scheduling-month-grid,scheduling-cell-drawer+ reconciledcandidate-row). - Board cards (§1C) — lift weekly-structure + staffing-plan as features; promote only the 3 cards.
5. Blast radius
Sección titulada «5. Blast radius»§1A is the only large surface (~4.9k LOC across 3 scheduling files) but additive — no -main feature consumes scheduling today, so lifting it cannot regress current pages. The one cross-cutting change is re-opening kdx-org-node-footer (touches every org-node consumer’s layout). The weekly-structure board (§1C) must move as a unit (store + components together) — do not cherry-pick its app-* pieces.