feat: multi-team support with team-scoped resources and setup flow#18
Open
Jacxk wants to merge 12 commits into
Open
feat: multi-team support with team-scoped resources and setup flow#18Jacxk wants to merge 12 commits into
Jacxk wants to merge 12 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| } | ||
| }), | ||
| ); | ||
| const validProjects = projectsWithTeam.filter((p) => p !== null); |
There was a problem hiding this comment.
Blocking N+1 queries cause slow project list loading
High Severity
The getProjects function now uses await Promise.all() to fetch each project individually via getProject(), blocking until all N requests complete. Previously, prefetchQuery initiated background fetches without blocking the list return. This N+1 query pattern causes the project list to load significantly slower as the number of projects increases.
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 team selection and filter all Coolify resources by the selected team.
Team selection
/setup/team; users must pick a team before entering the app.TEAM_STORAGE_KEY).Team-scoped data
filterResourceByTeam/filterResourcesByTeaminlib/utils.ts.nullwhen the resource is not in the selected team.Other
lib/storage.ts:getCurrentTeam()helper./setup/teamwhen no team is selected.Note
Medium Risk
Changes core data-fetching semantics across many resource types and introduces
nullreturns for single-resource queries, which can break screens that assume data is always present; also adds a new required setup step affecting navigation/boot flow.Overview
Adds multi-team support by introducing a persisted current team selection and enforcing team-scoped data throughout the app.
A new
/setup/teamstep is inserted into the setup flow and the root redirect now blocks entry to/mainuntil a team is chosen; Settings gains a team selector to switch teams later (stored in AsyncStorage viaTEAM_STORAGE_KEY).All major resource fetchers (applications, databases, services, servers, projects, private keys, and aggregated resources) now filter lists and single-item queries by the selected team using new
filterResourceByTeam/filterResourcesByTeamhelpers, which can cause single-resource queries/hooks to returnnullwhen the resource is out-of-team; some optimistic update handlers were tightened to avoid invalidation/context issues.Written by Cursor Bugbot for commit 8afb67b. This will update automatically on new commits. Configure here.