This document describes the four major developer tools implemented in this update:
Location: src/lib/keyboard/shortcuts.ts, src/components/keyboard/
Features:
- Command Palette: Open with
Cmd/Ctrl+Kfor fuzzy search across all commands - 50+ Default Shortcuts: Navigation, actions, view controls, utilities
- Context-Aware Shortcuts: Shortcuts that only work in specific contexts
- Conflict Detection: Automatic detection of shortcut conflicts (browser and OS)
- Customization: Import/export shortcut configurations
- Shortcut Cheat Sheet: Press
?to view all available shortcuts - Progressive Disclosure: Show shortcuts on hover for learning mode
Usage:
Cmd/Ctrl+K- Open command palette?- Show keyboard shortcuts cheat sheetg + o- Go to Overviewg + a- Go to Accountg + t- Go to TransactionsCtrl+Shift+L- Toggle Log MonitorCtrl+Shift+T- Toggle Time Travel DebuggerCtrl+Shift+/- Show Keyboard Shortcuts
Location: src/lib/state/timeTravel.ts, src/components/state/TimeTravelDebugger.tsx
Features:
- State History Recording: Automatic recording of all state changes
- Time Travel Controls: Undo/redo navigation through state history
- State Diff Visualization: Visual diff between any two state snapshots
- Analytics Dashboard: State change frequency, size tracking, performance metrics
- Persistence: Save state snapshots and restore from snapshots
- Export/Import: Export entire state history as JSON for analysis
- Rollback: Rollback to any previous state with validation
Usage:
- Open Time Travel Debugger with
Ctrl+Shift+T - Navigate history timeline with arrow keys or click
- View state diffs between any two snapshots
- Export state history for offline analysis
- Rollback to previous states when debugging
Location: src/lib/logging/logger.ts, src/lib/logging/logMonitor.tsx
Features:
- Structured Logging: Multiple log levels (DEBUG, INFO, WARN, ERROR, CRITICAL)
- Correlation IDs: Track related operations across logs
- Central Log Storage: In-memory log storage with configurable max size
- Log Filtering: Filter by level, correlation ID, user, session, tags, time range
- Real-time Log Viewer: Live log monitoring with auto-scroll
- Log Analytics: Log frequency, tag distribution, time range analysis
- Export Capabilities: Export logs as JSON for external analysis
- Error Tracking: Integrated error tracking with context preservation
Usage:
import { logger } from './lib/logging/logger';
// Basic logging
logger.info('User connected', { userId: '123' });
logger.error('Transaction failed', { txId: 'abc' }, ['transaction'], error);
// With correlation ID
logger.setCorrelationId('req-123');
logger.debug('Processing request');
// Filter logs
const logs = logger.getLogs({ level: LogLevel.ERROR, search: 'failed' });
// Export logs
const data = logger.exportLogs();Location: src/lib/validation/validators.ts, src/hooks/useFormValidation.ts, src/components/validation/
Features:
- Composable Validators: Chain multiple validators together
- Real-time Validation: Debounced validation as user types
- Inline Error Display: Show errors inline with ARIA attributes
- Form State Management: Track dirty/touched fields, form validity
- Auto-save: Automatically save form data to localStorage
- Accessibility: Full ARIA support, error announcements, keyboard navigation
- Custom Validators: Create custom validators for specific use cases
- Async Validation: Support for asynchronous validation (e.g., API checks)
Built-in Validators:
required- Field must have a valueminLength(min)- Minimum length checkmaxLength(max)- Maximum length checkpattern(regex, message)- Regex pattern matchingemail- Email format validationurl- URL format validationstellarPublicKey- Stellar public key formatstellarSecretKey- Stellar secret key formatnumber- Numeric value validationmin(value)- Minimum value checkmax(value)- Maximum value checkoneOf(values)- Value must be in allowed list
Usage:
import { useFormValidation, compose, required, stellarPublicKey, minLength } from './hooks/useFormValidation';
const { state, addValidator, setFieldValue, validateForm } = useFormValidation(
{ publicKey: '' },
{ autoSave: true, autoSaveKey: 'connect-form' }
);
// Add validators
addValidator('publicKey', compose(
required,
stellarPublicKey,
minLength(56)
));
// Use in component
<ValidatedInput
name="publicKey"
value={state.values.publicKey}
onChange={(value) => setFieldValue('publicKey', value)}
error={state.errors.publicKey}
touched={state.touched.publicKey}
label="Public Key"
required
/>All four systems are integrated through the DeveloperTools component in src/components/DeveloperTools.tsx, which is included in the main App component.
g + o- Go to Overviewg + a- Go to Accountg + t- Go to Transactionsg + c- Go to Contractsg + n- Go to Network Stats
c- Connect Accountd- Disconnectr- Refresh Data/- Search
t- Toggle Themes- Toggle Sidebarl- Toggle Log Monitor
Ctrl+Shift+L- Toggle Log MonitorCtrl+Shift+T- Toggle Time Travel DebuggerCtrl+Shift+/- Show Keyboard ShortcutsCmd/Ctrl+K- Open Command Palette?- Show Keyboard Shortcuts
Escape- Close/EscapeCtrl+C- Copy
- Modular Design: Each system is independent and can be used standalone
- TypeScript: Core logic files use TypeScript for type safety
- Performance: Debounced validation, efficient log storage, lazy loading
- Accessibility: Full ARIA support, keyboard navigation, screen reader compatibility
- Extensibility: Easy to add new validators, shortcuts, log levels
- Add more validators for Stellar-specific data
- Implement shortcut presets for different user profiles
- Add remote log aggregation for production monitoring
- Enhance time travel with state branching
- Add visual diff viewer for state changes
- Implement collaborative debugging sessions