From 0b5d4b41f10fd21cd257a6b390573598d2ade048 Mon Sep 17 00:00:00 2001 From: iliya Date: Sat, 14 Mar 2026 13:52:30 +0200 Subject: [PATCH] refactor: enhance task review notifications and UI components - Updated task review notification messages for clearer formatting, emphasizing actions taken by reviewers. - Improved styling for task comments and badges to enhance visibility and user interaction. - Added new properties to support better tracking of review states and reviewer information in task details. - Refactored UI components to ensure consistent spacing and layout across task-related dialogs and sections. --- agent-teams-controller/src/internal/review.js | 8 +- .../team/dialogs/TaskCommentsSection.tsx | 3 +- .../team/dialogs/TaskDetailDialog.tsx | 837 +++++++++--------- .../components/team/kanban/KanbanColumn.tsx | 2 +- .../team/messages/MessageComposer.tsx | 7 + .../components/ui/MentionSuggestionList.tsx | 7 +- .../components/ui/MentionableTextarea.tsx | 20 +- src/renderer/components/ui/badge.tsx | 9 +- src/renderer/index.css | 8 + 9 files changed, 483 insertions(+), 418 deletions(-) diff --git a/agent-teams-controller/src/internal/review.js b/agent-teams-controller/src/internal/review.js index b2d86afe..65cac819 100644 --- a/agent-teams-controller/src/internal/review.js +++ b/agent-teams-controller/src/internal/review.js @@ -82,7 +82,7 @@ function requestReview(context, taskId, flags = {}) { to: reviewer, from, text: - `Please review task #${task.displayId || task.id}.\n\n` + + `**Please review** task #${task.displayId || task.id}\n\n` + wrapAgentBlock( `When approved, use MCP tool review_approve:\n` + `{ teamName: "${context.teamName}", taskId: "${task.id}", notifyOwner: true }\n\n` + @@ -140,8 +140,8 @@ function approveReview(context, taskId, flags = {}) { from, text: note && note !== 'Approved' - ? `Task #${task.displayId || task.id} approved.\n\n${note}` - : `Task #${task.displayId || task.id} approved.`, + ? `@${from} **approved** task #${task.displayId || task.id}\n\n${note}` + : `@${from} **approved** task #${task.displayId || task.id}`, summary: `Approved #${task.displayId || task.id}`, source: 'system_notification', ...(leadSessionId ? { leadSessionId } : {}), @@ -192,7 +192,7 @@ function requestChanges(context, taskId, flags = {}) { to: task.owner, from, text: - `Task #${task.displayId || task.id} needs fixes.\n\n${comment}\n\n` + + `@${from} **requested changes** for task #${task.displayId || task.id}\n\n${comment}\n\n` + 'The task has been moved back to pending. When you are ready to resume, review the task context, start it explicitly, implement the fixes, mark it completed, and request review again.', ...(Array.isArray(flags.taskRefs) ? { taskRefs: flags.taskRefs } : {}), summary: `Fix request for #${task.displayId || task.id}`, diff --git a/src/renderer/components/team/dialogs/TaskCommentsSection.tsx b/src/renderer/components/team/dialogs/TaskCommentsSection.tsx index 949f2e12..f5a0d54e 100644 --- a/src/renderer/components/team/dialogs/TaskCommentsSection.tsx +++ b/src/renderer/components/team/dialogs/TaskCommentsSection.tsx @@ -210,7 +210,7 @@ export const TaskCommentsSection = ({
) : ( { diff --git a/src/renderer/components/team/dialogs/TaskDetailDialog.tsx b/src/renderer/components/team/dialogs/TaskDetailDialog.tsx index 1464765f..989f2823 100644 --- a/src/renderer/components/team/dialogs/TaskDetailDialog.tsx +++ b/src/renderer/components/team/dialogs/TaskDetailDialog.tsx @@ -566,6 +566,26 @@ export const TaskDetailDialog = ({ Unassigned )}
+ {currentTask.reviewer || + (currentTask.reviewState && currentTask.reviewState !== 'none') ? ( +
+ + {currentTask.reviewer ? ( + + ) : null} + {currentTask.reviewState && currentTask.reviewState !== 'none' ? ( + + {REVIEW_STATE_DISPLAY[currentTask.reviewState].label} + + ) : null} +
+ ) : null} {currentTask.createdBy ? (
@@ -688,451 +708,462 @@ export const TaskDetailDialog = ({
) : null} - {/* Description */} - } - contentClassName="pl-2.5" - headerClassName="-mx-6 w-[calc(100%+3rem)]" - headerContentClassName="pl-6" - defaultOpen - > - {editingDescription ? ( -
-
- - -
- {descriptionPreview ? ( -
- {descriptionDraft.trim() ? ( - - ) : ( -

Nothing to preview

- )} -
- ) : ( -