feat(ui:files): ensure conext menu is build on click + stick action bar & breadcrumb

ensure conext menu is build on click: API call to determine if user has access to item's parent folder is done only if user request context menu
    (lazy API call)
This commit is contained in:
Edouard Vanbelle
2026-07-20 19:01:56 +02:00
parent 4f3309e087
commit c6b856bfc7
4 changed files with 74 additions and 50 deletions
-19
View File
@@ -75,22 +75,3 @@ export async function probeFolderAccess(id: string): Promise<boolean> {
return p;
}
/**
* Bulk pre-warm. Deduplicates the input and skips ids already in the
* cache or in flight, then fires background probes for the rest. Does
* not await — the promises populate the cache asynchronously.
*
* Used by list surfaces (/recent, /favorites, /shared-with-me) that
* want to gate a per-row "Open parent folder" affordance on whether
* the caller can actually navigate there. Calling this on every
* `load()` (initial + infinite-scroll page) is cheap: probes for
* already-known ids no-op.
*/
export function warmFolderAccess(ids: Iterable<string | null | undefined>): void {
const seen = new Set<string>();
for (const id of ids) {
if (!id || seen.has(id) || cache.has(id) || inflight.has(id)) continue;
seen.add(id);
void probeFolderAccess(id);
}
}