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
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
marked this pull request as ready for review
November 16, 2026 15:35
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 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.