feat: Add task id to task details UI (#1100)
* Display current task ID on task details page * Changeset * Implement CodeRabbit review suggestion. * chore: fix CI errors --------- Co-authored-by: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com>
This commit is contained in:
5
.changeset/light-crabs-warn.md
Normal file
5
.changeset/light-crabs-warn.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"extension": minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Display current task ID on task details page
|
||||||
@@ -53,6 +53,11 @@ export const TaskDetailsView: React.FC<TaskDetailsViewProps> = ({
|
|||||||
refreshComplexityAfterAI
|
refreshComplexityAfterAI
|
||||||
} = useTaskDetails({ taskId, sendMessage, tasks: allTasks });
|
} = useTaskDetails({ taskId, sendMessage, tasks: allTasks });
|
||||||
|
|
||||||
|
const displayId =
|
||||||
|
isSubtask && parentTask
|
||||||
|
? `${parentTask.id}.${currentTask?.id}`
|
||||||
|
: currentTask?.id;
|
||||||
|
|
||||||
const handleStatusChange = async (newStatus: TaskMasterTask['status']) => {
|
const handleStatusChange = async (newStatus: TaskMasterTask['status']) => {
|
||||||
if (!currentTask) return;
|
if (!currentTask) return;
|
||||||
|
|
||||||
@@ -60,10 +65,7 @@ export const TaskDetailsView: React.FC<TaskDetailsViewProps> = ({
|
|||||||
await sendMessage({
|
await sendMessage({
|
||||||
type: 'updateTaskStatus',
|
type: 'updateTaskStatus',
|
||||||
data: {
|
data: {
|
||||||
taskId:
|
taskId: displayId,
|
||||||
isSubtask && parentTask
|
|
||||||
? `${parentTask.id}.${currentTask.id}`
|
|
||||||
: currentTask.id,
|
|
||||||
newStatus: newStatus
|
newStatus: newStatus
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -135,7 +137,7 @@ export const TaskDetailsView: React.FC<TaskDetailsViewProps> = ({
|
|||||||
<BreadcrumbSeparator />
|
<BreadcrumbSeparator />
|
||||||
<BreadcrumbItem>
|
<BreadcrumbItem>
|
||||||
<span className="text-vscode-foreground">
|
<span className="text-vscode-foreground">
|
||||||
{currentTask.title}
|
#{displayId} {currentTask.title}
|
||||||
</span>
|
</span>
|
||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
</BreadcrumbList>
|
</BreadcrumbList>
|
||||||
@@ -152,9 +154,9 @@ export const TaskDetailsView: React.FC<TaskDetailsViewProps> = ({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Task title */}
|
{/* Task ID and title */}
|
||||||
<h1 className="text-2xl font-bold tracking-tight text-vscode-foreground">
|
<h1 className="text-2xl font-bold tracking-tight text-vscode-foreground">
|
||||||
{currentTask.title}
|
#{displayId} {currentTask.title}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{/* Description */}
|
{/* Description */}
|
||||||
|
|||||||
Reference in New Issue
Block a user