docs: add comprehensive JSDoc comments to TUI components

Improves documentation across all TUI files:
- App.tsx: Main component with keyboard shortcuts reference
- index.tsx: Entry point with usage examples
- useSessionManager.ts: Hook with detailed API documentation
- All components: Props, returns, and behavior descriptions
- Helper functions: Parameter and return type documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-21 06:44:06 +01:00
co-authored by Claude Opus 4.5
parent c00ce747c1
commit 1da51c38d8
9 changed files with 304 additions and 55 deletions
+19 -3
View File
@@ -1,8 +1,16 @@
/**
* @fileoverview HelpOverlay component
*
* Full-screen overlay showing all keyboard shortcuts.
* Dismissible with Escape, q, or ?.
* Full-screen help overlay displaying all TUI keyboard shortcuts.
*
* @description
* Shows a comprehensive reference of keyboard shortcuts organized by context:
* - Start Screen: Session list navigation and actions
* - Main View - Navigation: Tab switching and screen navigation
* - Main View - Session Management: Create, close, kill sessions
* - General: Help toggle and exit
*
* Dismissible with Escape, q, or ? keys.
*/
import React from 'react';
@@ -57,7 +65,15 @@ const SHORTCUT_GROUPS: ShortcutGroup[] = [
];
/**
* HelpOverlay component showing keyboard shortcuts
* Help overlay component displaying keyboard shortcuts reference.
*
* @description
* Renders a full-screen overlay with categorized keyboard shortcuts.
* Uses consistent styling with bordered header and grouped sections.
*
* @param props - Component props
* @param props.onClose - Callback invoked when overlay should close
* @returns The help overlay element
*/
export function HelpOverlay({ onClose }: HelpOverlayProps): React.ReactElement {
return (