Repository navigation
feat(hub): connect read-only prototype details - #246
Merged
nshki merged 4 commits intoNov 12, 2026
Merged
Conversation
Members can read one prototype with its Builds and a selected successful Build. Preview URLs stay empty until Hub hosts Builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 335a01a0-881c-4159-bcf9-5f19b9b66bd4
Index cards now open real prototype details. Unavailable history, Build detail, and sharing actions stay hidden in real mode, and non-GitHub authors are shown without GitHub links. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 335a01a0-881c-4159-bcf9-5f19b9b66bd4
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Real detail pages still use mock sign-out and administrator links, and minimized mode can hide navigation without a restore control.
3 open issues
What changed in this PR
Connects Hub’s real repository index to read-only prototype details, using the provider-neutral Build metadata introduced in #230. Hosted previews and live review remain unavailable.
Changes:
- Adds a member-only detail API with successful Build selection and invalid-selection handling.
- Enables index-to-detail navigation, hides unavailable actions, and supports missing metadata and non-GitHub authors.
- Adds API and frontend coverage, a no-preview story, and updated guides.
| File | Description |
|---|---|
hub/server/routes/index.ts |
Registers the prototype detail endpoint. |
hub/server/routes/api/repositories/prototypes/show/get/index.ts |
Validates requests and rechecks membership. |
hub/server/routes/api/repositories/prototypes/show/get/index.db.test.ts |
Covers selection, visibility, authors, and access. |
hub/server/routes/api/product/types.ts |
Adds the detail lookup dependency. |
hub/server/routes/api/product/create-product-route-dependencies/index.ts |
Connects the detail lookup to Prisma. |
hub/server/repositories/prototype-index/find-prototype-detail/index.ts |
Reads prototype metadata and selects successful Builds. |
hub/docs/frontend.md |
Documents real detail behavior and limitations. |
hub/docs/development.md |
Updates the local browsing workflow. |
hub/docs/architecture.md |
Records read-only detail availability. |
hub/client/pages/prototypes-show-page/stories.tsx |
Adds the preview-unavailable story and updates empty copy. |
hub/client/pages/builds-show-page/types.ts |
Allows unknown commit SHAs. |
hub/client/pages/builds-show-page/index.tsx |
Displays a missing-commit fallback. |
hub/client/pages/builds-index-page/types.ts |
Allows nullable history commit metadata. |
hub/client/pages/builds-index-page/index.tsx |
Handles nullable commit tooltips. |
hub/client/features/prototype-workspace-header/types.ts |
Supports optional history and explicit Build selection. |
hub/client/features/prototype-workspace-header/index.tsx |
Updates selection and hides unavailable menu actions. |
hub/client/application/hub/view-models/repository-show-data/index.ts |
Enables prototype card links. |
hub/client/application/hub/view-models/prototype-workspace/index.ts |
Adapts author identity and Build navigation. |
hub/client/application/hub/view-models/prototype-show-data/index.ts |
Filters real Build choices and hides unavailable actions. |
hub/client/application/hub/view-models/build-show-data/index.ts |
Presents provider-neutral Build authors. |
hub/client/application/hub/view-models/build-history-data/index.ts |
Handles unknown commits and provider-neutral authors. |
hub/client/application/hub/screens/repository-screen/index.tsx |
Removes the detail-navigation restriction. |
hub/client/application/hub/screens/prototype-screen/index.tsx |
Passes real-mode settings to the detail adapter. |
hub/client/application/hub/routes/real-prototype-index.test.tsx |
Covers real detail navigation and Build selection. |
hub/client/application/hub/routes/journey.test.tsx |
Extends mock navigation and author coverage. |
hub/client/application/hub/requests/get-prototype/index.test.ts |
Expects 404 for invalid Build selections. |
hub/client/application/hub/read-prototype-query/index.ts |
Maps invalid Build queries to 404. |
hub/client/application/hub/mocks/create-mock-store/index.ts |
Permits unknown authors in fixtures. |
hub/client/application/hub/contracts/index.ts |
Adds nullable metadata and stricter detail queries. |
Review effort: Balanced (auto)
Real prototype pages still used mock workspace navigation, so signing out did not end the Hub session. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 335a01a0-881c-4159-bcf9-5f19b9b66bd4
The restore button only appears on a preview. Real Builds have no hosted preview yet, so a minimized link left members without navigation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 335a01a0-881c-4159-bcf9-5f19b9b66bd4
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
Members can browse the real prototype index, but its cards lead nowhere. This connects each card to a read-only prototype page so members can see a prototype and its Builds before hosted previews and review exist.
What changes
Hub adds
GET /api/repositories/:repositoryId/prototypes/:prototypeIdfor signed-in members. It returns the prototype, its Builds, and the latest successful Build. Abuildquery pins another successful Build. A malformed, missing, or unsuccessful Build returns 404. Preview and screenshot URLs stay empty because Hub does not host Builds yet.In real mode, index cards now open this page. It shows a "no preview" state and offers only successful Builds. Build history, Build details, and sharing links stay hidden until they work. Authors who signed in with another provider, such as Entra, appear by name without a GitHub link. Mock mode keeps its existing navigation.
Build author details come from the provider-neutral
author_*columns added in #230.Storybook screenshots
Hub/Pages/Prototype Review › Preview Hosting Unavailable (light theme, 1200×1279)
Hub/Pages/Prototype Review › Empty (light theme, 1200×1279; updated empty-state copy)