Repository navigation
Conversation
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
Production editing couples session-based permissions, metadata writes, draft registration, and save/revalidation recovery, requiring broader review than limited-scope automated approval supports.
No open issues 🎉
What changed in this PR
Connects Hub’s prototype details interface to the metadata API so signed-in members can edit visible prototypes. Saving a draft registers it while preserving its Builds, and failed saves retain entered values for retry.
Changes:
- Enables editing names, descriptions, and start pages without granting sharing or management permissions.
- Adds client validation and aligns mock storage with the details editor.
- Updates coverage, Storybook states, and documentation for the editing flow.
| File | Description |
|---|---|
hub/server/routes/api/repositories/prototypes/show/patch/index.ts |
Reports editing capability after successful saves. |
hub/server/routes/api/repositories/prototypes/show/patch/index.db.test.ts |
Updates editing-capability assertions. |
hub/server/routes/api/repositories/prototypes/show/get/index.ts |
Enables editing for visible prototype details. |
hub/server/routes/api/repositories/prototypes/show/get/index.db.test.ts |
Expects drafts to be editable. |
hub/README.md |
Documents editing and draft registration. |
hub/docs/frontend.md |
Describes editor behavior and updated contracts. |
hub/docs/development.md |
Updates locally available editing features. |
hub/docs/authentication.md |
Clarifies locking applies to details edits. |
hub/docs/architecture.md |
Documents the connected frontend editor. |
hub/client/utils/normalize-start-page/index.ts |
Normalizes local paths and rejects unsafe routes. |
hub/client/pages/prototypes-show-page/types.ts |
Adds start-page input and removes length-limit props. |
hub/client/pages/prototypes-show-page/stories.tsx |
Updates editing stories and adds a draft state. |
hub/client/pages/prototypes-show-page/prototype-description-dialog/index.tsx |
Displays and submits the start-page field. |
hub/client/pages/prototypes-show-page/index.test.tsx |
Removes obsolete fixture properties. |
hub/client/application/hub/view-models/prototype-show-data/index.ts |
Supplies saved start pages and editor labels. |
hub/client/application/hub/screens/prototype-screen/index.tsx |
Separates mock details editing from other capabilities. |
hub/client/application/hub/routes/session-flow.test.tsx |
Covers limited-member editing without extra permissions. |
hub/client/application/hub/routes/real-prototype-index.test.tsx |
Covers draft saves, retained input, and retries. |
hub/client/application/hub/routes/prototype/index.tsx |
Validates and submits all three editor fields. |
hub/client/application/hub/requests/update-prototype/index.ts |
Uses the expanded edit contract for PATCH requests. |
hub/client/application/hub/product-contracts/index.ts |
Reuses shared start-page validation. |
hub/client/application/hub/mocks/create-product-store/index.ts |
Stores start pages directly on prototype records. |
hub/client/application/hub/mocks/create-mock-store/index.ts |
Allows member edits and persists start pages. |
hub/client/application/hub/mocks/create-mock-handlers/index.ts |
Validates mock requests with the edit schema. |
hub/client/application/hub/mocks/create-mock-handlers/index.test.ts |
Covers permissions and start-page validation. |
hub/client/application/hub/contracts/types.ts |
Exports the prototype edit type. |
hub/client/application/hub/contracts/index.ts |
Adds metadata validation and start-page contracts. |
hub/client/application/hub/contracts/index.test.ts |
Covers Unicode limits and invalid start pages. |
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
Members need to update prototype details without leaving Hub.
What changes
Signed-in members can edit a prototype's name, description, and start page. Saving a draft registers it while keeping its Builds. If saving fails, the editor keeps the changes so the member can retry.
Storybook screenshots
Seven stories, light theme, 1440 × 900 viewport
Hub/Pages/Prototype Review / Preview Hosting Unavailable
Hub/Pages/Prototype Review / Editing Details
Hub/Pages/Prototype Review / Editing Details Without Start Page
Hub/Pages/Prototype Review / Editing Draft
Hub/Features/Review/Prototype description / Editing Details
Hub/Features/Review/Prototype description / Saving Details
Hub/Features/Review/Prototype description / Save Failed