Skip to content

Groups page project column#8883

Open
ericokuma wants to merge 28 commits into
mainfrom
cursor/APP-761-groups-page-project-column-593a
Open

Groups page project column#8883
ericokuma wants to merge 28 commits into
mainfrom
cursor/APP-761-groups-page-project-column-593a

Conversation

@ericokuma

@ericokuma ericokuma commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

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 projectsCount field available.

Also updates the Edit and Create Group dialogs:

  • Replaces the bordered <select> role picker in the Edit dialog's project list with a borderless DropdownMenu matching the Project Share popover style (role descriptions, active state highlighting)
  • Updates the Create dialog's Access level dropdown items to show role descriptions
  • Shows "No more projects found" / "No more members found" empty states in the Edit dialog search dropdowns

Closes APP-761

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

cursoragent and others added 2 commits February 18, 2026 23:08
- 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

cursor Bot commented Feb 18, 2026

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

cursoragent and others added 5 commits February 18, 2026 23:52
… 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>
@ericokuma ericokuma marked this pull request as ready for review February 23, 2026 17:46
Co-authored-by: ericokuma <ericokuma@users.noreply.github.com>
@ericokuma ericokuma requested a review from royendo February 23, 2026 18:03
@royendo

royendo commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

some feedback, might not all be addressable here
loom.com/share/bf1e30be82854ea8b504c720a6eefdc9?from_recorder=1&focus_title=1

  1. the form doesnt clear when closing and re-opening. youll see that I open to an error instead of placeholder
Screenshot 2026-02-23 at 12 58 21
  1. When added a new group, it requires a refresh, 1 group to 2 groups
  2. Clicking link naviagtes to me a 404, raaaa/dev-project/-/share
Screenshot 2026-02-23 at 12 56 47
  1. On the note above, not sure we need a nav to project here.

@royendo royendo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

cursoragent and others added 3 commits February 23, 2026 21:17
- 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.
@ericokuma

Copy link
Copy Markdown
Contributor Author

Addressed #1, 3, 4 (I made a re-direct in a new browser tab). Couldn't replicate #2

@ericokuma ericokuma requested a review from royendo February 23, 2026 21:25
@royendo

royendo commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

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 royendo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, leaving for Aditya to do final code review and front end best practices

@AdityaHegde AdityaHegde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Font sizes between text values like project-only and dropdown items seems different.
Screenshot 2026-02-24 at 4 39 43 PM
  1. How do we edit a group to add/remove projects?
  2. What about org level groups? These show up as no projects This feels incorrect.

if (selectedProjects.length === 0) return;

try {
await Promise.all(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a tanstack query. This direct call will not cache the results.

allProjects.map(async (project) => {
try {
const usergroupsResponse =
await adminServiceListProjectMemberUsergroups(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

await adminServiceListProjectsForOrganization(organization);
const allProjects = projectsResponse.projects ?? [];

const projectAccessResults = await Promise.all(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the best way to get projects? We should add a new API that fetches all projects accessible by the user group.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@begelundmuller, another one here!

}

onMount(() => {
void loadProjectsForGroup();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UserProjectCell fetches the data only when the dropdown is open. The count is fetched with the list of groups.

ericokuma and others added 7 commits February 24, 2026 10:54
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>
ericokuma and others added 7 commits February 24, 2026 15:06
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>
@ericokuma ericokuma requested a review from royendo February 24, 2026 23:13
- 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>

@royendo royendo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use themeing for CSS, edit page shows white selectors

Image

cursoragent and others added 2 commits March 28, 2026 00:19
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>
@royendo royendo self-requested a review April 6, 2026 17:04

@royendo royendo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants