Skip to content

feat(spc): add user role to members list, remove name - #1041

Open
nbaztec wants to merge 3 commits into
solana-foundation:mainfrom
Moonsong-Labs:nish-member-role
Open

feat(spc): add user role to members list, remove name#1041
nbaztec wants to merge 3 commits into
solana-foundation:mainfrom
Moonsong-Labs:nish-member-role

Conversation

@nbaztec

@nbaztec nbaztec commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
  • Members table now shows each member's project role instead of their editable name
  • Removed the free-form Name column that could go stale when users edited their profile
  • Delete action collapsed to a compact trash icon
  • "Role" column label added to the interface

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

@nbaztec is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@nbaztec
nbaztec marked this pull request as ready for review July 31, 2026 17:20
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces editable member names with project roles in the private-channel members list.

  • Adds a left-joined project role to repository rows and API DTOs while preserving orphaned rows for cleanup.
  • Displays active roles and a revoked-membership warning in the members table.
  • Replaces the text delete action with an accessible trash-icon button.
  • Adds repository and UI coverage for active and revoked project memberships.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sdp-api/src/db/repositories/private-channel-user.repository.postgres.ts Adds an at-most-one project-membership join while preserving private-channel rows after membership removal, resolving the previously reported lookup and cleanup failure.
apps/sdp-api/src/routes/private-channels/handlers/members.ts Maps the newly selected project role into the member response DTO.
packages/sdp-types/src/private-channels.ts Extends the shared member DTO with a nullable per-project role.
apps/sdp-web/src/app/dashboard/payments/private-channels/members/members-table.tsx Replaces the name column with role state and uses an accessible compact delete action.
apps/sdp-api/src/db/repositories/private-channel-user.repository.test.ts Covers role retrieval and continued visibility after project membership removal.
apps/sdp-web/src/app/dashboard/payments/private-channels/members/members-table.unit.test.tsx Covers rendering for active roles and revoked memberships.

Reviews (2): Last reviewed commit: "handle project membership revoke for SPC..." | Re-trigger Greptile

// Invites require project membership, so INNER JOIN is safe.
const USER_JOINS = `
INNER JOIN users u ON u.id = pcu.user_id
INNER JOIN project_members pm ON pm.project_id = pcu.project_id AND pm.user_id = pcu.user_id

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 Project membership hides workspace rows

When an invited user's project membership is removed, the new INNER JOIN makes their persisted private-channel row disappear from list and lookup operations, causing management requests to return 404 and preventing the row from being deleted through the API. The same join in create can fail after the insert and external registration have succeeded when membership is removed during an invitation, leaving partial state that conflicts on retry.

Knowledge Base Used: sdp-api Data Layer

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.

1 participant