Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions frontend/app/analysis/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React, { useState } from 'react';
import { MainLayout } from '@/components/layout/MainLayout';
import { Card, CardHeader, Button, LoadingSpinner, Badge } from '@/components/shared';
import { Card, CardHeader, Button, LoadingSpinner, Badge, Breadcrumbs } from '@/components/shared';
import { useAnalysisHistory } from '@/lib/hooks/useAnalysis';
import { formatDateTime, formatRelativeTime } from '@/lib/utils/formatters';
import { DEFAULT_PAGE_SIZE, PAGE_SIZES } from '@/lib/utils/constants';
Expand Down Expand Up @@ -115,29 +115,34 @@ export default function AnalysisHistoryPage() {
return (
<MainLayout>
<div className="space-y-6">
{/* Header */}
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div>
<h1 className="text-h1 text-gray-900 dark:text-gray-100">Analysis History</h1>
<p className="text-body text-gray-500 dark:text-gray-400 mt-1">
View all past analysis runs
</p>
</div>

<div className="flex items-center gap-3">
<Button
variant="secondary"
onClick={handleClearHistory}
className="gap-2"
disabled={runs.length === 0}
>
<TrashIcon className="h-4 w-4" />
Clear History
</Button>
<Button variant="primary" onClick={handleRefresh} className="gap-2">
<ArrowPathIcon className="h-4 w-4" />
Refresh
</Button>
{/* AWS-style Header with Breadcrumbs */}
<div className="space-y-2">
<Breadcrumbs items={[
{ label: 'Analysis & Insights', href: '/analysis' },
{ label: 'Analysis History' }
]} />
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div>
<h1 className="text-h1 text-gray-900 dark:text-gray-100">Analysis History</h1>
<p className="text-body text-gray-500 dark:text-gray-400 mt-1">
View and review all past analysis executions
</p>
</div>
<div className="flex items-center gap-3">
<Button
variant="secondary"
onClick={handleClearHistory}
className="gap-2"
disabled={runs.length === 0}
>
<TrashIcon className="h-4 w-4" />
Clear History
</Button>
<Button variant="primary" onClick={handleRefresh} className="gap-2">
<ArrowPathIcon className="h-4 w-4" />
Refresh
</Button>
</div>
</div>
</div>

Expand Down
Loading
Loading