From 249ecfc054bba60988492859052743acb7b14418 Mon Sep 17 00:00:00 2001 From: Olive Vaughn Date: Sun, 11 Oct 2026 00:33:41 -0400 Subject: [PATCH] A name is a name, even when it is the id Reading a name equal to the id as no name was a guess at what older documents meant, and it renamed a symbol called after its id to where it is drawn. The automation suite's box is named, as it means to be. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011FLuCjp9kNH6ovwJVXSbq9 --- frontend/src/arthur/domain/clip.cljs | 5 ++--- frontend/test/arthur/domain/instance_test.cljs | 5 ++--- frontend/test/browser/automation.mjs | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/src/arthur/domain/clip.cljs b/frontend/src/arthur/domain/clip.cljs index 4c46bcb..96eaa1f 100644 --- a/frontend/src/arthur/domain/clip.cljs +++ b/frontend/src/arthur/domain/clip.cljs @@ -104,14 +104,13 @@ reads as that symbol's name and the frame it starts on — `body 12` — worked out on every read, so renaming the lane renames its drawings and moving one renames it. A symbol placed nowhere, or in two places, has no one place to be - named by and reads as its id. A `:name` that is just the id is no name: older - documents stored one on every drawing." + named by and reads as its id." ([clip sid] (symbol-name clip sid #{})) ([clip sid seen] (let [given (:name (symbol clip sid)) [owner :as os] (owners clip sid)] (cond - (and given (not= given (name sid))) given + given given (and (= 1 (count os)) (not (seen owner))) (str (symbol-name clip owner (conj seen sid)) " " (js/Math.floor (second (first (get (placements clip) sid))))) diff --git a/frontend/test/arthur/domain/instance_test.cljs b/frontend/test/arthur/domain/instance_test.cljs index ceb43d5..ff58fb1 100644 --- a/frontend/test/arthur/domain/instance_test.cljs +++ b/frontend/test/arthur/domain/instance_test.cljs @@ -274,9 +274,8 @@ (is (= "body 5" (clip/symbol-name c :inner))) (is (= "lane 5" (clip/symbol-name (assoc-in c [:symbols :outer :name] "lane") :inner)) "renaming the lane renames its drawings")) - (testing "a name of its own wins, and one that is only the id is no name" - (is (= "hand" (clip/symbol-name (assoc-in c [:symbols :inner :name] "hand") :inner))) - (is (= "body 5" (clip/symbol-name (assoc-in c [:symbols :inner :name] "inner") :inner)))) + (testing "a name of its own wins" + (is (= "hand" (clip/symbol-name (assoc-in c [:symbols :inner :name] "hand") :inner)))) (testing "placed nowhere, or in two symbols, it is its id" (is (= "loose" (clip/symbol-name c :loose))) (is (= "inner" (clip/symbol-name (clip/place-symbol c nil :loose :inner 0 (random-uuid) nil) diff --git a/frontend/test/browser/automation.mjs b/frontend/test/browser/automation.mjs index a748c4d..78e2e76 100644 --- a/frontend/test/browser/automation.mjs +++ b/frontend/test/browser/automation.mjs @@ -88,7 +88,7 @@ try { k('source'), m(k('symbol'), k('box')), k('span'), v(0, 60), k('time'), m(k('at'), 0, k('rate'), 1), k('playback'), m(k('in'), 0, k('speed'), 1, k('end'), k('stop'))); - c = cljs.core.assoc_in(c, v(k('symbols'), k('box')), m(k('id'), k('box'), k('frames'), 60, k('nodes'), m())); + c = cljs.core.assoc_in(c, v(k('symbols'), k('box')), m(k('id'), k('box'), k('name'), 'box', k('frames'), 60, k('nodes'), m())); c = cljs.core.assoc_in(c, v(k('symbols'), k('main'), k('nodes')), m(k('a'), rect('a',0,true), k('b'), rect('b',4,false), k('target'), target)); const id = arthur.footage.store.install_BANG_(m(k('clip'), c, k('store'), m()), 'timeline-browser'); const a = v(k('node'),k('main'),k('a'),v(k('a'))), b = v(k('node'),k('main'),k('b'),v(k('b')));