Repository navigation
feat(hub): add the read-only prototype index - #220
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The database test fails in the documented devcontainer because the seed guard rejects the isolated worker database URL before the repeatability assertions run.
1 open issue
What changed in this PR
Adds the rebuilt Hub’s first database-backed, read-only prototype index, connecting signed-in members to repository listings while preserving mock mode.
Changes:
- Adds repository and prototype models, migration constraints, authenticated read endpoints, and a guarded development seed.
- Connects real-mode navigation to gallery, list, and empty states while hiding unsupported actions.
- Adds database and frontend coverage, Storybook examples, and documentation for current access limitations.
| File | Description |
|---|---|
hub/test/database/prototype-index-migration/index.db.test.ts |
Checks upgrades preserve identity data and support prototypes. |
hub/server/start-server-processes/index.ts |
Accepts product-route dependencies. |
hub/server/scripts/seed-prototype-index/is-local-development-database/index.ts |
Restricts seeding to local development databases. |
hub/server/scripts/seed-prototype-index/is-local-development-database/index.test.ts |
Covers allowed and rejected database targets. |
hub/server/scripts/seed-prototype-index/index.ts |
Seeds a sample repository and two prototypes. |
hub/server/scripts/seed-prototype-index/index.test.ts |
Checks rejection before Prisma initialization. |
hub/server/scripts/seed-prototype-index/index.db.test.ts |
Covers seed repeatability and conflicting records. |
hub/server/run-api/index.ts |
Passes product dependencies into the application. |
hub/server/routes/types.ts |
Extends shared route dependencies. |
hub/server/routes/index.ts |
Registers workspace and repository endpoints. |
hub/server/routes/api/workspace/get/index.ts |
Returns the authenticated workspace and capabilities. |
hub/server/routes/api/repositories/show/get/index.ts |
Validates and serves repository index requests. |
hub/server/routes/api/product/types.ts |
Defines product read dependencies. |
hub/server/routes/api/product/read-product-session/index.ts |
Restores sessions for product reads. |
hub/server/routes/api/product/create-product-route-dependencies/index.ts |
Connects product reads to Prisma. |
hub/server/routes/api/product-index/index.db.test.ts |
Covers reads, session checks, concurrency, and constraints. |
hub/server/repositories/prototype-index/list-repositories/index.ts |
Lists non-removed repositories. |
hub/server/repositories/prototype-index/find-repository-index/index.ts |
Reads eligible prototypes with consistent counts. |
hub/server/index.ts |
Initializes product routes alongside authentication. |
hub/server/index.test.ts |
Checks product dependency initialization. |
hub/server/create-app/index.ts |
Applies security middleware to product endpoints. |
hub/schema/user.prisma |
Adds the user-to-prototype relation. |
hub/schema/repository.prisma |
Defines persisted repositories. |
hub/schema/prototype.prisma |
Defines prototype records and relationships. |
hub/schema/migrations/20261110170013_prototype_index/migration.sql |
Creates tables, indexes, and invariant constraints. |
hub/README.md |
Updates the Hub feature summary. |
hub/package.json |
Adds the index seed command. |
hub/docs/frontend.md |
Documents real-mode index behavior. |
hub/docs/development.md |
Explains seed setup and access limitations. |
hub/docs/database.md |
Documents prototype data invariants. |
hub/docs/architecture.md |
Updates implemented capabilities and frontend flow. |
hub/client/pages/repositories-show-page/stories.tsx |
Adds real-index presentation states. |
hub/client/pages/repositories-show-page/index.tsx |
Makes filters and Build status optional. |
hub/client/pages/repositories-index-page/stories.tsx |
Adds a real empty-workspace story. |
hub/client/features/prototype-index-header/index.tsx |
Supports hiding search and its shortcut. |
hub/client/components/workspace-navigation/types.ts |
Carries identity-provider information. |
hub/client/components/repository-user-menu/stories.tsx |
Adds an Entra account-menu story. |
hub/client/components/repository-user-menu/index.tsx |
Formats identities according to provider. |
hub/client/components/prototype-card/types.ts |
Allows cards without detail links. |
hub/client/components/prototype-card/index.tsx |
Supports unlinked cards and optional Build cells. |
hub/client/application/hub/view-models/workspace-navigation/index.ts |
Adapts navigation and sign-out for real mode. |
hub/client/application/hub/view-models/repository-workspace/index.ts |
Hides unavailable real-mode repository destinations. |
hub/client/application/hub/view-models/repository-show-data/index.ts |
Maps nullable authors and read-only cards. |
hub/client/application/hub/screens/repository-screen/index.tsx |
Selects real-mode presentation capabilities. |
hub/client/application/hub/routes/workspace/index.tsx |
Preserves provider identity and real-mode redirects. |
hub/client/application/hub/routes/real-prototype-index.test.tsx |
Covers real index navigation and mock compatibility. |
hub/client/application/hub/routes/real-auth-flow.test.tsx |
Updates authenticated empty-workspace coverage. |
hub/client/application/hub/routes/home/index.tsx |
Opens the first repository or empty workspace. |
hub/client/application/hub/root.tsx |
Restores real sessions for private routes. |
hub/client/application/hub/mocks/pagination.test.ts |
Aligns pagination test types with index responses. |
hub/client/application/hub/contracts/index.ts |
Supports provider metadata and nullable authors. |
hub/AGENTS.md |
Updates contributor guidance for the implemented index. |
hub/.devcontainer/compose.yaml |
Marks the devcontainer for seed validation. |
Review effort: Balanced (auto)
alliscode
approved these changes
Nov 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Reject unsafe seed targets and conflicting sample records, keep index reads consistent with repository state, and align the registration constraint with JavaScript trimming. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 88d7ad2d-de3c-4d5a-95fc-ced290856050
The seed only writes synthetic sample data to a local database, so it now restores its fixed samples on every run instead of checking each field for conflicts. Its database test is removed because it failed in the devcontainer and protected little; the database guard keeps its own tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 64725675-86e0-488d-ab25-e86df5b78abe
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 17349a8d-6419-4bde-a48c-d73cb926156a
nshki
force-pushed
the
nshki/feat/hub/prototype-index
branch
from
November 11, 2026 19:00
58af049 to
f733570
Compare
| response.status(401).json({ error: "Sign in to continue." }) | ||
| return | ||
| } | ||
| const repositories = await product.listRepositories() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
The rebuilt Hub can sign members in, but it cannot yet show a prototype index. This brings back the first part of the Rails experience while prototype details are still being ported.
What changes
Signed-in members can open a repository and see up to 24 registered prototypes from the database, or an empty workspace. The index is read-only and cards do not link to details yet. A development-only seed adds a sample repository and two prototypes.
All active Hub members can see non-removed repositories for now. Repository discovery and per-repository authorization are not connected, so the seed uses synthetic data. Search, user filters, pagination, Build status, and detail views will follow. Mock mode remains available.
Storybook screenshots
Components/Repository User Menu/Entra Member - light, 600x400
Hub/Pages/Repositories/Real Empty Workspace - light, 1440x900
Hub/Pages/Repositories/Show/Real Index - light, 1440x900
Hub/Pages/Repositories/Show/Real Index List - light, 1440x900
Hub/Pages/Repositories/Show/Real Index Empty - light, 1440x900
Hub/Pages/Repositories/Show/Real Index Single - light, 1440x900