fix(ui): hide roles from workspace switcher

This commit is contained in:
dadachann
2026-07-26 00:07:44 +08:00
parent 741c20af07
commit baf7e86335
2 changed files with 2 additions and 3 deletions
@@ -71,9 +71,6 @@ export default function WorkspaceSwitcher({
{entry.plan_name || t('workspace.planUnavailable')} {entry.plan_name || t('workspace.planUnavailable')}
</span> </span>
)} )}
<span className="text-xs text-muted-foreground">
{t(`workspace.roles.${entry.membership.role}`)}
</span>
{selected && <Check className="size-4" />} {selected && <Check className="size-4" />}
{selected && ( {selected && (
<Button <Button
@@ -77,6 +77,8 @@ test('keeps workspace plan and settings controls on the workspace row', () => {
assert.match(workspaceSwitcherSource, /className="size-8"/); assert.match(workspaceSwitcherSource, /className="size-8"/);
assert.doesNotMatch(workspaceSwitcherSource, /workspace\.currentPlan/); assert.doesNotMatch(workspaceSwitcherSource, /workspace\.currentPlan/);
assert.doesNotMatch(workspaceSwitcherSource, /workspace\.upgradePlan/); assert.doesNotMatch(workspaceSwitcherSource, /workspace\.upgradePlan/);
assert.doesNotMatch(workspaceSwitcherSource, /workspace\.roles/);
assert.doesNotMatch(workspaceSwitcherSource, /entry\.membership\.role/);
}); });
test('moves Cloud plan upgrades into Workspace Settings', () => { test('moves Cloud plan upgrades into Workspace Settings', () => {