Add floating dev/debug menu for QA testing (Ctrl+D)
CI / build-and-push (push) Successful in 30s

Four-tab panel with resource manipulation, time controls, state inspection,
and event triggers to accelerate testing across all game systems.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-24 23:43:41 -04:00
parent c799f2e359
commit 9c49a10b31
7 changed files with 738 additions and 0 deletions
@@ -5,6 +5,12 @@ import type { GameSpeed } from '@ai-tycoon/shared';
export function useKeyboardShortcuts() {
useEffect(() => {
const handler = (e: KeyboardEvent) => {
if (e.ctrlKey && e.key === 'd') {
e.preventDefault();
window.dispatchEvent(new Event('toggle-dev-menu'));
return;
}
const target = e.target as HTMLElement;
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.tagName === 'SELECT') return;