Skip to content

refactor: split dashboard customizer/builder components - #24411

Merged
hivecommons-hive[bot] merged 2 commits into
kubestellar:mainfrom
Karibhou:refactor/24403-customizer-builder
Oct 18, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
kubestellar:mainfrom
Karibhou:refactor/24403-customizer-builder

Conversation

@Karibhou

Copy link
Copy Markdown
Contributor

Summary

Splits the three dashboard customizer/builder components flagged in #24403 (each previously >400 lines). No behavior changes; props and exports are unchanged.

  • UnifiedCardsSection.tsx 404 → 342 lines and CardCatalogSection.tsx 405 → 313 lines: both carried inline copies of the catalog merge / search filter / "cards to add" logic that already exists in addCardModal.utils.ts (used by AddCardModal). They now reuse buildMergedCatalog, filterCatalog, buildBrowseCardsToAdd and buildRecommendedCards.
  • StatBlockFactoryBuilderTab.tsx 402 → 334 lines: BuilderPreviewPane moved to its own StatBlockFactoryBuilderPreview.tsx.

Test plan

  • tsc -b passes
  • eslint on touched files: 0 errors (2 pre-existing raw <input> warnings)
  • vitest run on dashboard/customizer, StatBlockFactory*, AddCardModal*: 17 files, 208 tests pass
  • CI build/lint

Closes #24403

— hive: backend=claude

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign eeshaansa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 17, 2026
@netlify

netlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kubestellarconsole ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit aef8a66
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6ad445c5354ce9c4cb56a94b
😎 Deploy Preview https://deploy-preview-24411.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Oct 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: b9ff511

— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.tsx and UnifiedCardsSection.tsx are line-for-line equivalent to the pre-existing buildMergedCatalog, filterCatalog, buildBrowseCardsToAdd, and buildRecommendedCards in addCardModal.utils.ts (same dynamic_card:: keying, same descriptor merge-without-overwrite, same dedupe via addedTypes, same isCardVisibleForProject applied only to the static catalog — matching the old inline behavior exactly).
  • BuilderPreviewPane moves verbatim from StatBlockFactoryBuilderTab.tsx into StatBlockFactoryBuilderPreview.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

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/090-ready-for-human-merge Hive would merge this but trust/role blocks it; a maintainer's /lgtm /approve is all that is missing and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Ready for a human merge: verdict approved @c6f3b54, 37/37 checks green, DCO yes, soak 30m0s elapsed. Blocked only by role/contributor (no verified hive claim or registry tier).

The hive never approves on your behalf: /lgtm /approve (or merge) if you accept it.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: b9ff511

— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/090-ready-for-human-merge Hive would merge this but trust/role blocks it; a maintainer's /lgtm /approve is all that is missing stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 18, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Ready for a human merge: verdict approved @c6f3b54, 37/37 checks green, DCO yes, soak 30m0s elapsed. Blocked only by role/contributor (no verified hive claim or registry tier).

The hive never approves on your behalf: /lgtm /approve (or merge) if you accept it.

@hivecommons-hive hivecommons-hive Bot added the stage/090-ready-for-human-merge Hive would merge this but trust/role blocks it; a maintainer's /lgtm /approve is all that is missing label Oct 18, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 18, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed dco-signoff: yes Indicates the PR's author has signed the DCO. stage/090-ready-for-human-merge Hive would merge this but trust/role blocks it; a maintainer's /lgtm /approve is all that is missing labels Oct 18, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: 7305443

— hive: agent=scanner backend=copilot model=claude-fable-5 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/stalled In its current stage longer than expected and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 18, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit e572dd0 into kubestellar:main Oct 18, 2026
49 of 50 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#24411aef8a66` sha256:ad4a215d6fa6562f49cf9736ea1bd1aed74781e5bf0e3f0f448b368463d4e4ad — download from the dashboard or `hivectl review evidence #24411`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/stalled In its current stage longer than expected stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] refactor: split dashboard customizer/builder components

1 participant