Files
supervisor-ui/components/process/ProcessCard.tsx

188 lines
6.8 KiB
TypeScript
Raw Normal View History

'use client';
feat: implement Phase 7 - Signal Operations Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
2025-11-23 19:41:21 +01:00
import { useState } from 'react';
import { Play, Square, RotateCw, Activity, Zap, Terminal } from 'lucide-react';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { ProcessInfo, ProcessStateCode, getProcessStateClass, formatUptime, canStartProcess, canStopProcess } from '@/lib/supervisor/types';
import { useStartProcess, useStopProcess, useRestartProcess } from '@/lib/hooks/useSupervisor';
feat: implement Phase 7 - Signal Operations Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
2025-11-23 19:41:21 +01:00
import { SignalSender } from './SignalSender';
import { StdinInput } from './StdinInput';
import { cn } from '@/lib/utils/cn';
interface ProcessCardProps {
process: ProcessInfo;
isSelected?: boolean;
isFocused?: boolean;
onSelectionChange?: (processId: string, selected: boolean) => void;
}
export function ProcessCard({ process, isSelected = false, isFocused = false, onSelectionChange }: ProcessCardProps) {
feat: implement Phase 7 - Signal Operations Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
2025-11-23 19:41:21 +01:00
const [showSignalModal, setShowSignalModal] = useState(false);
const [showStdinModal, setShowStdinModal] = useState(false);
const startMutation = useStartProcess();
const stopMutation = useStopProcess();
const restartMutation = useRestartProcess();
const fullName = `${process.group}:${process.name}`;
const isLoading = startMutation.isPending || stopMutation.isPending || restartMutation.isPending;
const uptime = process.state === 20 ? formatUptime(process.start, process.now) : 'Not running';
const handleStart = () => startMutation.mutate({ name: fullName });
const handleStop = () => stopMutation.mutate({ name: fullName });
const handleRestart = () => restartMutation.mutate(fullName);
const handleCardClick = () => {
if (onSelectionChange) {
onSelectionChange(fullName, !isSelected);
}
};
return (
<Card
className={cn(
fix: resolve 7 critical UI issues - charts, layouts, and mobile responsiveness This commit fixes all reported UI issues across the dashboard: ## Issue 1: Chart Colors and Tooltips ✅ - Create chartColors utility with static hex colors for Recharts compatibility - Replace CSS variable colors (hsl(var(--))) with hex colors in all charts - Add custom tooltip styling with dark background and white text for readability - Fixes: ProcessStateChart, ProcessUptimeChart, GroupStatistics ## Issue 2: Process Card Heights ✅ - Add h-full and flex flex-col to ProcessCard component - Add auto-rows-fr to process grid layout - Ensures all cards have consistent heights regardless of content ## Issue 3: Batch Actions Button Labels ✅ - Simplify button labels from "Start Selected" to "Start" - Remove "Stop Selected" to "Stop", "Restart Selected" to "Restart" - Labels now always visible on all screen sizes ## Issue 4: Mobile Menu Background ✅ - Change mobile menu from semi-transparent (bg-background/95) to solid (bg-background) - Removes backdrop blur for better visibility ## Issue 5: Group Header Button Overflow ✅ - Add flex-wrap to button container in GroupCard - Stack buttons vertically on mobile (flex-col md:flex-row) - Buttons take full width on mobile, auto width on desktop ## Issue 6: Logs Search Input Overflow ✅ - Change LogSearch from max-w-md to w-full sm:flex-1 sm:max-w-md - Search input now full width on mobile, constrained on desktop ## Issue 7: Logs Action Button Overflow ✅ - Add flex-wrap to LogControls button container - Buttons wrap to new row when space is limited 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:52:35 +01:00
'transition-all hover:shadow-lg animate-fade-in h-full flex flex-col',
onSelectionChange && 'cursor-pointer',
isSelected && 'ring-2 ring-primary ring-offset-2',
isFocused && 'ring-2 ring-accent ring-offset-2 shadow-xl'
)}
onClick={onSelectionChange ? handleCardClick : undefined}
>
<CardHeader className="pb-3">
<div className="flex items-start justify-between">
<div className="flex items-center gap-3 flex-1">
{onSelectionChange && (
<div className="flex-shrink-0">
<input
type="checkbox"
checked={isSelected}
onChange={(e) => {
e.stopPropagation();
onSelectionChange(fullName, e.target.checked);
}}
className="h-4 w-4 rounded border-input text-primary focus:ring-2 focus:ring-primary focus:ring-offset-2"
/>
</div>
)}
<div className="flex-1">
<CardTitle className="text-lg">{process.name}</CardTitle>
<p className="text-sm text-muted-foreground mt-1">{process.group}</p>
</div>
</div>
<Badge
className={cn(
'ml-2',
getProcessStateClass(process.state as ProcessStateCode),
'border px-3 py-1 font-mono text-xs'
)}
>
{process.statename}
</Badge>
</div>
</CardHeader>
fix: resolve 7 critical UI issues - charts, layouts, and mobile responsiveness This commit fixes all reported UI issues across the dashboard: ## Issue 1: Chart Colors and Tooltips ✅ - Create chartColors utility with static hex colors for Recharts compatibility - Replace CSS variable colors (hsl(var(--))) with hex colors in all charts - Add custom tooltip styling with dark background and white text for readability - Fixes: ProcessStateChart, ProcessUptimeChart, GroupStatistics ## Issue 2: Process Card Heights ✅ - Add h-full and flex flex-col to ProcessCard component - Add auto-rows-fr to process grid layout - Ensures all cards have consistent heights regardless of content ## Issue 3: Batch Actions Button Labels ✅ - Simplify button labels from "Start Selected" to "Start" - Remove "Stop Selected" to "Stop", "Restart Selected" to "Restart" - Labels now always visible on all screen sizes ## Issue 4: Mobile Menu Background ✅ - Change mobile menu from semi-transparent (bg-background/95) to solid (bg-background) - Removes backdrop blur for better visibility ## Issue 5: Group Header Button Overflow ✅ - Add flex-wrap to button container in GroupCard - Stack buttons vertically on mobile (flex-col md:flex-row) - Buttons take full width on mobile, auto width on desktop ## Issue 6: Logs Search Input Overflow ✅ - Change LogSearch from max-w-md to w-full sm:flex-1 sm:max-w-md - Search input now full width on mobile, constrained on desktop ## Issue 7: Logs Action Button Overflow ✅ - Add flex-wrap to LogControls button container - Buttons wrap to new row when space is limited 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:52:35 +01:00
<CardContent className="space-y-4 flex-1 flex flex-col justify-between">
{/* Metrics */}
<div className="grid grid-cols-2 gap-3 text-sm">
<div>
<span className="text-muted-foreground">PID:</span>
<span className="ml-2 font-mono">{process.pid || 'N/A'}</span>
</div>
<div>
<span className="text-muted-foreground">Uptime:</span>
<span className="ml-2 font-mono">{uptime}</span>
</div>
{process.exitstatus !== 0 && (
<div className="col-span-2">
<span className="text-muted-foreground">Exit Status:</span>
<span className="ml-2 font-mono text-destructive">{process.exitstatus}</span>
</div>
)}
</div>
{/* Error Description */}
{process.spawnerr && (
<div className="rounded-md bg-destructive/10 p-2 text-xs text-destructive border border-destructive/20">
{process.spawnerr}
</div>
)}
{/* Actions */}
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
<div className="flex flex-wrap gap-2" onClick={(e) => e.stopPropagation()}>
<Button
size="sm"
variant="success"
onClick={handleStart}
disabled={!canStartProcess(process.state as ProcessStateCode) || isLoading}
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
className="flex-1 min-w-[100px]"
>
<Play className="h-4 w-4" />
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
<span className="hidden sm:inline">Start</span>
</Button>
<Button
size="sm"
variant="warning"
onClick={handleStop}
disabled={!canStopProcess(process.state as ProcessStateCode) || isLoading}
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
className="flex-1 min-w-[100px]"
>
<Square className="h-4 w-4" />
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
<span className="hidden sm:inline">Stop</span>
</Button>
<Button
size="sm"
variant="outline"
onClick={handleRestart}
disabled={process.state === 0 || isLoading}
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
title="Restart"
className="flex-1 sm:flex-initial"
>
<RotateCw className={cn('h-4 w-4', isLoading && 'animate-spin-slow')} />
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
<span className="sm:hidden">Restart</span>
</Button>
feat: implement Phase 7 - Signal Operations Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
2025-11-23 19:41:21 +01:00
<Button
size="sm"
variant="outline"
onClick={() => setShowSignalModal(true)}
disabled={process.state === 0}
title="Send Signal"
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
className="flex-1 sm:flex-initial"
feat: implement Phase 7 - Signal Operations Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
2025-11-23 19:41:21 +01:00
>
<Zap className="h-4 w-4" />
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
<span className="sm:hidden">Signal</span>
feat: implement Phase 7 - Signal Operations Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
2025-11-23 19:41:21 +01:00
</Button>
<Button
size="sm"
variant="outline"
onClick={() => setShowStdinModal(true)}
disabled={process.state !== 20}
title="Send Stdin"
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
className="flex-1 sm:flex-initial"
>
<Terminal className="h-4 w-4" />
feat: comprehensive responsive design implementation for mobile devices This commit implements a complete responsive design overhaul making the Supervisor UI fully mobile-friendly and beautiful across all devices (320px phones to 4K displays). ## Phase 1: Mobile Navigation - Add hamburger menu to Navbar with slide-out drawer - Auto-close on navigation with body scroll lock - Responsive logo sizing ## Phase 2: Touch-Friendly Buttons - Increase touch targets to 44px on mobile (36px for small buttons) - Add responsive button layouts in ProcessCard - Flex-wrap prevents cramped button rows ## Phase 3: Responsive Spacing & Typography - Add responsive padding to Card components (p-4 md:p-6) - Scale typography across breakpoints (text-xl md:text-2xl) - Responsive spacing in AppLayout and all pages ## Phase 4: Mobile-Friendly Tables - Dual layout for ConfigTable: table on desktop, cards on mobile - Preserve all data with proper formatting and wrapping - Hide table on mobile, show card-based layout ## Phase 5: Modal Improvements - Add horizontal padding (p-4) to all modals - Prevent edge-touching on mobile devices - Fixed SignalSender, KeyboardShortcutsHelp, StdinInput modals ## Phase 6: Page-Specific Layouts - Processes page: responsive header, controls, and grid spacing - BatchActions bar: full-width on mobile, centered on desktop - Logs page: responsive controls and height calculations - Config page: responsive header and error states ## Phase 7: Polish & Final Touches - Add viewport meta tag to layout - Responsive empty states and loading skeletons - Consistent responsive sizing across all error messages - Mobile-first typography scaling 🎉 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:21:22 +01:00
<span className="sm:hidden">Stdin</span>
</Button>
</div>
{/* Description */}
{process.description && process.description !== 'pid ' + process.pid && (
<p className="text-xs text-muted-foreground italic">
{process.description}
</p>
)}
</CardContent>
feat: implement Phase 7 - Signal Operations Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
2025-11-23 19:41:21 +01:00
{/* Signal Modal */}
{showSignalModal && (
<SignalSender processName={fullName} onClose={() => setShowSignalModal(false)} />
)}
{/* Stdin Modal */}
{showStdinModal && (
<StdinInput processName={fullName} onClose={() => setShowStdinModal(false)} />
)}
</Card>
);
}