Conversation
PR SummaryLow Risk Overview
Coverage includes route response shape, error codes, OpenAPI schema, and assertions that the detail query is public-only and includes both member arrays. Reviewed by Cursor Bugbot for commit e44d90d. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The endpoint fixture uses values that violate its documented UUID contract, leaving that contract inadequately tested.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds the public collection-detail endpoint with database lookup, response schemas, and integration coverage.
Changes:
- Adds
GET /v1-alpha/collections/{slug}. - Fetches collection metadata and membership lists atomically.
- Covers success, 404, 503, SQL, and OpenAPI behavior.
| File | Description |
|---|---|
api/src/lib/collections-db.ts |
Adds the collection-detail query. |
api/src/versions/v1-alpha/collections/collection.ts |
Defines the route and response schema. |
api/tests/collections-db.test.ts |
Tests query construction and missing collections. |
api/tests/collections-collection.test.ts |
Tests endpoint behavior and documentation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
gaspergrom
left a comment
There was a problem hiding this comment.
Checked the detail query against the shared visibility and membership fragments. The slug filter, the soft-delete checks and the member lists all line up with the list endpoint. LGTM.
Signed-off-by: anilb <epipav@gmail.com>
Signed-off-by: anilb <epipav@gmail.com>

Summary
Adds
GET /v1-alpha/collections/{slug}(IN-1405, epic IN-1146), stacked on #2337. It returns one public collection with the sharedCollectionfields plus itsprojectIdsandrepositoryUrls.findCollectionDetailinsrc/lib/collections-db.tsreads the collection row and both member lists in one statement, reusing the shared visibility and membership fragments, so the three always agree.Tests
tests/collections-collection.test.ts: response shape, 404, 503 and the OpenAPI entry.tests/collections-db.test.ts: the detail query's visibility predicate and its null result.main