From eab9e18ea70d4df3ce29b1f63c3937a70a34a497 Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Mon, 2 Nov 2026 02:48:11 -0800 Subject: [PATCH] fix: the navigator names the operating user's own grants Co-Authored-By: Claude Opus 5.5 --- frontend/src/lib/components/access/GrantNavigator.svelte | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/access/GrantNavigator.svelte b/frontend/src/lib/components/access/GrantNavigator.svelte index 9e696e5634..d18c3967d1 100644 --- a/frontend/src/lib/components/access/GrantNavigator.svelte +++ b/frontend/src/lib/components/access/GrantNavigator.svelte @@ -20,8 +20,10 @@ Picking a row grants the principal read on it; the "All of f/x" row grants the w type BrowseAccessItemsResponse, type PrincipalAccess } from '$lib/gen' - import { userStore } from '$lib/stores' - import { useOperatingWorkspace } from '$lib/components/operatingWorkspace.svelte' + import { + useOperatingUser, + useOperatingWorkspace + } from '$lib/components/operatingWorkspace.svelte' import { sendUserToast } from '$lib/toast' import { debounce } from '$lib/utils' import { Folder, ScanSearch, User, Users } from 'lucide-svelte' @@ -29,6 +31,7 @@ Picking a row grants the principal read on it; the "All of f/x" row grants the w import type { RunnableKind } from './detectNeeds' const operatingWorkspace = useOperatingWorkspace() + const operatingUser = useOperatingUser() type Row = BrowseAccessItemsResponse['items'][number] /** `kind` `folder` is the "All of f/x" row, its `path` the folder name. */ @@ -46,7 +49,7 @@ Picking a row grants the principal read on it; the "All of f/x" row grants the w onFindReads: (kind: RunnableKind, path: string) => void } = $props() - const own = $derived(`u/${$userStore?.username}`) + const own = $derived(`u/${operatingUser.current?.username}`) let folders: BrowseAccessFoldersResponse | undefined = $state() /** Rows by top-level branch (`u/alice`, `f/billing`), then by `kind:path`. */