(() => {});
+ if (answer === "refused")
+ return Response.json(
+ { code: "permission_denied", message: "not a member" },
+ { status: 403 },
+ );
+ return Response.json({
+ members: [
+ { orgId: ORG, userId: VIEWER, userEmail: "jane.doe@example.com" },
+ { orgId: ORG, userId: MEMBER, userEmail: "john.roe@example.com" },
+ ],
+ });
+ },
+ }));
+ return (
+
+
+ -
+ Viewer:
+
+ -
+ Member:
+
+ -
+ Outside the organization:
+
+
+
+
+ );
+}
+
+function DirectoryStatus() {
+ const directory = usePrincipalDirectory();
+ return (
+
+ Directory:{" "}
+ {directory.status === "refused" || directory.status === "failed"
+ ? `${directory.status} (${directory.reason})`
+ : directory.status}
+
+ );
+}
+
+/** The directory answered: "You", a member's label, and an unknown id shortened. */
+export const Named = { render: () => };
+/** The read is in flight: every id but the viewer's is shortened, with the full id in its title. */
+export const Loading = { render: () => };
+/** The viewer may not read the directory: said once, every other id shortened. */
+export const Refused = { render: () => };
diff --git a/module/services/frontend/code/ui-inventory.json b/module/services/frontend/code/ui-inventory.json
index 157a60831..47b33693f 100644
--- a/module/services/frontend/code/ui-inventory.json
+++ b/module/services/frontend/code/ui-inventory.json
@@ -1488,6 +1488,36 @@
"coverage": "owner stories; browser/skin verification pending",
"remaining": "Verify explorer rendering, interactive accessibility and visual baselines under external skins."
},
+ {
+ "source": "packages/saas-ui/src/solution/principal-names.tsx",
+ "imports": [
+ "@codefly-dev/saas-sdk",
+ "@connectrpc/connect",
+ "react",
+ "./binding.js",
+ "./transport.js",
+ "./viewer.js"
+ ],
+ "owner": "@codefly-dev/saas-ui",
+ "disposition": "already canonical",
+ "reason": "Who did something, named from the viewer's own organization directory: one read per page, kept per viewer, so a solution or module kit showing a principal does not list the directory itself or show a bare id.",
+ "stories": [
+ {
+ "file": "packages/saas-ui/stories/principal-names.stories.tsx",
+ "export": "Named"
+ },
+ {
+ "file": "packages/saas-ui/stories/principal-names.stories.tsx",
+ "export": "Loading"
+ },
+ {
+ "file": "packages/saas-ui/stories/principal-names.stories.tsx",
+ "export": "Refused"
+ }
+ ],
+ "coverage": "owner stories; browser/skin verification pending",
+ "remaining": "Verify explorer rendering, interactive accessibility and visual baselines under external skins."
+ },
{
"source": "src/app/(auth)/auth/callback/page.tsx",
"imports": [