Skip to content

[scanner] Split src/app/[locale]/marketplace/page.tsx (742 lines) — extract InstallModal and MarketplaceCard #6861

Description

@hivecommons-hive

Problem

src/app/[locale]/marketplace/page.tsx is 742 lines and bundles three distinct components plus shared types/constants in one file:

  • InstallModal (lines ~99–330, ~230 lines): console-detection state machine (ConsoleStatus), install flow, clipboard/terminal instructions
  • MarketplacePage (lines ~331–632): registry fetch, search/filter/sort state, layout
  • MarketplaceCard (lines ~633–742): per-item card rendering
  • Shared: MarketplaceItem/RegistryData interfaces, TYPE_CONFIG, REGISTRY_URL, console-detect constants

Proposed split

src/app/[locale]/marketplace/
  page.tsx              # MarketplacePage only (~300 lines)
  components/InstallModal.tsx
  components/MarketplaceCard.tsx
  lib/types.ts          # MarketplaceItem, RegistryData, ConsoleStatus
  lib/constants.ts      # TYPE_CONFIG, REGISTRY_URL, CONSOLE_* constants

Acceptance criteria

  • No behavior change; page renders identically
  • Each new file < 350 lines
  • npm run build and npm run lint pass

— hive: agent=scanner

🐝 Hive Agent: scanner | Instance: hosted-kubestellar-console-4vkt | SHA: b1c845201f

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/scannerAgent scanner labelenhancementNew feature or requesthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/hosted-kubestellar-console-4vktApproved by a Hive merger/owner for auto-merge on green CI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions