Skip to content

feat(hub): register drafts on name edits - #257

Merged
nshki merged 1 commit into
nshki/feat/hub/edit-registered-prototype-namefrom
nshki/feat/hub/register-prototype-on-edit
Nov 16, 2026
Merged

nshki merged 1 commit into
nshki/feat/hub/edit-registered-prototype-namefrom
nshki/feat/hub/register-prototype-on-edit

Conversation

@nshki

@nshki nshki commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Why

Hub needs to register an existing draft without losing its Builds.

What changes

The first name edit through the API registers the draft and records the member who made it. Later edits preserve that first user, the registration time, and the Builds.

Storybook screenshots

No story presentation changes.

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 15:45
@nshki
nshki requested an adaptive review from Copilot November 14, 2026 15:46

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

Draft registration introduces durable first-user attribution whose correctness spans row locking, concurrent edits, session authority, and transaction rollback, exceeding the limited scope of automated approval.

No open issues 🎉

What changed in this PR

This PR extends Hub’s prototype name-edit API to register existing drafts in place, preserving their Builds. The first edit records the registering member and registration time; later edits retain both.

Changes:

  • Register visible drafts on their first valid name edit.
  • Add database coverage for registration, concurrent edits, validation, rollback, and hidden drafts, with deadline-based lock polling.
  • Update Hub documentation to describe the API behavior; the frontend editor remains unchanged.
File Description
hub/​test/​database/​wait-for-blocked-query/​index.ts Use a five-second polling deadline for blocked queries.
hub/​server/​routes/​api/​repositories/​prototypes/​show/​patch/​index.db.test.ts Cover draft registration, Build preservation, concurrency, and failures.
hub/​server/​repositories/​prototypes/​update-prototype-metadata/​index.ts Allow registration fields in metadata updates.
hub/​server/​domains/​prototypes/​edit-prototype-metadata/​index.ts Register drafts while preserving existing registration history.
hub/​docs/​frontend.md Document draft registration and name-edit API guarantees.
hub/​docs/​architecture.md Reflect draft registration in current API capabilities.
hub/​AGENTS.md Update the supported Hub feature summary.

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 ed5810d into build/hub/new Nov 16, 2026
51 checks passed
@nshki
nshki deleted the nshki/feat/hub/register-prototype-on-edit 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