@stackmemoryai/stackmemory
Version:
Project-scoped memory for AI coding tools. Durable context across sessions with MCP integration, frames, smart retrieval, Claude Code skills, and automatic hooks.
66 lines (55 loc) โข 2.36 kB
text/typescript
/**
* Test script for TUI keyboard shortcuts
* Tests all interactive features and key bindings
*/
import 'dotenv/config';
import { SwarmTUI } from '../src/features/tui/swarm-monitor.js';
import { logger } from '../src/core/monitoring/logger.js';
console.log('๐งช TUI Shortcuts Test Guide');
console.log('============================');
console.log('');
console.log('This will launch the TUI. Test these keyboard shortcuts:');
console.log('');
console.log('๐ Test Checklist:');
console.log(' [ ] q - Quit TUI (should exit cleanly)');
console.log(' [ ] Esc - Alternative quit (should exit cleanly)');
console.log(' [ ] Ctrl+C - Force quit (should exit cleanly)');
console.log(' [ ] r - Refresh data (should show "Manual refresh triggered")');
console.log(' [ ] h - Show help (should display full help in logs)');
console.log(' [ ] c - Clear logs (should clear log area and show confirmation)');
console.log(' [ ] d - Detect swarms (should show registry status and process info)');
console.log(' [ ] s - Start swarm help (should show example commands)');
console.log(' [ ] t - Stop swarm (should show appropriate message)');
console.log('');
console.log('๐ฏ Expected Behavior:');
console.log(' - All shortcuts should work without errors');
console.log(' - Log messages should appear in the bottom panel');
console.log(' - Help text should be comprehensive');
console.log(' - Detection should show registry and external processes');
console.log(' - Interface should remain responsive');
console.log('');
console.log('Press Enter to launch TUI...');
// Wait for user input
await new Promise(resolve => {
process.stdin.once('data', resolve);
});
async function testTUIShortcuts() {
try {
console.log('๐ Launching TUI for shortcut testing...');
const tui = new SwarmTUI();
// Initialize TUI
await tui.initialize();
// Start the TUI
tui.start();
console.log('โ
TUI launched successfully');
console.log('๐ Test each keyboard shortcut systematically');
console.log('๐ Use "q" to quit when testing is complete');
} catch (error: unknown) {
logger.error('TUI shortcuts test failed', error as Error);
console.error('โ TUI shortcuts test failed:', (error as Error).message);
process.exit(1);
}
}
// Run the test
testTUIShortcuts();