← Back to Kontasks
What's Next clickable buttons - code files
Code locations and implementation plan for making What's Next sections clickable
Output
What's Next Clickable Buttons
The Issue
The "What's Next?" sections are currently static HTML bullet lists in the output. The button system already exists via context.choices - we just need to use it!
Key Code Files
/konnectvol/konui/src/ ├── console-ui.ts # renderChoiceButtons() - line 277 ├── console-history.ts # Passes choices to buttons - line 188 ├── views/ │ └── kontask-detail.ts # renderChoiceButtons() - line 294 └── kontask-types.ts # KontaskChoice type definition
How It Already Works
When creating a kontask with context.choices, buttons render automatically:
konui_create_task({ "context": { "output": "<div>...your HTML...</div>", "choices": [ { "label": "Look up requirements", "value": "Look up Claude Code system requirements", "primary": true }, { "label": "Research Termux issues", "value": "Research Termux compatibility issues" }, { "label": "Mobile alternatives", "value": "Find alternative mobile workflows" } ] } })
Button Behavior
- Primary button (blue) - first/recommended option
- Secondary buttons (dark gray) - other options
- On click → sends the
valueas a new prompt to Claude - Plan context → automatically prefixes
[Context: planSummary]if set
The Fix
No code changes needed! I just need to include choices in the context when creating kontasks. The infrastructure is already there.
What's Next?
Choose an option:
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
kontasksuibuttons
Created
3 Jan 2026, 8:44 am
Updated
3 Jan 2026, 8:44 am
Created By
claude
Raw Data
{
"id": "543a3104-1f1d-42f4-b2a9-272c0c7f4871",
"type": "general",
"status": "completed",
"title": "What's Next clickable buttons - code files",
"description": "Code locations and implementation plan for making What's Next sections clickable",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\">\n<h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">What's Next Clickable Buttons</h2>\n\n<div style=\"background:#3a2a1a;border:1px solid #f97316;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#f97316;margin:0 0 8px 0;font-family:sans-serif;\">The Issue</h3>\n<p style=\"font-family:sans-serif;margin:0;line-height:1.6;\">The \"What's Next?\" sections are currently <strong>static HTML bullet lists</strong> in the output. The button system already exists via <code style=\"background:#2d2d2d;padding:2px 6px;border-radius:3px;\">context.choices</code> - we just need to use it!</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#98c379;margin:0 0 12px 0;font-family:sans-serif;\">Key Code Files</h3>\n<pre style=\"background:#1a1a1a;padding:12px;border-radius:4px;overflow-x:auto;line-height:1.8;font-size:0.85rem;\">\n<span style=\"color:#56b6c2;font-weight:bold;\">/konnectvol/konui/src/</span>\n├── <span style=\"color:#e5c07b;\">console-ui.ts</span> <span style=\"color:#7f848e;\"># renderChoiceButtons() - line 277</span>\n├── <span style=\"color:#e5c07b;\">console-history.ts</span> <span style=\"color:#7f848e;\"># Passes choices to buttons - line 188</span>\n├── <span style=\"color:#61afef;\">views/</span>\n│ └── <span style=\"color:#e5c07b;\">kontask-detail.ts</span> <span style=\"color:#7f848e;\"># renderChoiceButtons() - line 294</span>\n└── <span style=\"color:#e5c07b;\">kontask-types.ts</span> <span style=\"color:#7f848e;\"># KontaskChoice type definition</span>\n</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#61afef;margin:0 0 12px 0;font-family:sans-serif;\">How It Already Works</h3>\n<p style=\"font-family:sans-serif;margin:0 0 12px 0;line-height:1.6;\">When creating a kontask with <code style=\"background:#1a1a1a;padding:2px 6px;border-radius:3px;\">context.choices</code>, buttons render automatically:</p>\n<pre style=\"background:#1a1a1a;padding:12px;border-radius:4px;overflow-x:auto;line-height:1.5;font-size:0.85rem;\"><span style=\"color:#c678dd;\">konui_create_task</span>(<span style=\"color:#e5c07b;\">{</span>\n <span style=\"color:#98c379;\">\"context\"</span>: <span style=\"color:#e5c07b;\">{</span>\n <span style=\"color:#98c379;\">\"output\"</span>: <span style=\"color:#98c379;\">\"<div>...your HTML...</div>\"</span>,\n <span style=\"color:#98c379;\">\"choices\"</span>: <span style=\"color:#e5c07b;\">[</span>\n <span style=\"color:#e5c07b;\">{</span> <span style=\"color:#98c379;\">\"label\"</span>: <span style=\"color:#98c379;\">\"Look up requirements\"</span>, <span style=\"color:#98c379;\">\"value\"</span>: <span style=\"color:#98c379;\">\"Look up Claude Code system requirements\"</span>, <span style=\"color:#98c379;\">\"primary\"</span>: <span style=\"color:#56b6c2;\">true</span> <span style=\"color:#e5c07b;\">}</span>,\n <span style=\"color:#e5c07b;\">{</span> <span style=\"color:#98c379;\">\"label\"</span>: <span style=\"color:#98c379;\">\"Research Termux issues\"</span>, <span style=\"color:#98c379;\">\"value\"</span>: <span style=\"color:#98c379;\">\"Research Termux compatibility issues\"</span> <span style=\"color:#e5c07b;\">}</span>,\n <span style=\"color:#e5c07b;\">{</span> <span style=\"color:#98c379;\">\"label\"</span>: <span style=\"color:#98c379;\">\"Mobile alternatives\"</span>, <span style=\"color:#98c379;\">\"value\"</span>: <span style=\"color:#98c379;\">\"Find alternative mobile workflows\"</span> <span style=\"color:#e5c07b;\">}</span>\n <span style=\"color:#e5c07b;\">]</span>\n <span style=\"color:#e5c07b;\">}</span>\n<span style=\"color:#e5c07b;\">}</span>)</pre>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#c678dd;margin:0 0 12px 0;font-family:sans-serif;\">Button Behavior</h3>\n<ul style=\"font-family:sans-serif;margin:0;padding-left:20px;line-height:1.8;\">\n<li><strong>Primary button</strong> (blue) - first/recommended option</li>\n<li><strong>Secondary buttons</strong> (dark gray) - other options</li>\n<li><strong>On click</strong> → sends the <code style=\"background:#1a1a1a;padding:2px 6px;border-radius:3px;\">value</code> as a new prompt to Claude</li>\n<li><strong>Plan context</strong> → automatically prefixes <code style=\"background:#1a1a1a;padding:2px 6px;border-radius:3px;\">[Context: planSummary]</code> if set</li>\n</ul>\n</div>\n\n<div style=\"background:#1a3a1a;border:1px solid #22c55e;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h4 style=\"color:#22c55e;margin:0 0 8px 0;font-family:sans-serif;\">The Fix</h4>\n<p style=\"font-family:sans-serif;margin:0;line-height:1.6;\">No code changes needed! I just need to include <code style=\"background:#2d2d2d;padding:2px 6px;border-radius:3px;\">choices</code> in the context when creating kontasks. The infrastructure is already there.</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-top:16px;\">\n<h4 style=\"margin:0 0 12px 0;color:#fff;font-family:sans-serif;\">What's Next?</h4>\n<p style=\"color:#9ca3af;font-family:sans-serif;margin:0;\">Choose an option:</p>\n</div>\n</div>",
"choices": [
{
"label": "Test it now",
"value": "Create a test kontask with clickable What's Next buttons to verify they work",
"primary": true
},
{
"label": "Update CLAUDE.md",
"value": "Update CLAUDE.md to document using choices array instead of static HTML for What's Next sections"
},
{
"label": "Show me the button code",
"value": "Show me the full renderChoiceButtons function from console-ui.ts"
}
],
"requestedAt": "2026-01-03T10:10:00Z",
"requestId": "1144653b-6ea8-4c32-b942-cfb8b5ed7214"
},
"createdBy": "claude",
"createdAt": "2026-01-02T22:44:32.359Z",
"updatedAt": "2026-01-02T22:44:32.505Z",
"requestId": "1144653b-6ea8-4c32-b942-cfb8b5ed7214",
"scope": "vibetools",
"tags": [
"kontasks",
"ui",
"buttons"
],
"targetUser": "claude"
}