Groups page project column#8883
Conversation
- Created GroupProjectsCell.svelte component to display projects that a group has access to - The component fetches projects on dropdown open and shows a list of accessible projects - Updated OrgGroupsTable.svelte to include the new Projects column - Updated groups page to pass organization prop to the table Resolves APP-761 Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
…rojectsCell - Updated to load projects on mount instead of on dropdown open - Shows 'Loading...' state while fetching - Matches the behavior pattern of UserProjectsCell more closely Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
… groups - Fixed race condition in collecting project access results - Added 'Add Project' dropdown to allow adding groups to projects - Shows a '+' button to add group to available projects - Uses ProjectUserRoles.Viewer as default role when adding - Invalidates queries and refreshes data after adding Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
- Added project access multi-select dropdown to CreateUserGroupDialog - Added access level dropdown to select role when adding group to projects - Added same project management features to EditUserGroupDialog - Simplified GroupProjectsCell to only display projects (removed add button) - Uses same workflow as 'Add Guest' modal with multi-select and role selection Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
- CreateUserGroupDialog: Reorder fields to Name, Project Access, Access Level, Users - CreateUserGroupDialog: Always show Access Level field - CreateUserGroupDialog: Show role in project dropdown items when selected - EditUserGroupDialog: Remove project access fields (only for creation stage) - Clean up unused imports in EditUserGroupDialog Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
- Removed role display from project dropdown in CreateUserGroupDialog - Added role display to each project item in GroupProjectsCell table dropdown - Role is shown as 'Viewer', 'Editor', 'Admin' next to project name Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
- Removed unused 'error' variable from GroupProjectsCell - Applied prettier formatting Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
- Fix form not resetting when closing CreateUserGroupDialog by using superForm's reset() function - Fix project links using wrong URL (/-/share instead of /-/dashboards?share=true) - Open project links in new tab with target=_blank Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
…available Guard interval construction and time-field conversion against undefined start/end and null data values; remove the "Invalid Interval" fallback text in RangeDisplay and hide the full-range block when the interval is invalid. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ew is unavailable" This reverts commit c02eb5ea9fa080a8d913bd929e4eb14044c9b6c2.
|
nice. idk about best practices about opening modals and then the URL changing once its opened but ill let Aditya comment on it from a front-end POV. other than that looks good! |
royendo
left a comment
There was a problem hiding this comment.
LGTM, leaving for Aditya to do final code review and front end best practices
| if (selectedProjects.length === 0) return; | ||
|
|
||
| try { | ||
| await Promise.all( |
There was a problem hiding this comment.
We are adding all users in serial vs here where we are adding in parallel. We should do this in serial as well to keep things consistent. Also add a TODO to make sure we handle partial updates like group is created but only one project got added.
|
|
||
| try { | ||
| const projectsResponse = | ||
| await adminServiceListProjectsForOrganization(organization); |
There was a problem hiding this comment.
We should use a tanstack query. This direct call will not cache the results.
| allProjects.map(async (project) => { | ||
| try { | ||
| const usergroupsResponse = | ||
| await adminServiceListProjectMemberUsergroups( |
| await adminServiceListProjectsForOrganization(organization); | ||
| const allProjects = projectsResponse.projects ?? []; | ||
|
|
||
| const projectAccessResults = await Promise.all( |
There was a problem hiding this comment.
Is this really the best way to get projects? We should add a new API that fetches all projects accessible by the user group.
| } | ||
|
|
||
| onMount(() => { | ||
| void loadProjectsForGroup(); |
There was a problem hiding this comment.
UserProjectCell fetches the data only when the dropdown is open. The count is fetched with the list of groups.
Extends EditUserGroupDialog to support editing project access alongside member management. Projects can now be added, removed, and have their roles changed inline after group creation, closing the gap between the create and edit flows. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…in Edit Group dialog Replace Combobox with custom inline search inputs that sit inside the bordered card, matching the mock. Dropdown results render above the input (bottom-anchored) and appear immediately on focus without requiring search text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Change project and member search dropdowns from bottom-full to top-full so they open downward instead of upward - Show member dropdown immediately on focus with loading/results/empty states rather than waiting for filteredMemberOptions to populate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove `enabled: open` so TanStack Query fetches the member list as soon as the component mounts rather than waiting for the dialog to open. TanStack Query deduplicates the request across all dialog instances. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Svelte 4 marks reactive variables dirty on every assignment, even when the value hasn't changed. The debounce timer was firing on mount and re-assigning debouncedMemberSearch = "" (same value), which re-created the TanStack Query observer mid-fetch and reset isLoading to true. Fix by dropping the server-side search param entirely: load up to 100 org members once with a stable query key, then filter client-side using the search input. This gives instant filtering and avoids the loading state resetting on each keystroke. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… in group dialogs - Replace <select> in Edit Group dialog project list with DropdownMenu matching the Project Share popover style (borderless trigger, role descriptions, active state highlighting) - Update Access level dropdown in Create Group dialog to match the same borderless style - Add "No more projects found" empty state to Edit Group project search dropdown - Change "No members found" to "No more members found" in Edit Group member search Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… Group dialog Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…le selector Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… dropdown widths - Add min-w to Edit dialog per-project role trigger so it's not squished - Add w-full to Create dialog Access level dropdown content to match Project access width Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d width Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove w-full from Create dialog triggers so they size to content - Revert Edit dialog role trigger to auto-width; widen the dropdown content instead Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…fter adding an item mousedown|preventDefault keeps the input focused after selection, so manually setting *Focused=false left the input focused but the dropdown closed with no way to reopen it via click. Remove the manual flag reset so focus state stays consistent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…; add stress-test seed script - Blur the search input after adding a member or project so the dropdown closes naturally and the user can re-click to open it again - Add scripts/seed-stress-test.sql to populate 25 fake users + 25 projects into a local dev org for UI stress testing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Change applyProjectAccess from parallel to serial execution for consistency - Add TODO for handling partial updates during group creation - Refactor GroupProjectsCell to use Tanstack Query (queryClient.fetchQuery) for caching - Only fetch project data when dropdown is opened (matching UserProjectsCell pattern) Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
Replace hard-coded colors with theme variables for dark mode support: - bg-white -> bg-surface-background - border-gray-200/100 -> border-border - bg-gray-50 -> bg-surface-subtle - text-gray-400 -> text-fg-muted - hover:bg-gray-50 -> hover:bg-surface-hover - hover:text-red-500 -> hover:text-destructive - hover:bg-red-50 -> hover:bg-destructive-foreground Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
- Update to Svelte 5 syntax (on:click -> onclick, on:focus -> onfocus, etc.) - Use renderComponent instead of flexRender for tanstack-table-8-svelte-5 - Remove deprecated closeOnItemClick prop from Dropdown.Root - Update DialogTrigger to use snippet syntax - Keep theme-aware CSS variables for dark mode support Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>




Adds a "Projects" column to the Groups management page, displaying the number of projects each group has access to and a dropdown to view them.
This change aligns the Groups management page with the guest page's project display, dynamically fetching project access information for groups as there's no pre-calculated
projectsCountfield available.Also updates the Edit and Create Group dialogs:
<select>role picker in the Edit dialog's project list with a borderlessDropdownMenumatching the Project Share popover style (role descriptions, active state highlighting)Closes APP-761
Checklist:
Developed in collaboration with Claude Code