commit 713814b3ce2e13431a2529f47aee570dcb9a5df1
parent de1ad8f4b02b95d3b92dec9583be70ecb006ff59
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 10 Nov 2026 16:01:04 -0500
umtool: a block's index from the view counts only when the view was read at the token the timeline is held at -- between an announce's timeline read and its view read, an old view's `timelineAt` checked against the new ids could land on the other twin (L8b re-review 2)
Until the two agree, a twin has no index (its Move and Remove are disabled); an id the timeline has once is
placed by the timeline alone, as before.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/umtool/components/projects/workspace/Workspace.tsx b/umtool/components/projects/workspace/Workspace.tsx
@@ -199,13 +199,16 @@ export default function Workspace({
// ---- the blocks ------------------------------------------------------------------
const itemOf = useMemo(() => new Map(plan.items.map((it, i) => [it.id, { it, i }])), [plan.items]);
const blocks = useMemo<Block[]>(() => {
+ const fresh = !!tlToken && view.token === tlToken;
const count = new Map<string, number>();
for (const id of tlIds) count.set(id, (count.get(id) ?? 0) + 1);
return view.entries.map((e) => {
const p = itemOf.get(e.id);
// ITS OWN place in the timeline (lane L8b): the one the view says (playView `timelineAt`), else the only entry
// with its id. A twin the view does not place is never guessed at: no index, and nothing moves or removes it.
- const own = typeof e.timelineAt === "number" && tlIds[e.timelineAt] === e.id ? e.timelineAt : null;
+ // The view's word counts only when it was read at the token the timeline is held at now -- between an
+ // announce's two reads an old view's index checked against the new ids could land on the other twin.
+ const own = fresh && typeof e.timelineAt === "number" && tlIds[e.timelineAt] === e.id ? e.timelineAt : null;
const n = count.get(e.id) ?? 0;
const at = e.type === "intro" ? null : (own ?? (n === 1 ? tlIds.indexOf(e.id) : null));
return {
@@ -219,7 +222,7 @@ export default function Workspace({
missing: e.type === "clip" && !e.media,
};
});
- }, [view.entries, itemOf, tlIds]);
+ }, [view.entries, view.token, itemOf, tlIds, tlToken]);
const entryOf = core.entryOf;
// ---- the selection (the inspector's block), kept in the URL (`?block=`) ----------------