Repository navigation
Add the member visibility switch, notes and docs to the dashboard - #1668
Merged
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Last step of "member visibility" (after #1664, #1665, #1666 and #1667). It adds the switch to the dashboard, the notes and empty states a restricted member sees, and the docs.
An admin can now set a workspace to Restricted under Settings → Organization → Security → Member visibility. A member who is not an admin then sees a note on Logs and Analytics, no "by user" panel, and an empty state on Connectors and MCP Servers when nothing is shared with them. They are never sent into the setup wizard.
The default stays Open. While the setting loads, when signed out and on error, the dashboard behaves as Open, so nothing changes by accident. Merge this after #1667, so the switch is the last piece to land.
Changes
lib/use-member-visibility.ts: new hook modelled onuse-edition.ts. It loadsGET /api/settings/member-visibilityonce per session and workspace (the key holds the token and the workspace id, so a workspace switch loads again). It reports{ mode: 'open', restrictedForMe: false }while loading, signed out or on error, plus aloadedflag. API clientmemberVisibility.get/setinlib/api.tsnext to the other settings calls.PUT /api/admin/settings/member-visibility, and a success or error message. When Restricted is chosen and no role of the workspace has a tool list (read fromGET /api/roles,_count.toolAccesson non-system roles), a warning links to Settings → Roles.components/onboarding-redirect.tsx: no redirect to/welcomewhenrestrictedForMeis true. For a member who is not an admin, the check waits until the setting has loaded, so a restricted member is never sent there for a moment either. Admins are evaluated as before.en.json,de.json(formal "Sie") andit.json.docs/operations/member-visibility.md(what each mode shows per area, set-up with roles and SSO group mapping, the 30 second propagation, what stays visible, VIEWERs cannot create servers,amcp apicalls, Cloud and self-hosted). Linked fromdocs/sso.md(role mapping section),docs/api-reference.md(Roles & Access Control) anddocs/operations/README.md. NewDESCRIPTIONSline inscripts/generate-llms-txt.mjs,llms.txtandllms-full.txtregenerated.Cloud and self-hosted: identical, in every edition, off by default.
Type
Testing
New Playwright spec
tests/e2e/member-visibility.spec.ts(9 tests, API mocked like the other smoke tests): an admin sees the control, gets the warning without a tool list, saves Restricted (one PUT with{ "mode": "restricted" }); no warning when a role has a tool list; a member does not see the control; a restricted member sees the Logs note, the Analytics note without the "by user" panel, the empty states on Connectors and MCP Servers without create buttons, and is not sent to/welcomeeven with the setting answering 1.5 s late; an open workspace shows none of it and a new member is still sent to/welcome. I checked that removing the "wait while loading" guard makes the/welcometest fail.Commands, in the worktree on
origin/mainc7667b3:packages/frontend:npm run test:e2e(ownnext devon port 3100): 400 passed.packages/frontend:npx eslint <changed files>: 0 errors. 6 warnings, all on lines this PR does not touch (logs, analytics, organization pages).packages/frontend:npx tsc --noEmit -p tsconfig.json: pass.node scripts/generate-llms-txt.mjs --check: pass.node --test scripts/generate-llms-txt.test.mjs: 15 passed.node scripts/generate-cli-operations.mjs --check: up to date (213 operations).Not tested against a real backend: the frontend reads the response shape of #1664 and the list behaviour of #1666 and #1667.
Checklist
npm test) (frontend has nonpm test; Playwright suite above)Related Issues
Relates to #1664, #1665, #1666, #1667.