flatten app to repo root and update docker deployment for single-stack runtime

This commit is contained in:
2026-02-24 00:25:03 -05:00
parent 2987ac06fa
commit 168c05cb71
59 changed files with 64 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
import { cn } from '@/lib/utils';
type MetricCardProps = {
label: string;
value: string;
delta?: string;
positive?: boolean;
className?: string;
};
export function MetricCard({ label, value, delta, positive = true, className }: MetricCardProps) {
return (
<div className={cn('rounded-xl border border-[color:var(--line-weak)] bg-[color:var(--panel-soft)] p-4', className)}>
<p className="text-xs uppercase tracking-[0.2em] text-[color:var(--terminal-muted)]">{label}</p>
<p className="mt-2 text-2xl font-semibold text-[color:var(--terminal-bright)]">{value}</p>
{delta ? (
<p className={cn('mt-2 text-xs', positive ? 'text-[#96f5bf]' : 'text-[#ff9898]')}>
{delta}
</p>
) : null}
</div>
);
}

View File

@@ -0,0 +1,36 @@
import { formatDistanceToNow } from 'date-fns';
import type { Task } from '@/lib/types';
import { StatusPill } from '@/components/ui/status-pill';
type TaskFeedProps = {
tasks: Task[];
};
const taskLabels: Record<Task['task_type'], string> = {
sync_filings: 'Sync filings',
refresh_prices: 'Refresh prices',
analyze_filing: 'Analyze filing',
portfolio_insights: 'Portfolio insights'
};
export function TaskFeed({ tasks }: TaskFeedProps) {
if (tasks.length === 0) {
return <p className="text-sm text-[color:var(--terminal-muted)]">No recent tasks.</p>;
}
return (
<ul className="space-y-2">
{tasks.slice(0, 8).map((task) => (
<li key={task.id} className="flex items-center justify-between rounded-lg border border-[color:var(--line-weak)] bg-[color:var(--panel-soft)] px-3 py-2">
<div>
<p className="text-sm text-[color:var(--terminal-bright)]">{taskLabels[task.task_type]}</p>
<p className="text-xs text-[color:var(--terminal-muted)]">
{formatDistanceToNow(new Date(task.created_at), { addSuffix: true })}
</p>
</div>
<StatusPill status={task.status} />
</li>
))}
</ul>
);
}