João Salavisa
a2d086efb8
feat(web): add @-mention for tasks in the chat composer ( #963 )
...
* feat(web): @-mention tasks in the chat composer
Lets users type @<taskname> in the chat input to reference other tasks.
The picked task is inserted as a chip and its metadata (id, workflow_id,
step, state) is appended to the prompt as a <kandev-system> block so the
agent can act on it via the kandev MCP tools.
Extends the existing TipTap mention extension with a new "task" kind;
task data comes from the kanban store (current workflow + visited
kanbanMulti snapshots), so no backend changes are needed.
* fix(web): harden task @-mentions from review feedback (#963 )
- Sanitize interpolated task strings (title, id, workflow_id, step,
state) before they land in the <kandev-system> block so a hostile
task title (e.g. from Jira/Linear sync) can't terminate the block
early via embedded newlines or angle brackets.
- Expand the task-mentions context block on the onSend code path too
(used by preview-session-tabs), which was silently dropping the
agent-facing task context when chips were present in the editor.
- Deduplicate task mentions by taskId in getTaskMentions so mentioning
the same task twice no longer produces redundant lines.
- Skip stale state.kanban.tasks entries whose workflowStepId isn't in
the current workflow's steps to prevent tagging them with the wrong
workflow_id.
* fix(web): skip task mentions missing workflowId or workflowStepId (#963 )
CodeRabbit flagged that getTaskMentions was filling missing
workflowId / workflowStepId with empty strings, propagating malformed
metadata into the prompt block. Skip such nodes during extraction.
---------
Co-authored-by: Kandev Agent <agent@kandev.dev >
2026-05-21 00:57:12 +01:00
..
2026-05-05 13:55:46 +01:00
2026-05-21 00:57:12 +01:00
2026-05-10 17:30:24 +01:00
2026-05-19 21:44:15 +01:00
2026-03-07 14:53:21 +00:00
2026-05-05 22:06:24 +01:00
2026-05-18 22:04:31 +01:00
2026-03-10 17:30:04 +00:00
2026-05-01 13:27:25 +01:00
2026-02-24 20:33:45 +00:00
2026-05-14 10:27:38 +01:00
2026-04-18 10:32:24 +01:00
2026-05-19 15:53:48 +01:00
2026-05-19 15:53:48 +01:00
2026-05-02 20:26:42 +01:00
2026-05-02 20:26:42 +01:00
2026-05-05 22:09:02 +01:00
2026-05-02 20:26:42 +01:00
2026-05-14 10:27:38 +01:00
2026-05-19 15:53:48 +01:00
2026-05-04 17:28:04 +01:00
2026-05-04 17:28:04 +01:00
2026-05-19 15:53:48 +01:00
2026-05-05 22:09:02 +01:00
2026-05-14 10:27:38 +01:00
2026-05-05 13:55:46 +01:00
2026-02-21 22:14:56 +00:00
2026-02-23 00:16:37 +00:00
2026-02-19 22:18:01 +00:00
2026-05-14 10:27:38 +01:00
2026-05-02 20:26:42 +01:00
2026-05-02 20:26:42 +01:00
2026-05-13 23:46:36 +01:00
2026-05-18 23:08:14 +01:00
2026-05-04 18:53:33 +01:00
2026-05-19 09:19:05 +01:00
2026-04-28 22:23:14 +01:00
2026-05-01 22:32:28 +01:00
2026-05-14 23:57:05 +01:00
2026-05-19 09:19:05 +01:00
2026-05-19 23:41:02 +01:00
2026-05-07 18:43:07 +01:00
2026-05-13 18:39:01 +01:00
2026-05-19 23:41:02 +01:00
2026-05-16 20:07:57 +01:00
2026-05-02 15:19:02 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-03-13 10:44:32 +00:00
2026-02-24 23:01:41 +00:00
2026-05-14 21:26:09 +01:00
2026-05-14 21:26:09 +01:00
2026-05-14 21:26:09 +01:00
2026-05-14 21:26:09 +01:00
2026-05-14 21:26:09 +01:00
2026-05-14 21:26:09 +01:00
2026-02-19 22:18:01 +00:00
2026-05-17 21:26:13 +01:00
2026-04-09 12:49:47 +01:00
2026-05-17 21:26:13 +01:00
2026-02-19 22:18:01 +00:00
2026-04-25 21:42:59 +01:00
2026-05-17 21:26:13 +01:00
2026-04-11 17:43:21 +01:00
2026-03-24 23:38:02 +00:00
2026-03-24 23:38:02 +00:00
2026-02-19 22:18:01 +00:00
2026-02-19 22:18:01 +00:00
2026-04-02 00:08:35 +01:00
2026-05-17 21:26:13 +01:00
2026-05-17 21:26:13 +01:00
2026-05-19 09:18:22 +01:00
2026-03-29 15:33:40 +01:00
2026-02-19 22:18:01 +00:00
2026-03-12 23:22:26 +00:00
2026-03-24 23:38:02 +00:00
2026-04-24 21:31:46 +01:00
2026-04-24 21:31:46 +01:00
2026-05-14 21:26:09 +01:00
2026-05-17 20:16:15 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-04-20 13:44:24 +01:00
2026-05-01 22:32:28 +01:00
2026-05-01 21:02:41 +01:00
2026-05-14 21:26:09 +01:00
2026-03-13 10:44:32 +00:00
2026-05-05 13:55:46 +01:00
2026-05-05 13:55:46 +01:00
2026-03-08 11:03:30 +00:00
2026-05-06 20:25:34 +01:00
2026-05-05 13:55:46 +01:00
2026-05-05 13:55:46 +01:00
2026-05-18 23:08:14 +01:00
2026-05-02 22:25:40 +01:00
2026-05-02 22:25:40 +01:00
2026-05-02 22:25:40 +01:00
2026-05-17 20:16:15 +01:00
2026-05-02 22:25:40 +01:00
2026-05-02 22:25:40 +01:00
2026-05-14 21:26:09 +01:00
2026-05-14 21:26:09 +01:00
2026-04-25 18:40:31 +01:00
2026-05-18 22:04:31 +01:00
2026-05-01 11:00:33 +01:00
2026-05-17 20:16:15 +01:00
2026-05-16 20:07:57 +01:00
2026-05-06 20:25:34 +01:00
2026-02-19 22:18:01 +00:00
2026-05-01 11:00:33 +01:00
2026-05-14 21:26:09 +01:00
2026-02-19 22:18:01 +00:00
2026-04-20 13:44:24 +01:00
2026-05-05 13:55:46 +01:00
2026-04-17 23:20:10 +01:00
2026-02-19 22:18:01 +00:00
2026-03-07 14:53:21 +00:00
2026-04-02 00:08:35 +01:00
2026-05-16 14:04:09 +01:00
2026-05-16 14:04:09 +01:00
2026-05-20 01:22:25 +01:00
2026-04-08 07:55:24 +01:00
2026-04-17 23:20:10 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-05-14 10:27:38 +01:00
2026-05-14 10:27:38 +01:00
2026-05-13 18:04:37 +01:00
2026-05-14 21:26:09 +01:00
2026-05-18 23:08:14 +01:00
2026-05-05 14:13:43 +01:00
2026-05-02 20:26:42 +01:00
2026-05-17 20:16:15 +01:00
2026-04-27 10:22:58 +01:00
2026-04-27 10:22:58 +01:00
2026-04-27 10:22:58 +01:00
2026-04-27 10:22:58 +01:00
2026-04-27 10:22:58 +01:00
2026-04-27 10:22:58 +01:00
2026-02-25 02:10:16 +00:00
2026-05-14 21:26:09 +01:00
2026-05-02 15:19:02 +01:00
2026-05-19 21:44:15 +01:00
2026-05-19 21:44:15 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-05-19 17:55:25 +01:00
2026-05-19 17:55:25 +01:00
2026-02-19 22:18:01 +00:00
2026-05-06 19:05:19 +01:00
2026-04-20 13:44:24 +01:00
2026-05-13 18:04:37 +01:00
2026-05-14 21:26:09 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-05-16 20:07:57 +01:00
2026-03-29 22:27:37 +01:00
2026-05-01 13:27:25 +01:00
2026-04-24 17:14:03 +01:00
2026-05-04 00:53:21 +01:00
2026-05-04 00:53:21 +01:00
2026-05-16 20:07:57 +01:00
2026-05-14 21:26:09 +01:00
2026-05-14 21:26:09 +01:00
2026-04-27 10:22:58 +01:00
2026-05-02 20:26:42 +01:00
2026-05-16 20:07:57 +01:00
2026-05-05 13:55:46 +01:00
2026-04-24 17:14:03 +01:00
2026-03-08 11:03:30 +00:00
2026-02-24 23:01:41 +00:00
2026-04-16 10:14:45 +01:00
2026-02-19 22:18:01 +00:00
2026-02-19 22:18:01 +00:00
2026-05-14 21:26:09 +01:00