mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-14 02:42:04 +08:00
Add API error monitoring tests and error context snapshots for various browsers
- Created error context snapshots for Firefox, WebKit, and Chromium to capture UI state during API error monitoring. - Implemented e2e tests for API error detection, including console errors, failed API requests, and proxy errors. - Added functionality to ignore specific API patterns in monitoring assertions. - Ensured tests validate the monitoring system's ability to detect and report errors effectively.
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useHistory } from '@/hooks/useHistory';
|
||||
import { ConversationCard } from '@/components/shared/ConversationCard';
|
||||
import { CliStreamPanel } from '@/components/shared/CliStreamPanel';
|
||||
import { Button } from '@/components/ui/Button';
|
||||
import { Input } from '@/components/ui/Input';
|
||||
import {
|
||||
@@ -35,6 +36,7 @@ import {
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuLabel,
|
||||
} from '@/components/ui/Dropdown';
|
||||
import type { CliExecution } from '@/lib/api';
|
||||
|
||||
/**
|
||||
* HistoryPage component - Display CLI execution history
|
||||
@@ -46,6 +48,8 @@ export function HistoryPage() {
|
||||
const [deleteDialogOpen, setDeleteDialogOpen] = React.useState(false);
|
||||
const [deleteType, setDeleteType] = React.useState<'single' | 'tool' | 'all' | null>(null);
|
||||
const [deleteTarget, setDeleteTarget] = React.useState<string | null>(null);
|
||||
const [selectedExecution, setSelectedExecution] = React.useState<string | null>(null);
|
||||
const [isPanelOpen, setIsPanelOpen] = React.useState(false);
|
||||
|
||||
const {
|
||||
executions,
|
||||
@@ -78,6 +82,12 @@ export function HistoryPage() {
|
||||
|
||||
const hasActiveFilters = searchQuery.length > 0 || toolFilter !== undefined;
|
||||
|
||||
// Card click handler - open execution details panel
|
||||
const handleCardClick = (execution: CliExecution) => {
|
||||
setSelectedExecution(execution.id);
|
||||
setIsPanelOpen(true);
|
||||
};
|
||||
|
||||
// Delete handlers
|
||||
const handleDeleteClick = (id: string) => {
|
||||
setDeleteType('single');
|
||||
@@ -263,6 +273,7 @@ export function HistoryPage() {
|
||||
<ConversationCard
|
||||
key={execution.id}
|
||||
execution={execution}
|
||||
onClick={handleCardClick}
|
||||
onDelete={handleDeleteClick}
|
||||
actionsDisabled={isDeleting}
|
||||
/>
|
||||
@@ -270,6 +281,13 @@ export function HistoryPage() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* CLI Stream Panel */}
|
||||
<CliStreamPanel
|
||||
executionId={selectedExecution || ''}
|
||||
open={isPanelOpen}
|
||||
onOpenChange={setIsPanelOpen}
|
||||
/>
|
||||
|
||||
{/* Delete Confirmation Dialog */}
|
||||
<Dialog open={deleteDialogOpen} onOpenChange={setDeleteDialogOpen}>
|
||||
<DialogContent>
|
||||
|
||||
Reference in New Issue
Block a user