Skip to content

feat(hub): edit prototype details in the interface - #259

Merged
nshki merged 1 commit into
nshki/feat/hub/edit-prototype-metadatafrom
nshki/feat/hub/edit-prototype-interface
Nov 16, 2026
Merged

nshki merged 1 commit into
nshki/feat/hub/edit-prototype-metadatafrom
nshki/feat/hub/edit-prototype-interface

Conversation

@nshki

@nshki nshki commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

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

Preview hosting unavailable

Hub/Pages/Prototype Review / Editing Details

Editing prototype details

Hub/Pages/Prototype Review / Editing Details Without Start Page

Editing details without a start page

Hub/Pages/Prototype Review / Editing Draft

Editing a draft

Hub/Features/Review/Prototype description / Editing Details

Editing details

Hub/Features/Review/Prototype description / Saving Details

Saving details

Hub/Features/Review/Prototype description / Save Failed

Save failed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836
@nshki
nshki added this pull request to stack #255 November 14, 2026 16:35
@nshki
nshki requested an adaptive review from Copilot November 14, 2026 16:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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
nshki marked this pull request as ready for review November 16, 2026 15:34
@nshki
nshki requested a review from a team as a code owner November 16, 2026 15:34
@nshki
nshki merged commit 6deb867 into build/hub/new Nov 16, 2026
51 checks passed
@nshki
nshki deleted the nshki/feat/hub/edit-prototype-interface branch November 16, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants