Skip to content

feat(hub): paginate and filter prototype gallery - #35

Merged
nshki merged 12 commits into
mainfrom
copilot/hub-pagination-filtering
Oct 22, 2026
Merged

nshki merged 12 commits into
mainfrom
copilot/hub-pagination-filtering

Conversation

Copilot AI commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Why

The Hub loads every registered prototype into the index before searching. As repositories add more prototypes, each visit loads more records and Build data than a reviewer needs. Closes #33.

What changes

Reviewers browse up to 24 prototypes at a time with the same Primer Brand numbered Pagination component used by Manage Prototypes. Search runs across the selected repository rather than only the visible page. The searchable Author filter uses Primer Brand's single-selection ActionMenu, puts Me first, and filters by the person who first registered each prototype. Cards and the list show that same saved author; later commits do not change attribution. The dropdown keeps its text left-aligned and caret right-aligned, with an enabled resting surface, bounded width, and ellipsis for long labels and options.

Search, author, and page state stay in the URL for reloads and browser history. Changing a filter starts at the first matching page. New registrations or removals can shift records between numbered pages; pages beyond the remaining results show the last available page. Requests keep the previous cards visible while loading or after a failure, with an explicit retry action. Card and Build loading is limited to the selected page.

The Author dropdown sits beside search, followed by the gallery/list controls with extra separation. On narrow screens, these controls stack in the same order. Choose All authors to remove the author filter, or use the foreground-colored search X to clear only the search. There is no separate Clear filters action. An empty author collection leaves the pinned menu choices without a message; No matching authors appears only after an entered author search returns no matches.

The authenticated full-app browser flow remains unverified. These screenshots show synthetic local Storybook examples in light mode, not a signed-in deployment.

Paginated index, 1280x900. The fixture uses two representative cards to illustrate numbered page navigation.

Prototype index with adjacent author and search filters, trailing view controls, and numbered pagination

Search header close-up, captured at 1280x900. Author and search stay adjacent, with gallery/list controls on the right. The search-clear icon remains centered inside the input.

Author and search filters followed by gallery and list controls

Empty author menu close-up, captured at 1280x900. Me and All authors remain available without a misleading empty-search message.

Empty author collection showing only search and the pinned Me and All authors choices

Author lookup loading, captured at 1280x720. A small Hub spinner and muted text align with the menu options while author choices load. The existing HubSpinner component and Hub semantic tokens supply the indicator and color; installed Primer Brand ActionMenu styles supply the row spacing.

Author menu with pinned choices and a muted loading row containing a spinner

Copilot AI max review requested due to automatic review settings October 19, 2026 18:43
Copilot AI requested review from a team and nshki as code owners October 19, 2026 18:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because there is no eligible user to bill.

An enterprise owner can allow the organization to be billed for reviews like this by enabling Copilot code review for users without a license.

Copilot AI added 2 commits October 19, 2026 19:03
Add repository-scoped server search, signed cursor pages, and a searchable Me-first registration-author filter. Bound card and Build hydration to each selected page and preserve filters in browser history.

Refs #33

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the custom author popup with Primer Brand ActionMenu selection rows while retaining bounded search and Me-first ordering. Style page navigation as secondary buttons without changing link behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI force-pushed the copilot/hub-pagination-filtering branch from 6b5ed01 to 370b350 Compare October 19, 2026 19:08
Copilot AI added 5 commits October 19, 2026 19:38
Consolidate insertion stability into the prototype and author paging scenarios, share cursor-scope checks, and rely on existing local-identity coverage. Combine overlapping frontend filter flows and remove repeated assertions without changing application code.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Count only matching results, avoid hydrating an unused prototype, and remove obsolete client-side count fields. Check stale author responses through their visible outcome instead of abort-signal details, retaining the existing test count. Correct the search-clearing documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lukasoppermann

Copy link
Copy Markdown
Contributor

Generally looking good. Only Nitpick is that the dropdown in closed looks disabled. I appreciate that this is how the buttons look, but in contrast with the segmented control and the input field, it looks disabled. Maybe we can use an outline button like in the pagination instead?

I can not run this locally because of the registry error, so I can not say anything to the actual functionality:

Image

Copilot AI and others added 4 commits October 21, 2026 15:50
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merge main while preserving gallery indexes and the latest schema migration version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread hub/app/views/repositories/show.json.props Outdated
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

@nshki nshki 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.

Collaborated with @lukasoppermann on buttoning up the UX. Thanks Lukas.

@nshki
nshki merged commit 4efc1bd into main Oct 22, 2026
40 checks passed
@nshki
nshki deleted the copilot/hub-pagination-filtering branch October 22, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add bounded pagination and author filtering to the prototype index

6 participants