Skip to content

feat(hub): show prototype information on first visit - #260

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

nshki merged 1 commit into
nshki/feat/hub/edit-prototype-interfacefrom
nshki/feat/hub/prototype-introductions

Conversation

@nshki

@nshki nshki commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

Members should see a prototype's information the first time they visit it.

What changes

Hub records each member's first normal view of a prototype and shows its information on that visit. Minimized views do not consume the introduction, and a response that cannot be rendered does not record one.

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

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

Prototype GETs now couple per-user persistence with authority and visibility locks, requiring broader review of interactions with concurrent sign-out, revocation, and prototype edits.

No open issues 🎉

What changed in this PR

This PR connects Hub’s prototype detail endpoint to persistent per-user introduction tracking, requesting the information dialog on each member’s first normal visit.

Changes:

  • Adds introduction records unique to each user and prototype.
  • Records introductions transactionally with response preparation and session checks; minimized views and HEAD requests do not consume them.
  • Adds migration and API coverage and documents the behavior.
File Description
hub/​test/​database/​prototype-introductions-migration/​index.db.test.ts Tests data preservation and introduction uniqueness during migration.
hub/​server/​routes/​api/​repositories/​prototypes/​show/​get/​index.ts Returns first-visit information flags while excluding minimized and HEAD requests.
hub/​server/​routes/​api/​repositories/​prototypes/​show/​get/​index.test.ts Covers response preparation, editing capability, and excluded request types.
hub/​server/​routes/​api/​repositories/​prototypes/​show/​get/​index.db.test.ts Covers persistence, concurrency, rollback, and session checks.
hub/​server/​routes/​api/​product/​types.ts Adds the introduction-aware detail dependency.
hub/​server/​routes/​api/​product/​create-product-route-dependencies/​index.ts Wires transactional reads, authority checks, and introduction recording.
hub/​server/​repositories/​prototypes/​lock-visible-prototype/​index.ts Locks repository and prototype visibility during recording.
hub/​server/​repositories/​prototype-introductions/​record-prototype-introduction/​index.ts Inserts introductions while skipping duplicates.
hub/​server/​domains/​prototypes/​read-prototype-with-introduction/​index.ts Coordinates authenticated detail preparation and introduction recording.
hub/​schema/​user.prisma Adds the user’s introduction relation.
hub/​schema/​prototype.prisma Adds the prototype’s introduction relation.
hub/​schema/​prototype-introduction.prisma Defines introduction records and uniqueness constraints.
hub/​schema/​migrations/​20261201140000_prototype_introductions/​migration.sql Creates the introduction table, indexes, and foreign keys.
hub/​docs/​frontend.md Documents first-visit dialog behavior and exclusions.
hub/​docs/​database.md Documents transactional recording and delivery limits.
hub/​docs/​authentication.md Documents view locking and session rechecks.

Review effort: Balanced (dynamic)

@nshki
nshki marked this pull request as ready for review November 16, 2026 15:35
@nshki
nshki requested a review from a team as a code owner November 16, 2026 15:35
@nshki
nshki merged commit 8a20ae2 into build/hub/new Nov 16, 2026
51 checks passed
@nshki
nshki deleted the nshki/feat/hub/prototype-introductions 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