← Back to Kontasks
Flow Auto-Grouping Fix Verified
Output
✅ Flow Auto-Grouping Fix Verified
Problem
Flow titles were being set to <turn-context session="ses_xxx"> instead of the actual user prompt.
Root Cause
In gv-flow-store.ts, the title extraction used:
let title = firstPrompt.split(/[.!?\n]/)[0]
The XML tag doesn't contain ., !, ?, or \n, so it was captured as the title.
Fix Applied
Added stripping logic before title extraction:
// Strip injected wrappers before extracting title cleanedPrompt = cleanedPrompt.replace( /<turn-context[\s\S]*?<\/turn-context>\s*/g, "" ); cleanedPrompt = cleanedPrompt.replace( /<!--[\s\S]*?-->\s*/g, "" ); // Also strips DASHBOARD CONSOLE wrapper and ATTACHED IMAGES
Verification
| Flow | Before | After |
|---|---|---|
| flow_01KEN... | <turn-context...> | Flow Timeline & Compaction Fixes |
| flow_01KEM... | <turn-context...> | UI Layout Fixes for Foldables |
Commit
0294331d Fix: Strip turn-context wrapper from flow title extraction
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
greatvibe
Tags
flowsbugfixverification
Created
11 Jan 2026, 12:04 pm
Updated
11 Jan 2026, 12:04 pm
Created By
claude
Raw Data
{
"id": "1f554858-e7f3-4cef-b5bd-204f5131d339",
"type": "general",
"status": "completed",
"title": "Flow Auto-Grouping Fix Verified",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\"><h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">✅ Flow Auto-Grouping Fix Verified</h2><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#98c379;margin:0 0 12px 0;\">Problem</h3><p style=\"color:#e0e0e0;margin:0;\">Flow titles were being set to <code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;color:#e5c07b;\"><turn-context session=\"ses_xxx\"></code> instead of the actual user prompt.</p></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#61afef;margin:0 0 12px 0;\">Root Cause</h3><p style=\"color:#e0e0e0;margin:0 0 8px 0;\">In <code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;color:#e5c07b;\">gv-flow-store.ts</code>, the title extraction used:</p><pre style=\"background:#3d3d3d;padding:12px;border-radius:4px;overflow-x:auto;margin:0;\"><span style=\"color:#c678dd;\">let</span> title = firstPrompt.<span style=\"color:#61afef;\">split</span>(<span style=\"color:#98c379;\">/[.!?\\n]/</span>)[<span style=\"color:#d19a66;\">0</span>]</pre><p style=\"color:#7f848e;margin:8px 0 0 0;\">The XML tag doesn't contain <code>.</code>, <code>!</code>, <code>?</code>, or <code>\\n</code>, so it was captured as the title.</p></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#c678dd;margin:0 0 12px 0;\">Fix Applied</h3><p style=\"color:#e0e0e0;margin:0 0 8px 0;\">Added stripping logic before title extraction:</p><pre style=\"background:#3d3d3d;padding:12px;border-radius:4px;overflow-x:auto;margin:0;line-height:1.6;\"><span style=\"color:#7f848e;\">// Strip injected wrappers before extracting title</span>\ncleanedPrompt = cleanedPrompt.<span style=\"color:#61afef;\">replace</span>(\n <span style=\"color:#98c379;\">/<turn-context[\\s\\S]*?<\\/turn-context>\\s*/g</span>, <span style=\"color:#98c379;\">\"\"</span>\n);\ncleanedPrompt = cleanedPrompt.<span style=\"color:#61afef;\">replace</span>(\n <span style=\"color:#98c379;\">/<!--[\\s\\S]*?-->\\s*/g</span>, <span style=\"color:#98c379;\">\"\"</span>\n);\n<span style=\"color:#7f848e;\">// Also strips DASHBOARD CONSOLE wrapper and ATTACHED IMAGES</span></pre></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#56b6c2;margin:0 0 12px 0;\">Verification</h3><table style=\"width:100%;border-collapse:collapse;\"><tr style=\"border-bottom:1px solid #444;\"><th style=\"text-align:left;padding:8px;color:#7f848e;\">Flow</th><th style=\"text-align:left;padding:8px;color:#7f848e;\">Before</th><th style=\"text-align:left;padding:8px;color:#7f848e;\">After</th></tr><tr style=\"border-bottom:1px solid #333;\"><td style=\"padding:8px;color:#e0e0e0;\">flow_01KEN...</td><td style=\"padding:8px;color:#e06c75;\"><turn-context...></td><td style=\"padding:8px;color:#98c379;\">Flow Timeline & Compaction Fixes</td></tr><tr><td style=\"padding:8px;color:#e0e0e0;\">flow_01KEM...</td><td style=\"padding:8px;color:#e06c75;\"><turn-context...></td><td style=\"padding:8px;color:#98c379;\">UI Layout Fixes for Foldables</td></tr></table></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;\"><h3 style=\"color:#e5c07b;margin:0 0 12px 0;\">Commit</h3><p style=\"color:#e0e0e0;margin:0;\"><code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;color:#61afef;\">0294331d</code> Fix: Strip turn-context wrapper from flow title extraction</p></div></div>",
"choices": [
{
"label": "Test new session",
"value": "Clear the current session and start a new one to verify flows are created with correct titles from user prompts",
"primary": true
},
{
"label": "View flow timeline",
"value": "Open the flow timeline to see if kontasks are now properly grouped under flows with correct titles"
},
{
"label": "Check orphan kontasks",
"value": "List orphan kontasks that are not linked to any flow and suggest linking them"
}
]
},
"createdBy": "claude",
"createdAt": "2026-01-11T02:04:34.759Z",
"updatedAt": "2026-01-11T02:04:34.962Z",
"scope": "greatvibe",
"tags": [
"flows",
"bugfix",
"verification"
]
}