Add workspace-admin remove-from-workspace row action to the Teams page - #13
Open
warp-agent-staging[bot] wants to merge 1 commit into
Open
warp-agent-staging[bot] wants to merge 1 commit into
warp-agent-staging[bot] wants to merge 1 commit into
Conversation
Workspace administrators on native workspaces get a Remove-from-workspace action on member rows (except their own row and the workspace owner's row); it calls the server's existing removeUserFromWorkspace mutation with the TeamSettings entrypoint. Team-only admins never see it, and non-native workspaces show no new action, so no duplicate remove actions appear. Remove-from-team on a native workspace now uses member-personalized copy with no reload-credits warning; legacy workspaces keep the existing billing warning.
Author
warp-agent-staging
Bot
changed the base branch from
master
to
base/pinned-checkout
September 16, 2026 23:02
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.


Description
Adds a Remove from workspace row action for workspace administrators on the Teams page (
TeamsPageView::team_to_item_list). On a native workspace, the action removes the member from the workspace and all of its teams via the server's existingremoveUserFromWorkspacemutation, called withentrypoint: TeamSettingsto match remove-from-team. No new backend operation.The action appears on a member row only when all of these hold (identical gating matrix on both surfaces of the paired feature):
Consequences pinned by tests: a team-only administrator (team admin with no workspace-admin role) never sees it — the gating reads
workspace.is_workspace_admindirectly rather than thehas_admin_permissionshelper, which is true for team admins too; on a non-native workspace the action is absent entirely, so no duplicate remove actions appear; and the existing team-owner protection on Remove from team is unchanged.Confirmation copy (member email and workspace name interpolated):
Remove from workspace?, confirm buttonRemove from workspace: "Are you sure you want to remove {email} from the workspace? This will remove {email} from all teams in {workspaceName} and from the workspace itself."Remove from team?, confirm buttonRemove from team: "Are you sure you want to remove {email} from this team? {email} will still keep their {workspaceName} workspace membership and their other team memberships." No reload-credit copy.New dialog variants (
RemoveUserFromWorkspace,RemoveUserFromNativeWorkspaceTeam) follow theLeaveNativeWorkspaceTeamprecedent inCloudActionConfirmationDialog.WorkspaceMembersSettingsis untouched.Linked Issue
No linked issue; this is a factory task paired with the same feature on the web admin Teams page in warp-server.
Based on the pinned checkout, so the base branch is
base/pinned-checkout(the mirror'smasterpredates the pin and would show ~93 files of unrelated history).Testing
./script/run— not applicable: this task explicitly declined computer interaction; verification is by automated tests and builds below.New focused tests:
teams_page_tests.rs: gating matrix via the existingteam_to_item_listtable — workspace admin gets the action, team-only admin does not, workspace owner's row is protected, non-native workspace shows no workspace action (existing tests updated for the new action in native cases), plus the viewer's-own-row rule already covered.cloud_action_confirmation_dialog_tests.rs: exact title/body/button for both new variants.user_workspaces_tests.rs:remove_user_from_workspaceforwardsuser_uid,workspace_uid, andCloudObjectEventEntrypoint::TeamSettingsto the workspace client (mockallwithf) and emitsRemoveUserFromWorkspaceSuccess.Commands run and results:
cargo check -p warp_graphql— pass (also validates the new cynic mutation against the updated schema snapshot)cargo check -p warp --tests— passcargo nextest run -p warp -E 'test(teams_page) or test(cloud_action_confirmation_dialog) or test(remove_user_from_workspace)'— 36 run, 36 passed./script/format— runcargo clippy -p warp_graphql -p warp --tests -- -D warnings— passScreenshots / Videos
None; computer interaction was declined for this task.
Agent Mode