🐛 Fix several corner cases that causes race conditions on workspace and dashboard loading

* 🐛 Fix several race conditions on workspace and dashboard code

It also fixes a corner case that happens when penpot workspace
is loaded in a background tab on firefox.

* 🐛 Add missing team-id prop to several file returning endpoints
This commit is contained in:
Andrey Antukh 2025-03-14 09:55:41 +01:00 committed by GitHub
parent 61800d8945
commit 05d6d2fcd4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 138 additions and 125 deletions

View file

@ -323,6 +323,7 @@
file (-> (get-file cfg id :project-id project-id)
(assoc :permissions perms)
(assoc :team-id (:id team))
(check-version!))]
(-> (cfeat/get-team-enabled-features cf/flags team)
@ -613,6 +614,7 @@
SELECT l.id,
l.features,
l.project_id,
p.team_id,
l.created_at,
l.modified_at,
l.deleted_at,
@ -622,6 +624,7 @@
l.synced_at,
l.is_shared
FROM libs AS l
INNER JOIN project AS p ON (p.id = l.project_id)
WHERE l.deleted_at IS NULL OR l.deleted_at > now();")
(defn get-file-libraries