diff --git a/packages/extension/src/components/HistoryList.tsx b/packages/extension/src/components/HistoryList.tsx index 597e2cc..e582364 100644 --- a/packages/extension/src/components/HistoryList.tsx +++ b/packages/extension/src/components/HistoryList.tsx @@ -1,4 +1,12 @@ -import { ArrowDownToLine, ArrowLeft, CheckCircle, RotateCcw, Trash2, XCircle } from 'lucide-react' +import { + ArrowDownToLine, + ArrowLeft, + CheckCircle, + History, + RotateCcw, + Trash2, + XCircle, +} from 'lucide-react' import { useCallback, useEffect, useState } from 'react' import { Button } from '@/components/ui/button' @@ -29,8 +37,13 @@ export function HistoryList({ const [loading, setLoading] = useState(true) const load = useCallback(async () => { - setSessions(await listSessions()) - setLoading(false) + try { + setSessions(await listSessions()) + } catch (err) { + console.error('[HistoryList] Failed to load sessions:', err) + } finally { + setLoading(false) + } }, []) useEffect(() => { @@ -57,7 +70,14 @@ export function HistoryList({
{/* Header */}
- History @@ -80,14 +100,23 @@ export function HistoryList({ {/* List */}
{loading && ( -
- Loading... +
+ {[...Array(4)].map((_, i) => ( +
+
+
+
+
+
+
+ ))}
)} {!loading && sessions.length === 0 && ( -
- No history yet +
+ +

No history yet

)} diff --git a/packages/extension/src/entrypoints/sidepanel/App.tsx b/packages/extension/src/entrypoints/sidepanel/App.tsx index 02af824..8fe5c17 100644 --- a/packages/extension/src/entrypoints/sidepanel/App.tsx +++ b/packages/extension/src/entrypoints/sidepanel/App.tsx @@ -147,6 +147,8 @@ export default function App() { size="icon-sm" onClick={() => setView({ name: 'history' })} className="cursor-pointer" + aria-label="History" + title="History" > @@ -155,6 +157,8 @@ export default function App() { size="icon-sm" onClick={() => setView({ name: 'config' })} className="cursor-pointer" + aria-label="Settings" + title="Settings" > @@ -205,6 +209,8 @@ export default function App() { variant="destructive" onClick={handleStop} className="size-7" + aria-label="Stop task" + title="Stop task" > @@ -215,6 +221,8 @@ export default function App() { onClick={() => handleSubmit()} disabled={!inputValue.trim()} className="size-7 cursor-pointer" + aria-label="Send" + title="Send" >