Skip to content

feat(hub): search and filter the real prototype index - #221

Merged
nshki merged 1 commit into
nshki/feat/hub/prototype-indexfrom
nshki/feat/hub/prototype-index-search
Nov 11, 2026
Merged

nshki merged 1 commit into
nshki/feat/hub/prototype-indexfrom
nshki/feat/hub/prototype-index-search

Conversation

@nshki

@nshki nshki commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Why

The rebuilt Hub's real prototype index needs search, user filters, and pagination so members can find registered prototypes as the list grows.

What changes

Members can search by prototype name, description, branch, or user login and name, filter by the signed-in user or another user, and move through results 24 at a time. The user filter lists eligible users 20 at a time. A page beyond the last result shows the final page.

The real index now exposes the same search, user filter, and pagination controls as mock mode. The shared filter copy calls people users.

Storybook screenshots

Hub/Pages/Repositories/Show stories (light, 1440 × 1000)

Hub/Pages/Repositories/Show — Empty (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Ready To Build (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Workflow Update Failed (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Workflow Already Current (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Local Repository (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Single (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Multiple (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Read Only (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Real Index (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Real Index List (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Real Index Empty (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Real Index Single (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Wide View Switching (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Searched (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Me Selected (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Paginated (light, 1440 × 1000)
Hub/Pages/Repositories/Show — No Matches (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Updating (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Request Failed (light, 1440 × 1000)
Hub/Pages/Repositories/Show — List (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Writer With Unlisted Branches (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Multiple Recent Branches (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Local Writer With Unlisted Branches (light, 1440 × 1000)
Hub/Pages/Repositories/Show — Fresh Local Example (light, 1440 × 1000)

Features/Prototype Author Filter stories (light, 1440 × 1000; menu open)

Features/Prototype Author Filter — Empty (light, 1440 × 1000; menu open)
Features/Prototype Author Filter — Single (light, 1440 × 1000; menu open)
Features/Prototype Author Filter — Me (light, 1440 × 1000; menu open)
Features/Prototype Author Filter — Long Author (light, 1440 × 1000; menu open)
Features/Prototype Author Filter — Failed (light, 1440 × 1000; menu open)
Features/Prototype Author Filter — Loading (light, 1440 × 1000; menu open)

@nshki
nshki requested a review from a team as a code owner November 10, 2026 22:22
Copilot AI adaptive review requested due to automatic review settings November 10, 2026 22:22
@nshki
nshki added this pull request to stack #222 November 10, 2026 22:22

Copilot AI 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.

🟡 Changes recommended

The endpoint can return stale author choices if the repository is removed or its default branch changes during user lookup, because it does not revalidate eligibility before responding.

1 open issue
What changed in this PR

This PR connects Hub’s real, read-only prototype index to search, user filtering, and pagination, bringing it closer to the existing mock experience.

Changes:

  • Adds case-insensitive prototype search, user filters, and 24-result pages with out-of-range page handling.
  • Adds searchable, cursor-paginated user choices using shared prototype eligibility rules.
  • Enables the real-mode controls and updates user-facing terminology, tests, stories, and documentation.
File Description
hub/​server/​routes/​index.ts Registers the user-choice endpoint.
hub/​server/​routes/​api/​repositories/​show/​get/​index.ts Validates and forwards index filters.
hub/​server/​routes/​api/​repositories/​authors/​get/​index.ts Adds authenticated user search and cursor handling.
hub/​server/​routes/​api/​product/​types.ts Defines filtered index and user-query dependencies.
hub/​server/​routes/​api/​product/​create-product-route-dependencies/​index.ts Connects routes to database queries.
hub/​server/​routes/​api/​product-index/​index.db.test.ts Covers filtering, pagination, validation, and session checks.
hub/​server/​repositories/​prototype-index/​reviewable-prototype-where/​index.ts Shares prototype eligibility conditions.
hub/​server/​repositories/​prototype-index/​find-repository-index/​index.ts Implements search, user filtering, and pagination.
hub/​server/​repositories/​prototype-index/​find-repository-authors/​index.ts Queries eligible users with cursor pagination.
hub/​server/​repositories/​prototype-index/​contains-text/​index.ts Escapes search wildcards for literal matching.
hub/​docs/​frontend.md Documents real-mode controls and API behavior.
hub/​docs/​development.md Updates the real index’s supported capabilities.
hub/​client/​storybook/​fixtures/​prototype-listing.ts Changes shared filter copy to “users.”
hub/​client/​pages/​repositories-show-page/​stories.tsx Enables filters in the real-index story.
hub/​client/​pages/​repositories-show-page/​index.tsx Always exposes search, user filters, and pagination.
hub/​client/​features/​prototype-index-header/​index.tsx Removes the search-visibility toggle.
hub/​client/​features/​prototype-author-filter/​stories.tsx Updates the default filter label.
hub/​client/​features/​prototype-author-filter/​index.test.tsx Aligns interaction tests with user terminology.
hub/​client/​application/​hub/​view-models/​repository-show-data/​index.ts Updates filter labels and feedback copy.
hub/​client/​application/​hub/​screens/​repository-screen/​index.tsx Removes the mock-only filter restriction.
hub/​client/​application/​hub/​routes/​real-prototype-index.test.tsx Checks real-mode controls and search requests.
hub/​client/​application/​hub/​routes/​journey.test.tsx Updates journey assertions for user labels.

Review effort: Balanced (auto)

Members can now search the real prototype index, filter it by user, and
page through it, matching the Rails Hub. The user filter lists other
users with eligible prototypes, and filter copy now says "users".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 64725675-86e0-488d-ab25-e86df5b78abe
@nshki
nshki force-pushed the nshki/feat/hub/prototype-index-search branch from 15a19a6 to 4e7ac3d Compare November 11, 2026 19:00
@nshki
nshki merged commit 43f8e1d into build/hub/new Nov 11, 2026
64 checks passed
@nshki
nshki deleted the nshki/feat/hub/prototype-index-search branch November 11, 2026 19:06
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.

5 participants