Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The interacting metadata API, draft-registration, cross-writer database constraint, and recursive path-validation changes require broader review of persistence and security contracts.
No open issues 🎉
What changed in this PR
Extends Hub’s prototype metadata API so members can edit descriptions and local start pages alongside names, before hosted previews are available. The frontend editor remains separate work.
Changes:
- Supports partial metadata edits that register drafts while preserving existing authorship, registration history, and Builds.
- Adds start-page validation, a
/default, and database guards for metadata. - Adds API, migration, and seed regression coverage and updates the canonical guides.
| File | Description |
|---|---|
hub/test/database/prototype-metadata-migration/index.db.test.ts |
Tests legacy cleanup and preservation of prototype and Build identity. |
hub/server/utils/trim-prototype-metadata/index.ts |
Shares Unicode whitespace trimming. |
hub/server/utils/normalize-start-page/index.ts |
Validates local paths, encoding, reserved routes, and byte limits. |
hub/server/scripts/seed-prototype-index/seed-prototype-index-data/index.ts |
Resets seeded start pages. |
hub/server/scripts/seed-prototype-index/index.db.test.ts |
Tests metadata restoration when seeding again. |
hub/server/routes/api/repositories/prototypes/show/patch/index.ts |
Accepts description and start-page edits. |
hub/server/routes/api/repositories/prototypes/show/patch/index.db.test.ts |
Covers metadata edits, draft registration, and invalid inputs. |
hub/server/repositories/prototypes/update-prototype-metadata/index.ts |
Supports partial metadata updates. |
hub/server/repositories/prototypes/lock-editable-prototype/index.ts |
Reads names needed for draft registration. |
hub/server/repositories/prototype-index/find-prototype-detail/index.ts |
Returns saved start pages or /. |
hub/server/domains/prototypes/edit-prototype-metadata/index.ts |
Validates edits and registers drafts on their first metadata edit. |
hub/schema/prototype.prisma |
Adds optional start-page storage. |
hub/schema/migrations/20261114150000_prototype_metadata/migration.sql |
Adds the column, cleans legacy blanks, and enforces database guards. |
hub/docs/frontend.md |
Documents the metadata API and frontend limitations. |
hub/docs/database.md |
Documents metadata storage invariants. |
hub/docs/architecture.md |
Updates the supported API capabilities. |
hub/AGENTS.md |
Updates Hub’s documented metadata-editing scope. |
Review effort: Balanced (dynamic)
nshki
marked this pull request as ready for review
November 16, 2026 15:34
alliscode
approved these changes
Nov 16, 2026
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
Prototypes need a description and a start page even before hosted previews are available.
What changes
Members can edit a prototype's name, description, and local start page through the API. Editing any of those fields registers a draft without replacing its Builds. Blank descriptions are cleared, and a missing start page uses
/.Storybook screenshots
No story presentation changes.