Skip to content

refactor(ui): Improve Teams page as per design - #194

Merged
prathameshkurunkar7 merged 10 commits into
developfrom
fix-ui
Aug 4, 2026
Merged

refactor(ui): Improve Teams page as per design#194
prathameshkurunkar7 merged 10 commits into
developfrom
fix-ui

Conversation

@siduck

@siduck siduck commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Teams page

image image

Manage roles dialog

simplescreenrecorder-2026-07-26_20.01.17.mp4

Better cell component syntax

  • Cells which have more than text i.e badges and a lil complex layout are hard to make with the h() function alone
  • So use slots instead and define component in the markup itself

Before

image

After

image

@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Safe to merge. The backend is well-guarded (duplicate-grant validation, Owner-protection checks, status preserved on full-replace) and the new tests cover the added paths.

The multi-role model is consistently handled end-to-end: the migration backfills existing rows, the uniqueness validator was updated, _validate_sensitive_member_changes correctly compares frozensets of the new grant tuples, and the frontend mirrors the same semantics. No data-loss or permission-bypass paths were found.

Files Needing Attention: No files require special attention.

Reviews (8): Last reviewed commit: "Merge remote-tracking branch 'origin/dev..." | Re-trigger Greptile

Comment thread dashboard/src/components/team/RolesPanel.vue
Comment thread dashboard/src/pages/team/AccessPage.vue
siduck added 2 commits July 25, 2026 07:50
Team Member now supports several (role, resource) grants per user instead
of one team-wide role, so a member can e.g. hold Billing on All Servers
plus Admin on a specific server. resource_type/resource_name are stored
and surfaced but not yet enforced per-resource (can() stays team-wide).

- Team Member gains resource_type/resource_name fields, backfilled via patch
- Team.set_member_role -> set_member_roles (full-replace), status/removal
  now loop every row a user holds instead of assuming exactly one
- central.iam needed no changes: resolve_user_grants already unions
  capabilities across every role a user holds in a team
- list_team_members groups rows into a roles[] array per user
Comment thread dashboard/src/components/team/RolesPanel.vue
Comment on lines 18 to +32
if (!props.canManage || props.member.is_owner) return []

const items: DropdownOptions = []
if (assignableRoles.value.length) {
items.push({
group: 'Change role',
options: assignableRoles.value.map((role) => ({
label: role.role_name,
onClick: () => emit('setRole', props.member.user, role.name),
})),
})
}

items.push({
group: 'Membership',
options: [
{
label: props.member.status === 'Active' ? 'Suspend' : 'Reactivate',
icon:
props.member.status === 'Active'
? 'lucide-circle-pause'
: 'lucide-circle-play',
onClick: () =>
emit(
'setStatus',
props.member.user,
props.member.status === 'Active' ? 'Suspended' : 'Active',
),
},
{
label: 'Remove',
icon: 'lucide-user-x',
theme: 'red',
onClick: () => emit('remove', props.member.user),
},
],
})
return items
return [
{
label: 'Manage roles',
icon: 'lucide-shield',
onClick: () => emit('manageRoles', props.member),
},
{
label: 'Remove from team',
icon: 'lucide-user-x',
theme: 'red',
onClick: () => emit('removeRequested', props.member),
},
]

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.

P1 Suspend/reactivate dropped from the UI

The refactor removed the "Suspend" / "Reactivate" menu items — setStatus still exists in useTeamMembers but nothing in the new UI calls it. MembersPanel still renders the "Suspended" badge, so the status is visible but now unchangeable via the UI.

@siduck
siduck force-pushed the fix-ui branch 2 times, most recently from 0c37d2d to 59721c1 Compare July 28, 2026 10:47
@prathameshkurunkar7
prathameshkurunkar7 merged commit 0ff5a31 into develop Aug 4, 2026
1 of 3 checks passed
@siduck
siduck deleted the fix-ui branch August 4, 2026 07:39
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.

2 participants