-
-
Notifications
You must be signed in to change notification settings - Fork 767
Improving Task Card Title Readability #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
65dc661
e0bf84e
49fc206
5d81afd
ff6febd
f6f9f8f
9089d44
5d7464b
c941997
6e2a945
30d15ea
74e1823
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -268,15 +268,24 @@ export const TaskCard = memo(function TaskCard({ task, onClick }: TaskCardProps) | |
| onClick={onClick} | ||
| > | ||
| <CardContent className="p-4"> | ||
| {/* Header - improved visual hierarchy */} | ||
| <div className="flex items-start justify-between gap-3"> | ||
| <h3 | ||
| className="font-semibold text-sm text-foreground line-clamp-2 leading-snug flex-1 min-w-0" | ||
| title={task.title} | ||
| > | ||
| {task.title} | ||
| </h3> | ||
| <div className="flex items-center gap-1.5 shrink-0 flex-wrap justify-end max-w-[180px]"> | ||
| {/* Title - full width, no wrapper */} | ||
| <h3 | ||
| className="font-semibold text-sm text-foreground line-clamp-2 leading-snug" | ||
| title={task.title} | ||
| > | ||
| {task.title} | ||
| </h3> | ||
|
|
||
| {/* Description - sanitized to handle markdown content (memoized) */} | ||
| {sanitizedDescription && ( | ||
| <p className="mt-2 text-xs text-muted-foreground line-clamp-2"> | ||
| {sanitizedDescription} | ||
| </p> | ||
| )} | ||
|
|
||
| {/* Metadata badges */} | ||
| {(task.metadata || isStuck || isIncomplete || hasActiveExecution || reviewReasonInfo) && ( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Status badge hidden for tasks without metadataThe condition |
||
| <div className="mt-2.5 flex flex-wrap gap-1.5"> | ||
| {/* Stuck indicator - highest priority */} | ||
| {isStuck && ( | ||
| <Badge | ||
|
|
@@ -338,21 +347,8 @@ export const TaskCard = memo(function TaskCard({ task, onClick }: TaskCardProps) | |
| {reviewReasonInfo.label} | ||
| </Badge> | ||
| )} | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Description - sanitized to handle markdown content (memoized) */} | ||
| {sanitizedDescription && ( | ||
| <p className="mt-2 text-xs text-muted-foreground line-clamp-2"> | ||
| {sanitizedDescription} | ||
| </p> | ||
| )} | ||
|
|
||
| {/* Metadata badges */} | ||
| {task.metadata && ( | ||
| <div className="mt-2.5 flex flex-wrap gap-1.5"> | ||
| {/* Category badge with icon */} | ||
| {task.metadata.category && ( | ||
| {task.metadata?.category && ( | ||
| <Badge | ||
| variant="outline" | ||
| className={cn('text-[10px] px-1.5 py-0', TASK_CATEGORY_COLORS[task.metadata.category])} | ||
|
|
@@ -367,7 +363,7 @@ export const TaskCard = memo(function TaskCard({ task, onClick }: TaskCardProps) | |
| </Badge> | ||
| )} | ||
| {/* Impact badge - high visibility for important tasks */} | ||
| {task.metadata.impact && (task.metadata.impact === 'high' || task.metadata.impact === 'critical') && ( | ||
| {task.metadata?.impact && (task.metadata.impact === 'high' || task.metadata.impact === 'critical') && ( | ||
| <Badge | ||
| variant="outline" | ||
| className={cn('text-[10px] px-1.5 py-0', TASK_IMPACT_COLORS[task.metadata.impact])} | ||
|
|
@@ -376,7 +372,7 @@ export const TaskCard = memo(function TaskCard({ task, onClick }: TaskCardProps) | |
| </Badge> | ||
| )} | ||
| {/* Complexity badge */} | ||
| {task.metadata.complexity && ( | ||
| {task.metadata?.complexity && ( | ||
| <Badge | ||
| variant="outline" | ||
| className={cn('text-[10px] px-1.5 py-0', TASK_COMPLEXITY_COLORS[task.metadata.complexity])} | ||
|
|
@@ -385,7 +381,7 @@ export const TaskCard = memo(function TaskCard({ task, onClick }: TaskCardProps) | |
| </Badge> | ||
| )} | ||
| {/* Priority badge - only show urgent/high */} | ||
| {task.metadata.priority && (task.metadata.priority === 'urgent' || task.metadata.priority === 'high') && ( | ||
| {task.metadata?.priority && (task.metadata.priority === 'urgent' || task.metadata.priority === 'high') && ( | ||
| <Badge | ||
| variant="outline" | ||
| className={cn('text-[10px] px-1.5 py-0', TASK_PRIORITY_COLORS[task.metadata.priority])} | ||
|
|
@@ -394,12 +390,12 @@ export const TaskCard = memo(function TaskCard({ task, onClick }: TaskCardProps) | |
| </Badge> | ||
| )} | ||
| {/* Security severity - always show */} | ||
| {task.metadata.securitySeverity && ( | ||
| {task.metadata?.securitySeverity && ( | ||
| <Badge | ||
| variant="outline" | ||
| className={cn('text-[10px] px-1.5 py-0', TASK_IMPACT_COLORS[task.metadata.securitySeverity])} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 HIGH - Hardcoded user-facing text not internationalized Category: style Description: Suggestion: Confidence: 95% |
||
| > | ||
| {task.metadata.securitySeverity} severity | ||
| {task.metadata.securitySeverity} {t('metadata.severity')} | ||
| </Badge> | ||
| )} | ||
|
Comment on lines
+393
to
400
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Good i18n fix for severity label. The translation key Consider fully localizing the severity level value as well (e.g., 🤖 Prompt for AI Agents |
||
| </div> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition to render the badge container is a bit too broad. If
task.metadatais an object with properties that don't result in a badge (e.g.,{ sourceType: 'manual' }), and no status badges are active, this will render an empty<div>with a top margin, causing a minor layout issue. You should make the condition more specific to only render the container if there's at least one badge to display.