commit 9f77904cce2a28d5908f15d3861190b2b99b2002
parent c580f889c840ee1ec3f94a23093a2c52427d7c76
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 29 Oct 2026 00:19:39 -0400
umtool: the module panel leaves a clip's own fields (clip.*) to the clip editor
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/umtool/report-to-video/modules/panel.mjs b/umtool/report-to-video/modules/panel.mjs
@@ -25,8 +25,11 @@ export function uiBase(m) {
return m.configKey ?? null;
}
+/** A module's cut-wide fields: a clip's own (`clip.*`, the clip editor's) are not the panel's. */
+export const uiOf = (m) => (m.ui ?? []).filter((f) => !String(f.key).startsWith("clip."));
+
/** The modules the panel lists: every one with a ui descriptor and a home. */
-export const panelModules = () => MODULES.filter((m) => Array.isArray(m.ui) && m.ui.length && uiBase(m));
+export const panelModules = () => MODULES.filter((m) => uiOf(m).length && uiBase(m));
/** Modules that are switched on and off by their object being there. */
const TOGGLES = Object.freeze({
@@ -89,7 +92,7 @@ export function panelState(manifest, seen, problems = {}) {
const eff = rel ? getPath(seen.render ?? {}, rel) : seen.render ?? {};
const fields = {};
const effective = {};
- for (const f of m.ui) {
+ for (const f of uiOf(m)) {
const v = getPath(own, f.key);
const e = getPath(eff, f.key);
if (v !== undefined) fields[f.key] = v;
@@ -100,7 +103,7 @@ export function panelState(manifest, seen, problems = {}) {
const enabled = toggle ? getPath(seen.render ?? {}, cfgRel) !== undefined : true;
return {
id: m.id, title: m.title, summary: m.summary ?? "", kind: m.kind, slot: m.slot, z: m.z,
- configKey: m.configKey, base, ui: m.ui, docs: m.docs?.heading ?? null,
+ configKey: m.configKey, base, ui: uiOf(m), docs: m.docs?.heading ?? null,
toggle: !!toggle, enabled, fields, effective,
preview: typeof m.preview === "function" || !!m.region || !!m.host,
problems: problems[m.id] ?? [],
@@ -123,7 +126,7 @@ export function panelWrite(manifest, id, { fields = {}, enabled } = {}) {
const m = panelModules().find((x) => x.id === id);
if (!m) throw new Error(`no module ${id} in the panel (${panelModules().map((x) => x.id).join(", ")})`);
const base = uiBase(m);
- const known = new Set(m.ui.map((f) => f.key));
+ const known = new Set(uiOf(m).map((f) => f.key));
for (const k of Object.keys(fields)) if (!known.has(k)) throw new Error(`${id}: ${k} is not one of its fields (${[...known].join(", ")})`);
const render = structuredClone(manifest.render ?? {});
const cfgRel = (m.configKey ?? "").split(".").slice(1).join(".");