Repository navigation
refactor: split dashboard customizer/builder components - #24411
hivecommons-hive[bot] merged 2 commits into
Conversation
Reuse the existing addCardModal.utils helpers (buildMergedCatalog, filterCatalog, buildBrowseCardsToAdd, buildRecommendedCards) in UnifiedCardsSection and CardCatalogSection instead of keeping duplicated inline copies, and extract BuilderPreviewPane from StatBlockFactoryBuilderTab into its own file. All three files drop below 400 lines with no behavior change. Hive-Run: kubestellar#24403 Hive-Plan: split-customizer-builder-components Hive-Spec: dashboard-component-size#max-400-lines Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PRK66TfwWqtvA2DrXF32ZW Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Triage: no failing checks on head c6f3b54 — all completed checks are green; Pre-Merge Build Gate, Coverage Report, and Playwright E2E are still in progress (started 20:24 UTC). No fix needed; automerge sweep will pick this up once CI completes. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88 |
There was a problem hiding this comment.
Read the full diff at c6f3b54 and compared it against addCardModal.utils.ts in the tree. This is deduplication rather than new abstraction, and the swap is faithful:
- The inline catalog merge / search filter / cards-to-add blocks removed from
CardCatalogSection.tsxandUnifiedCardsSection.tsxare line-for-line equivalent to the pre-existingbuildMergedCatalog,filterCatalog,buildBrowseCardsToAdd, andbuildRecommendedCardsinaddCardModal.utils.ts(samedynamic_card::keying, same descriptor merge-without-overwrite, same dedupe viaaddedTypes, sameisCardVisibleForProjectapplied only to the static catalog — matching the old inline behavior exactly). BuilderPreviewPanemoves verbatim fromStatBlockFactoryBuilderTab.tsxintoStatBlockFactoryBuilderPreview.tsx, keeping its collapse/size state local; imports pruned accordingly.
Looks correct to me. Removing two drifted copies of the AddCardModal catalog logic is the real win here — future fixes land in one place.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
|
Ready for a human merge: verdict approved @c6f3b54, 37/37 checks green, DCO yes, soak 30m0s elapsed. Blocked only by The hive never approves on your behalf: |
|
hive/awaiting-ci: all checks green, but the hive merge lane exhausted retries on head c6f3b54 while build-gate was still pending. A new commit from the author (even empty) or a maintainer merge will unstick it. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88 |
|
Ready for a human merge: verdict approved @c6f3b54, 37/37 checks green, DCO yes, soak 30m0s elapsed. Blocked only by The hive never approves on your behalf: |
|
hive/awaiting-ci: branch synced with master to clear a stale merge-relay guard (earlier merge request exhausted while build-gate was still running; gate later passed). CI re-running on new head — sweep will merge when green and re-reviewed. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88 |
There was a problem hiding this comment.
Read the diff against addCardModal.utils.ts on main line-by-line. The inline blocks removed from CardCatalogSection.tsx and UnifiedCardsSection.tsx (merged-catalog build, search filter, browse cards-to-add, recommended cards) are semantically identical to buildMergedCatalog, filterCatalog, buildBrowseCardsToAdd, and buildRecommendedCards — same isCardVisibleForProject filtering, same descriptor dedup, same 'Custom Cards' key, same CARD_CATALOG source (shared/cardCatalog in both). BuilderPreviewPane was unexported before the move, so nothing else imported it; its JSX moved verbatim to StatBlockFactoryBuilderPreview.tsx.
Looks correct to me — genuine dedup against the utils AddCardModal already uses, no semantic drift. (COMMENT only; approval left to a maintainer.)
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
e572dd0
into
kubestellar:main
Summary
Splits the three dashboard customizer/builder components flagged in #24403 (each previously >400 lines). No behavior changes; props and exports are unchanged.
UnifiedCardsSection.tsx404 → 342 lines andCardCatalogSection.tsx405 → 313 lines: both carried inline copies of the catalog merge / search filter / "cards to add" logic that already exists inaddCardModal.utils.ts(used byAddCardModal). They now reusebuildMergedCatalog,filterCatalog,buildBrowseCardsToAddandbuildRecommendedCards.StatBlockFactoryBuilderTab.tsx402 → 334 lines:BuilderPreviewPanemoved to its ownStatBlockFactoryBuilderPreview.tsx.Test plan
tsc -bpasseseslinton touched files: 0 errors (2 pre-existing raw<input>warnings)vitest runondashboard/customizer,StatBlockFactory*,AddCardModal*: 17 files, 208 tests passCloses #24403
— hive: backend=claude