diff --git a/modules/rsocials/components/campaign-workflow.css b/modules/rsocials/components/campaign-workflow.css
index 1c4e0b7..3308e14 100644
--- a/modules/rsocials/components/campaign-workflow.css
+++ b/modules/rsocials/components/campaign-workflow.css
@@ -274,6 +274,26 @@ folk-campaign-workflow {
outline: none;
}
+.cw-config__thread-btn {
+ padding: 8px 12px;
+ border-radius: 6px;
+ border: 1px solid #6366f155;
+ background: #6366f122;
+ color: #818cf8;
+ font-size: 12px;
+ cursor: pointer;
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ transition: background 0.15s, border-color 0.15s;
+}
+
+.cw-config__thread-btn:hover {
+ background: #6366f133;
+ border-color: #6366f1;
+}
+
.cw-config__delete {
margin-top: 12px;
padding: 6px 12px;
diff --git a/modules/rsocials/components/folk-campaign-workflow.ts b/modules/rsocials/components/folk-campaign-workflow.ts
index 69b26a1..6312c18 100644
--- a/modules/rsocials/components/folk-campaign-workflow.ts
+++ b/modules/rsocials/components/folk-campaign-workflow.ts
@@ -506,6 +506,13 @@ class FolkCampaignWorkflow extends HTMLElement {
`).join('');
+ const threadBtnHtml = node.type === 'publish-thread'
+ ? ``
+ : '';
+
return `
${fieldsHtml}
+ ${threadBtnHtml}
${logHtml ? `` : ''}
`;
@@ -840,6 +848,16 @@ class FolkCampaignWorkflow extends HTMLElement {
if (this.selectedNodeId) this.deleteNode(this.selectedNodeId);
});
+ this.shadow.getElementById('config-open-thread')?.addEventListener('click', () => {
+ const node = this.nodes.find(n => n.id === this.selectedNodeId);
+ if (!node) return;
+ const threadId = node.config.threadId;
+ const url = threadId
+ ? `${this.basePath}thread-editor/${threadId}/edit`
+ : `${this.basePath}thread-editor`;
+ window.open(url, '_blank');
+ });
+
const configPanel = this.shadow.getElementById('config-panel');
if (configPanel) {
configPanel.querySelectorAll('[data-config-key]').forEach(el => {
diff --git a/modules/rsocials/schemas.ts b/modules/rsocials/schemas.ts
index 8592c4e..646f89b 100644
--- a/modules/rsocials/schemas.ts
+++ b/modules/rsocials/schemas.ts
@@ -323,6 +323,7 @@ export const CAMPAIGN_NODE_CATALOG: CampaignWorkflowNodeDef[] = [
outputs: [{ name: 'done', type: 'trigger' }, { name: 'threadId', type: 'data' }],
configSchema: [
{ key: 'platform', label: 'Platform', type: 'select', options: ['X', 'Bluesky', 'Threads'] },
+ { key: 'threadId', label: 'Thread ID (link existing)', type: 'text', placeholder: 'Leave empty to use inline content' },
{ key: 'threadContent', label: 'Thread (--- between tweets)', type: 'textarea', placeholder: 'Tweet 1\n---\nTweet 2\n---\nTweet 3' },
],
},