diff --git a/.roomodes b/.roomodes new file mode 100644 index 0000000000..df27e76ba3 --- /dev/null +++ b/.roomodes @@ -0,0 +1,34 @@ +customModes: + - slug: designer + name: 🎨 Designer + roleDefinition: >- + You are Roo, a UI/UX expert specializing in design systems, user interface design, and frontend development. Your expertise includes: + - Creating and maintaining design systems and component libraries + - Implementing responsive and accessible web interfaces + - Working with CSS, HTML, Tailwind CSS, and modern frontend frameworks like React and Next.js + - Ensuring consistent user experiences across platforms and devices + - Optimizing user flows and interaction patterns + - Creating visually appealing and functional interfaces + - Following modern design principles and accessibility standards + whenToUse: >- + Use this mode when creating or modifying UI components, implementing design systems, + working on visual design improvements, ensuring responsive web interfaces, or focusing + on user experience enhancements. This mode is especially effective for CSS styling, + component design, layout improvements, and frontend framework implementations. + groups: + - read + - edit + - browser + - command + - mcp + customInstructions: >- + When working in Designer mode, prioritize: + - User experience and accessibility + - Responsive design principles + - Consistent design patterns and component reusability + - Modern CSS practices and Tailwind CSS utilities + - Clean, semantic HTML structure + - Performance optimization for frontend assets + - Cross-browser compatibility + - Design system consistency + Always consider the visual impact and user interaction flow when making changes. \ No newline at end of file diff --git a/src/app/(authenticated)/usage/Tasks.tsx b/src/app/(authenticated)/usage/Tasks.tsx index 576a6d86e4..76a7256455 100644 --- a/src/app/(authenticated)/usage/Tasks.tsx +++ b/src/app/(authenticated)/usage/Tasks.tsx @@ -59,7 +59,7 @@ export const Tasks = ({ } return ( -
+
{tasks.map((task) => ( { return ( <> -
+
-
+
{viewModes.map((mode) => ( diff --git a/src/components/usage/Metric.tsx b/src/components/usage/Metric.tsx index 49a36c80ef..70cbc7d622 100644 --- a/src/components/usage/Metric.tsx +++ b/src/components/usage/Metric.tsx @@ -8,12 +8,12 @@ type MetricProps = { }; export const Metric = ({ label, value, isPending }: MetricProps) => ( -
-
{label}
-
+
+
{label}
+
{isPending ? (
- +
) : typeof value === 'number' ? ( formatNumber(value) diff --git a/src/components/usage/TaskCard.tsx b/src/components/usage/TaskCard.tsx index 6eb613d4be..57ce1dafac 100644 --- a/src/components/usage/TaskCard.tsx +++ b/src/components/usage/TaskCard.tsx @@ -1,8 +1,4 @@ -import { - formatNumber, - formatCurrency, - formatTimestamp, -} from '@/lib/formatters'; +import { formatNumber, formatCurrency } from '@/lib/formatters'; import { generateFallbackTitle } from '@/lib/taskUtils'; import { Card, CardContent, Button } from '@/components/ui'; @@ -16,6 +12,27 @@ type TaskCardProps = { onTaskSelected: (task: TaskWithUser) => void; }; +// Helper function for elegant timestamp display +const formatElegantTime = (timestamp: number): string => { + const date = new Date(timestamp * 1000); + const now = new Date(); + + // Check if it's today + if (date.toDateString() === now.toDateString()) { + return date.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }); + } + + // Check if it's yesterday + const yesterday = new Date(now); + yesterday.setDate(now.getDate() - 1); + if (date.toDateString() === yesterday.toDateString()) { + return 'Yesterday'; + } + + // Otherwise return a short date format + return date.toLocaleDateString([], { month: 'short', day: 'numeric' }); +}; + export const TaskCard = ({ task, onFilter, onTaskSelected }: TaskCardProps) => { return ( { onClick={() => onTaskSelected(task)} > -
- {/* First line - Title and Status */} -
+
+ {/* Line 1: Title and Status */} +

{task.title || generateFallbackTitle(task)}

- {/* Second line - All metadata */} -
-
- {formatTimestamp(task.timestamp)} + {/* Line 2: All metadata in a single line with bullet separators between items */} +
+ {/* Left side: Date, User, and Mode (if present) with bullet separators */} +
+ + {formatElegantTime(task.timestamp)} + +
•
+ + {/* Mode (if present) */} {task.mode && ( - - {task.mode} - + <> +
•
+ + {task.mode} + + )} -
- {/* Metrics on the right */} -
+ {/* Right side: Tokens and Cost with bullet separator */} +
{formatNumber(task.tokens)} tokens +
•
{formatCurrency(task.cost)}
diff --git a/src/components/usage/UsageCard.tsx b/src/components/usage/UsageCard.tsx index cef4c07d00..8ad568ce98 100644 --- a/src/components/usage/UsageCard.tsx +++ b/src/components/usage/UsageCard.tsx @@ -64,20 +64,21 @@ export const UsageCard = () => { )} -
-
+
+
{timePeriods.map((period) => ( ))}
-
+