From 787c06635762f4228be7ec7ded4fdd612140f64a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 25 Jun 2025 11:23:39 +0200 Subject: [PATCH 1/3] :bug: Remove qualified keyword keys from colors --- common/src/app/common/files/migrations.cljc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/common/src/app/common/files/migrations.cljc b/common/src/app/common/files/migrations.cljc index 11eb0dfed9..aa56dbe65d 100644 --- a/common/src/app/common/files/migrations.cljc +++ b/common/src/app/common/files/migrations.cljc @@ -1468,14 +1468,21 @@ (update :pages-index d/update-vals update-container) (d/update-when :components d/update-vals update-container)))) -(defmethod migrate-data "0008-fix-library-colors-opacity" +(defmethod migrate-data "0008-fix-library-colors" [data _] - (letfn [(update-color [color] + (letfn [(clear-color-opacity [color] (if (and (contains? color :opacity) (nil? (get color :opacity))) (assoc color :opacity 1) - color))] - (d/update-when data :colors d/update-vals update-color))) + color)) + + (clear-color [color] + (-> color + (d/without-nils) + (d/without-qualified) + (clear-color-opacity)))] + + (d/update-when data :colors d/update-vals clear-color))) (def available-migrations (into (d/ordered-set) @@ -1540,4 +1547,4 @@ "0005-deprecate-image-type" "0006-fix-old-texts-fills" "0007-clear-invalid-strokes-and-fills-v2" - "0008-fix-library-colors-opacity"])) + "0008-fix-library-colors"])) From 9e5bc3675c3406da40f5f418984f9e973349a9ac Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 25 Jun 2025 11:41:24 +0200 Subject: [PATCH 2/3] :bug: Remove cider nrepl handler from default nrepl server --- backend/deps.edn | 1 - backend/src/app/main.clj | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/deps.edn b/backend/deps.edn index 187358f09e..aaeb256d10 100644 --- a/backend/deps.edn +++ b/backend/deps.edn @@ -37,7 +37,6 @@ {:mvn/version "1.3.1002"} metosin/reitit-core {:mvn/version "0.9.1"} nrepl/nrepl {:mvn/version "1.3.1"} - cider/cider-nrepl {:mvn/version "0.56.0"} org.postgresql/postgresql {:mvn/version "42.7.6"} org.xerial/sqlite-jdbc {:mvn/version "3.49.1.0"} diff --git a/backend/src/app/main.clj b/backend/src/app/main.clj index d8a742dfb5..c51d85f6ad 100644 --- a/backend/src/app/main.clj +++ b/backend/src/app/main.clj @@ -40,7 +40,6 @@ [app.svgo :as-alias svgo] [app.util.time :as dt] [app.worker :as-alias wrk] - [cider.nrepl :refer [cider-nrepl-handler]] [clojure.test :as test] [clojure.tools.namespace.repl :as repl] [cuerdas.core :as str] @@ -605,7 +604,7 @@ (let [p (promise)] (when (contains? cf/flags :nrepl-server) (l/inf :hint "start nrepl server" :port 6064) - (nrepl/start-server :bind "0.0.0.0" :port 6064 :handler cider-nrepl-handler)) + (nrepl/start-server :bind "0.0.0.0" :port 6064)) (start) (deref p)) From 56472a95deee84a161cd37ddc32628cb8301cae0 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 25 Jun 2025 11:56:11 +0200 Subject: [PATCH 3/3] :bug: Add missing file migration to get-team-shared-files rpc method --- backend/src/app/rpc/commands/files.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/files.clj b/backend/src/app/rpc/commands/files.clj index f492d2520f..cfd9b4a947 100644 --- a/backend/src/app/rpc/commands/files.clj +++ b/backend/src/app/rpc/commands/files.clj @@ -595,7 +595,11 @@ (teams/check-read-permissions! conn profile-id team-id) (->> (db/exec! conn [sql:team-shared-files team-id]) (into #{} (comp - (map decode-row) + ;; NOTE: this decode operation is a workaround for a + ;; fast fix, this should be approached with a more + ;; efficient implementation, for now it loads all + ;; the files in memory. + (map (partial bfc/decode-file cfg)) (map (fn [row] (if-let [media-id (:media-id row)] (-> row