From 666ea442564b63caeef6804bfcd209831f209759 Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Wed, 22 Jul 2026 18:40:06 +0200 Subject: [PATCH 1/7] fix: type the conditional token build/parse helpers with a uid-less subset so the web typecheck passes on the transient uid attribute --- .../app/campaigns/sequences/nodes/ConditionalNode.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/src/components/app/campaigns/sequences/nodes/ConditionalNode.tsx b/web/src/components/app/campaigns/sequences/nodes/ConditionalNode.tsx index 079ce0704..ecdadc645 100644 --- a/web/src/components/app/campaigns/sequences/nodes/ConditionalNode.tsx +++ b/web/src/components/app/campaigns/sequences/nodes/ConditionalNode.tsx @@ -23,6 +23,10 @@ interface ConditionalAttrs { uid: string; // transient, not serialized — flags a just-inserted chip to open once } +// The serialized parts of a conditional (everything but the transient uid), +// used by the token build/parse helpers. +type ConditionalParts = Pick; + const DEFAULT_ATTRS: ConditionalAttrs = { expr: ".Company", thenText: "", elseText: "", uid: "" }; declare module "@tiptap/core" { @@ -34,7 +38,7 @@ declare module "@tiptap/core" { } // buildConditionalToken assembles the literal template text from the attrs. -function buildConditionalToken(a: ConditionalAttrs): string { +function buildConditionalToken(a: ConditionalParts): string { const expr = a.expr.trim() || ".Company"; const then = a.thenText ?? ""; if (a.elseText && a.elseText.trim()) { @@ -45,7 +49,7 @@ function buildConditionalToken(a: ConditionalAttrs): string { // parseConditionalToken reverses buildConditionalToken so a saved/pasted // conditional round-trips back into the builder. -function parseConditionalToken(token: string): ConditionalAttrs | null { +function parseConditionalToken(token: string): ConditionalParts | null { const m = token.match(/^\{\{\s*if\s+([\s\S]*?)\s*\}\}([\s\S]*?)(?:\{\{\s*else\s*\}\}([\s\S]*?))?\{\{\s*end\s*\}\}$/); if (!m) return null; return { expr: m[1].trim(), thenText: m[2] ?? "", elseText: m[3] ?? "" }; From 9a67008ea2bb1854fa3470c547c646e0c3eca107 Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Wed, 22 Jul 2026 18:40:06 +0200 Subject: [PATCH 2/7] feat: add a runtime config shim to the dashboard so a single built image reads its API url, app url, tracking domain, and turnstile key from container env via /config.js --- web/index.html | 4 +++ web/public/config.js | 4 +++ web/src/app/auth/login/page.tsx | 4 +-- web/src/components/captcha/Turnstile.tsx | 3 +- web/src/components/captcha/TurnstileModal.tsx | 3 +- web/src/lib/information.ts | 11 +++++-- web/src/lib/runtimeConfig.ts | 31 +++++++++++++++++++ 7 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 web/public/config.js create mode 100644 web/src/lib/runtimeConfig.ts diff --git a/web/index.html b/web/index.html index b73934ed5..5e1715c5b 100644 --- a/web/index.html +++ b/web/index.html @@ -12,6 +12,10 @@ Warmbly + +