Skip to content

Commit 60dfb28

Browse files
feat(tasks): enhance task management with automation features and UI improvements (#1752)
- Add automation activity feed and indicator components for task automation status - Implement modern task list and category views for better task organization - Introduce search input for filtering tasks - Refactor task status handling and improve UI elements for better user experience - Update task body and status selector components for enhanced functionality Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
1 parent e06bb15 commit 60dfb28

17 files changed

+3088
-398
lines changed

.github/workflows/auto-pr-to-main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- cursor/*
1818
- codex/*
1919
- chas/*
20+
- tofik/*
2021
jobs:
2122
create-pull-request:
2223
runs-on: warp-ubuntu-latest-arm64-4x
@@ -35,9 +36,9 @@ jobs:
3536
uses: repo-sync/pull-request@v2
3637
with:
3738
github_token: ${{ secrets.GITHUB_TOKEN }}
38-
destination_branch: 'main'
39-
pr_title: '[dev] [${{ github.actor }}] ${{ github.ref_name }}'
40-
pr_label: 'automated-pr'
39+
destination_branch: "main"
40+
pr_title: "[dev] [${{ github.actor }}] ${{ github.ref_name }}"
41+
pr_label: "automated-pr"
4142
pr_body: |
4243
This is an automated pull request to merge ${{ github.ref_name }} into dev.
4344
It was created by the [Auto Pull Request] action.

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/components/SingleTask.tsx

Lines changed: 83 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
'use client';
22

33
import { regenerateTaskAction } from '@/actions/tasks/regenerate-task-action';
4+
import {
5+
Breadcrumb,
6+
BreadcrumbItem,
7+
BreadcrumbLink,
8+
BreadcrumbList,
9+
BreadcrumbSeparator,
10+
} from '@comp/ui/breadcrumb';
411
import { Button } from '@comp/ui/button';
5-
import { Card } from '@comp/ui/card';
612
import {
713
Dialog,
814
DialogContent,
@@ -20,8 +26,10 @@ import {
2026
type Task,
2127
type User,
2228
} from '@db';
23-
import { RefreshCw, Trash2 } from 'lucide-react';
29+
import { ChevronRight, RefreshCw, Trash2 } from 'lucide-react';
2430
import { useAction } from 'next-safe-action/hooks';
31+
import Link from 'next/link';
32+
import { useParams } from 'next/navigation';
2533
import { useState } from 'react';
2634
import { toast } from 'sonner';
2735
import { Comments } from '../../../../../../components/comments/Comments';
@@ -44,6 +52,9 @@ interface SingleTaskProps {
4452
}
4553

4654
export function SingleTask({ initialTask, initialAutomations }: SingleTaskProps) {
55+
const params = useParams();
56+
const orgId = params.orgId as string;
57+
4758
// Use SWR hooks with initial data from server
4859
const {
4960
task,
@@ -107,40 +118,51 @@ export function SingleTask({ initialTask, initialAutomations }: SingleTaskProps)
107118
}
108119

109120
return (
110-
<div className="mx-auto max-w-6xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-500 py-8">
121+
<div className="mx-auto max-w-7xl px-6 animate-in fade-in slide-in-from-bottom-4 duration-500 py-6">
122+
{/* Breadcrumb */}
123+
<div className="mb-5">
124+
<Breadcrumb>
125+
<BreadcrumbList>
126+
<BreadcrumbItem>
127+
<BreadcrumbLink asChild>
128+
<Link
129+
href={`/${orgId}/tasks`}
130+
className="text-muted-foreground hover:text-foreground text-sm"
131+
>
132+
Tasks
133+
</Link>
134+
</BreadcrumbLink>
135+
</BreadcrumbItem>
136+
<BreadcrumbSeparator>
137+
<ChevronRight className="h-4 w-4" />
138+
</BreadcrumbSeparator>
139+
<BreadcrumbItem>
140+
<BreadcrumbLink asChild>
141+
<span className="text-foreground font-medium text-sm">{task.title}</span>
142+
</BreadcrumbLink>
143+
</BreadcrumbItem>
144+
</BreadcrumbList>
145+
</Breadcrumb>
146+
</div>
147+
111148
{/* Main Content Layout */}
112-
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
113-
{/* Left Column - Title, Description, Content */}
114-
<div className="lg:col-span-2">
149+
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
150+
{/* Left Column - Title, Description, Automations (Front & Center) */}
151+
<div className="lg:col-span-2 space-y-6">
115152
{/* Header Section */}
116-
<div className="mb-6">
117-
<h1 className="text-3xl font-semibold tracking-tight text-foreground mb-3">
118-
{task.title}
119-
</h1>
120-
{task.description && (
121-
<p className="text-base text-muted-foreground leading-relaxed">{task.description}</p>
122-
)}
123-
</div>
124-
125-
{/* Main Content Area */}
126-
<div className="space-y-4">
127-
<TaskMainContent task={task} showComments={false} />
128-
129-
{/* Comments Section - integrated */}
130-
<Comments
131-
entityId={task.id}
132-
entityType={CommentEntityType.task}
133-
variant="inline"
134-
title=""
135-
/>
136-
</div>
137-
</div>
138-
139-
{/* Right Column - Properties (starts at top) */}
140-
<div className="lg:col-span-1 space-y-4">
141-
<Card className="border border-border bg-card shadow-sm overflow-hidden">
142-
<div className="relative">
143-
<div className="absolute top-4 right-4 flex items-center gap-1 z-10">
153+
<div>
154+
<div className="flex items-start justify-between gap-4 mb-3">
155+
<div className="flex-1">
156+
<h1 className="text-2xl font-semibold tracking-tight text-foreground mb-2">
157+
{task.title}
158+
</h1>
159+
{task.description && (
160+
<p className="text-sm text-muted-foreground leading-relaxed">
161+
{task.description}
162+
</p>
163+
)}
164+
</div>
165+
<div className="flex items-center gap-1">
144166
<Button
145167
variant="ghost"
146168
size="icon"
@@ -160,15 +182,35 @@ export function SingleTask({ initialTask, initialAutomations }: SingleTaskProps)
160182
<Trash2 className="h-4 w-4" />
161183
</Button>
162184
</div>
163-
<div className="p-6">
164-
<TaskPropertiesSidebar handleUpdateTask={handleUpdateTask} />
165-
</div>
166185
</div>
167-
</Card>
168-
{/* Automations section */}
169-
<Card className="border border-border bg-card shadow-sm overflow-hidden">
186+
</div>
187+
188+
{/* Automations Section - Front & Center */}
189+
<div>
170190
<TaskAutomations automations={automations || []} />
171-
</Card>
191+
</div>
192+
193+
{/* Attachments - De-emphasized */}
194+
<div className="space-y-3">
195+
<TaskMainContent task={task} showComments={false} />
196+
</div>
197+
198+
{/* Comments Section */}
199+
<div>
200+
<Comments
201+
entityId={task.id}
202+
entityType={CommentEntityType.task}
203+
variant="inline"
204+
title=""
205+
/>
206+
</div>
207+
</div>
208+
209+
{/* Right Column - Properties */}
210+
<div className="lg:col-span-1">
211+
<div className="pl-6 border-l border-border">
212+
<TaskPropertiesSidebar handleUpdateTask={handleUpdateTask} />
213+
</div>
172214
</div>
173215
</div>
174216

0 commit comments

Comments
 (0)