Skip to content

MinerOpenDiscoveryIssuesByRepo: Mine and Other sections carry duplicate state, handlers, and columns #1042

@cleanjunc

Description

@cleanjunc

src/components/miners/MinerOpenDiscoveryIssuesByRepo.tsx has grown to over 1,200 lines, mostly because the file maintains two parallel state machines for its Mine and Other sections.

Each section keeps its own filter, search, sort, and pagination state, its own sort handler, and its own memos for filtered, paged, and counted issues. The two column definitions are also nearly identical. Any change to the toolbar, sort behavior, pagination, or empty state has to be made twice and kept in sync by hand.

Suggested direction

Extract a shared MinerIssueRepoSection that owns the per section state and renders the toolbar, table, and pagination. The parent then renders one inline instance for Mine and one collapsible instance for Other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode restructuring without behavior change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions