Files
supervisor-ui/app/processes/page.tsx

279 lines
9.5 KiB
TypeScript
Raw Normal View History

'use client';
import { useState, useCallback, useRef, useEffect } from 'react';
import { useProcesses } from '@/lib/hooks/useSupervisor';
import { ProcessCard } from '@/components/process/ProcessCard';
import { GroupView } from '@/components/groups/GroupView';
import { GroupSelector } from '@/components/groups/GroupSelector';
import { BatchActions } from '@/components/process/BatchActions';
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
import { ProcessFilters } from '@/components/process/ProcessFilters';
import { RefreshCw, AlertCircle, CheckSquare, Keyboard } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { useKeyboardShortcuts } from '@/lib/hooks/useKeyboardShortcuts';
import { KeyboardShortcutsHelp } from '@/components/ui/KeyboardShortcutsHelp';
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
import type { ProcessInfo } from '@/lib/supervisor/types';
export default function ProcessesPage() {
const [viewMode, setViewMode] = useState<'flat' | 'grouped'>('flat');
const [selectedProcesses, setSelectedProcesses] = useState<Set<string>>(new Set());
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
const [filteredProcesses, setFilteredProcesses] = useState<ProcessInfo[]>([]);
const [showShortcutsHelp, setShowShortcutsHelp] = useState(false);
const [focusedIndex, setFocusedIndex] = useState<number>(-1);
const searchInputRef = useRef<HTMLInputElement>(null);
const { data: processes, isLoading, isError, refetch } = useProcesses();
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
const handleFilterChange = useCallback((filtered: ProcessInfo[]) => {
setFilteredProcesses(filtered);
}, []);
const handleSelectionChange = (processId: string, selected: boolean) => {
setSelectedProcesses((prev) => {
const newSet = new Set(prev);
if (selected) {
newSet.add(processId);
} else {
newSet.delete(processId);
}
return newSet;
});
};
const handleSelectAll = () => {
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
const displayedProcesses = filteredProcesses.length > 0 ? filteredProcesses : (processes || []);
if (displayedProcesses) {
if (selectedProcesses.size === displayedProcesses.length) {
setSelectedProcesses(new Set());
} else {
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
setSelectedProcesses(new Set(displayedProcesses.map((p) => `${p.group}:${p.name}`)));
}
}
};
const handleClearSelection = () => {
setSelectedProcesses(new Set());
};
// Get displayedProcesses for keyboard navigation
const displayedProcesses = filteredProcesses.length > 0 || !processes ? filteredProcesses : (processes || []);
// Keyboard shortcuts
useKeyboardShortcuts({
shortcuts: [
{
key: '/',
description: 'Focus search',
action: () => {
// Find and focus the search input
const searchInput = document.querySelector('input[type="text"]') as HTMLInputElement;
if (searchInput) {
searchInput.focus();
}
},
},
{
key: 'r',
description: 'Refresh',
action: () => {
refetch();
},
},
{
key: 'a',
description: 'Select all',
action: () => {
if (viewMode === 'flat') {
handleSelectAll();
}
},
enabled: viewMode === 'flat' && displayedProcesses.length > 0,
},
{
key: 'Escape',
description: 'Clear selection',
action: () => {
if (selectedProcesses.size > 0) {
handleClearSelection();
}
setFocusedIndex(-1);
},
},
{
key: '?',
shift: true,
description: 'Show keyboard shortcuts',
action: () => {
setShowShortcutsHelp(true);
},
},
{
key: 'j',
description: 'Next process',
action: () => {
if (viewMode === 'flat' && displayedProcesses.length > 0) {
setFocusedIndex((prev) => {
const next = prev + 1;
return next >= displayedProcesses.length ? 0 : next;
});
}
},
enabled: viewMode === 'flat' && displayedProcesses.length > 0,
},
{
key: 'k',
description: 'Previous process',
action: () => {
if (viewMode === 'flat' && displayedProcesses.length > 0) {
setFocusedIndex((prev) => {
const next = prev - 1;
return next < 0 ? displayedProcesses.length - 1 : next;
});
}
},
enabled: viewMode === 'flat' && displayedProcesses.length > 0,
},
{
key: ' ',
description: 'Toggle selection',
action: () => {
if (viewMode === 'flat' && focusedIndex >= 0 && focusedIndex < displayedProcesses.length) {
const process = displayedProcesses[focusedIndex];
const fullName = `${process.group}:${process.name}`;
handleSelectionChange(fullName, !selectedProcesses.has(fullName));
}
},
enabled: viewMode === 'flat' && focusedIndex >= 0 && displayedProcesses.length > 0,
},
],
});
// Auto-select focused process
useEffect(() => {
if (focusedIndex >= 0 && focusedIndex < displayedProcesses.length) {
const process = displayedProcesses[focusedIndex];
const fullName = `${process.group}:${process.name}`;
const element = document.querySelector(`[data-process-id="${fullName}"]`);
if (element) {
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
}
}, [focusedIndex, displayedProcesses]);
if (isLoading) {
return (
<div className="space-y-6">
<h1 className="text-3xl font-bold">Processes</h1>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
{[1, 2, 3, 4, 5, 6].map((i) => (
<div key={i} className="h-64 bg-muted rounded-lg animate-pulse" />
))}
</div>
</div>
);
}
if (isError) {
return (
<div className="space-y-6">
<h1 className="text-3xl font-bold">Processes</h1>
<div className="flex flex-col items-center justify-center p-12 text-center">
<AlertCircle className="h-12 w-12 text-destructive mb-4" />
<h2 className="text-xl font-semibold mb-2">Failed to load processes</h2>
<p className="text-muted-foreground mb-4">
Could not connect to Supervisor. Please check your configuration.
</p>
<Button onClick={() => refetch()}>
<RefreshCw className="h-4 w-4 mr-2" />
Retry
</Button>
</div>
</div>
);
}
return (
<div className="space-y-6 animate-fade-in">
<div className="flex items-center justify-between">
<div>
<h1 className="text-3xl font-bold">Processes</h1>
<p className="text-muted-foreground mt-1">
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
{displayedProcesses.length} of {processes?.length ?? 0} processes
{displayedProcesses.length !== (processes?.length ?? 0) && ' (filtered)'}
</p>
</div>
<div className="flex items-center gap-4">
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
{viewMode === 'flat' && displayedProcesses.length > 0 && (
<Button
variant="outline"
size="sm"
onClick={handleSelectAll}
className="gap-2"
>
<CheckSquare className="h-4 w-4" />
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
{selectedProcesses.size === displayedProcesses.length ? 'Deselect All' : 'Select All'}
</Button>
)}
<GroupSelector viewMode={viewMode} onViewModeChange={setViewMode} />
<Button variant="outline" onClick={() => refetch()}>
<RefreshCw className="h-4 w-4 mr-2" />
Refresh
</Button>
<Button
variant="outline"
size="sm"
onClick={() => setShowShortcutsHelp(true)}
title="Keyboard Shortcuts (Shift+?)"
>
<Keyboard className="h-4 w-4" />
</Button>
</div>
</div>
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
{/* Filters */}
{processes && processes.length > 0 && (
<ProcessFilters processes={processes} onFilterChange={handleFilterChange} />
)}
{/* Process Display */}
{processes && processes.length === 0 ? (
<div className="flex flex-col items-center justify-center p-12 text-center border-2 border-dashed rounded-lg">
<p className="text-muted-foreground">No processes configured</p>
</div>
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
) : displayedProcesses.length === 0 ? (
<div className="flex flex-col items-center justify-center p-12 text-center border-2 border-dashed rounded-lg">
<p className="text-muted-foreground">No processes match the current filters</p>
</div>
) : viewMode === 'grouped' ? (
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
<GroupView processes={displayedProcesses} />
) : (
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
{displayedProcesses.map((process, index) => {
const fullName = `${process.group}:${process.name}`;
const isFocused = index === focusedIndex;
return (
<div key={fullName} data-process-id={fullName}>
<ProcessCard
process={process}
isSelected={selectedProcesses.has(fullName)}
onSelectionChange={handleSelectionChange}
isFocused={isFocused}
/>
</div>
);
})}
</div>
)}
<BatchActions
selectedProcesses={selectedProcesses}
feat: implement Phase 6 - Search and Filtering Features added: - Advanced search and filtering for processes - Real-time search by name, group, or description - Filter by process state (All, Running, Stopped, Fatal, Starting, Stopping) - Filter by process group - Collapsible filter panel - Clear all filters button - Filter count indicator Implementation details: - Created ProcessFilters component with: - Search input with clear button and search icon - State filter buttons with color indicators - Group filter buttons (auto-generated from available groups) - Toggle filters panel button - Active filters detection and clear button Processes page enhancements: - Integrated ProcessFilters component - Real-time filtering with useEffect - Display count shows "X of Y processes (filtered)" - Select All works on filtered results - Empty state when no matches: "No processes match the current filters" - Filters apply to both flat and grouped views Filter features: - Search: Live filtering as you type (name, group, description) - State filter: 6 filter options with colored dots - Group filter: Dynamic buttons for each unique group - Clear filters: Single button to reset all filters - Collapsible panel: Show/hide filters to save space - Active filter indicator: Clear button appears when filters active UX improvements: - Search input with X button to clear - Filter button toggles panel (highlighted when active) - Color-coded state buttons matching process states - Responsive layout with flex-wrap for many groups - Maintains selection state across filter changes Phase 6 complete (2-3 hours estimated)
2025-11-23 19:29:23 +01:00
processes={displayedProcesses}
onClearSelection={handleClearSelection}
/>
{/* Keyboard Shortcuts Help */}
{showShortcutsHelp && (
<KeyboardShortcutsHelp onClose={() => setShowShortcutsHelp(false)} />
)}
</div>
);
}