Implement ?group_by_collection query parameter for user projects#465
Open
cycomachead wants to merge 1 commit into
Open
Implement ?group_by_collection query parameter for user projects#465cycomachead wants to merge 1 commit into
cycomachead wants to merge 1 commit into
Conversation
Added a new `group_by_collection` parameter to the projects endpoint that returns a structured response of collections and their associated projects. - Groups projects into collections where the user is a creator or editor. - Lists projects multiple times if they belong to multiple user collections. - Returns projects not in any user collection in a top-level array. - Preserves existing ordering logic for both collections and projects. - Updates API documentation to reflect the new response format. Co-authored-by: Claude Code <noreply@anthropic.com>
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.
Add
?group_by_collectionquery parameter for user projectsImplements a new
group_by_collectionquery parameter onGET /projectsthat returns the current user's projects organized into folder-like groups by collection, enabling downstream "folder" views.Changes
my_projects_groupedaction (controllers/project.lua): When?group_by_collectionis set, returns a structured response:{ "collections": [{ "id": ..., "name": ..., "projects": [...] }, ...], "projects": [...] }collectionsincludes only collections where the current user is a creator or editorprojectsholds projects not in any of the user's collections, ordered bylastupdated DESCupdated_at DESC; projects within a collection ordered by membershipcreated_at DESC?group_by_collectioncontinue to use the existing paginated list responsestatic/API) to document the new parameter and response shapeReviewer Notes
GET /api/v1/projects(logged-in user's own projects only). Applying this to/projects/:usernamehas ambiguous semantics and is left for a follow-up if needed.Superconductor Ticket Implementation | App Preview | Guided Review