From abb4e007468c1e9ca4cb8eca1c4b8f90e233ebca Mon Sep 17 00:00:00 2001 From: Shreyash Agare Date: Thu, 24 Sep 2026 20:37:44 +0530 Subject: [PATCH] :bug: Show loader instead of empty state while libraries load (#11594) The libraries dashboard rendered the "no shared libraries" placeholder while the shared files request was still in flight. On a slow connection this told the user their team had no libraries when it did. The page derived its file list eagerly, so an absent :shared-files entry in the state and a fetched-but-empty result both collapsed to an empty sequence. The grid could not tell the two apart. Keep the derived list nil until :shared-files is present. The grid already renders the pencil loader for a nil file list, so the loading and empty states now read differently. Closes #11452 AI-assisted-by: claude-opus-5 Claude-Session: https://claude.ai/code/session_01DB3Jtt1LJvp1vW9tA9DRGY Signed-off-by: Shreyash Agare Co-authored-by: Shreyash Agare Co-authored-by: Claude Opus 5 (1M context) --- frontend/src/app/main/ui/dashboard/libraries.cljs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/ui/dashboard/libraries.cljs b/frontend/src/app/main/ui/dashboard/libraries.cljs index f0cace6e57..335d6ce621 100644 --- a/frontend/src/app/main/ui/dashboard/libraries.cljs +++ b/frontend/src/app/main/ui/dashboard/libraries.cljs @@ -37,12 +37,15 @@ can-edit (-> team :permissions :can-edit) + ;; Keep nil until the shared files are fetched, so the grid can + ;; tell "still loading" apart from "there are no libraries". files (mf/with-memo [files team-id] - (->> (vals files) - (filter #(= team-id (:team-id %))) - (sort-by :modified-at) - (reverse))) + (when (some? files) + (->> (vals files) + (filter #(= team-id (:team-id %))) + (sort-by :modified-at) + (reverse)))) selected-files (mf/deref ref:selected-files)