Repository navigation
feat(hub): add prototype Build detail metadata - #230
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 24981734-e0da-49fc-baf7-507617a6b09f
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The database test fails in the documented devcontainer because the seed’s safety guard rejects the isolated worker database URL before any records are created.
1 open issue
What changed in this PR
Adds the persistence foundation for Hub’s planned prototype Build detail experience, without introducing Build APIs, preview hosting, or historical imports.
Changes:
- Adds optional commit, external author, timing, and failure metadata with database constraints.
- Adds PostgreSQL coverage for upgrades, metadata rules, and seed reruns.
- Updates synthetic seed data and contributor documentation.
| File | Description |
|---|---|
hub/test/database/build-metadata-migration/index.db.test.ts |
Tests upgrade preservation and metadata constraints. |
hub/server/scripts/seed-prototype-index/index.ts |
Populates synthetic Build metadata. |
hub/server/scripts/seed-prototype-index/index.db.test.ts |
Tests seeded metadata and restoration on rerun. |
hub/schema/migrations/20261112190000_build_detail_metadata/migration.sql |
Adds metadata columns, uniqueness, and consistency constraints. |
hub/schema/build.prisma |
Exposes metadata fields through Prisma. |
hub/docs/development.md |
Clarifies synthetic metadata and seed restoration. |
hub/docs/database.md |
Documents metadata rules and unknown values after upgrades. |
Review effort: Balanced (auto)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 24981734-e0da-49fc-baf7-507617a6b09f
alliscode
reviewed
Nov 12, 2026
alliscode
approved these changes
Nov 12, 2026
weastler
approved these changes
Nov 12, 2026
Build author details may come from sources other than a Git commit, such as a future manual upload. Dropping the commit prefix keeps these columns accurate for every source. The commit SHA keeps its name because it only describes Git Builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 335a01a0-881c-4159-bcf9-5f19b9b66bd4
nshki
added a commit
that referenced
this pull request
Nov 12, 2026
## 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/:prototypeId` for signed-in members. It returns the prototype, its Builds, and the latest successful Build. A `build` query 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)  --------- 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
Build records need source and author metadata to support the planned prototype detail experience. This slice adds the persistence foundation without expanding into historical Rails imports, Build APIs, preview hosting, or live review.
What changes
Add optional commit SHA, external author identity and snapshots, Build start and finish times, and failure summaries. Database constraints keep known metadata coherent while allowing existing Builds to retain unknown values. Seed data, PostgreSQL coverage, and the database and development guides are updated to match.