robustness plan

This commit is contained in:
2026-05-06 13:18:53 -06:00
parent 6ac1d68887
commit 9a301fe2a2
4 changed files with 335 additions and 298 deletions

View File

@ -775,9 +775,16 @@ export default function App() {
{/* Draggable divider */}
<div
tabIndex={0}
role="separator"
aria-label="Resize panel"
className="w-1 shrink-0 bg-editor-border cursor-col-resize hover:bg-editor-accent/50 active:bg-editor-accent transition-colors relative z-10"
style={{ cursor: isDraggingSplit.current ? 'col-resize' : 'col-resize' }}
onMouseDown={startSplitDrag}
onKeyDown={(e) => {
if (e.key === 'ArrowLeft') setSplitRatio(Math.max(0.15, splitRatio - 0.02));
if (e.key === 'ArrowRight') setSplitRatio(Math.min(0.85, splitRatio + 0.02));
}}
title="Drag to resize"
/>
@ -857,8 +864,15 @@ export default function App() {
<div className="flex shrink-0">
{/* Draggable sidebar divider */}
<div
tabIndex={0}
role="separator"
aria-label="Resize panel"
className="w-1 shrink-0 bg-editor-border cursor-col-resize hover:bg-editor-accent/50 active:bg-editor-accent transition-colors relative z-10"
onMouseDown={startSidebarDrag}
onKeyDown={(e) => {
if (e.key === 'ArrowUp') setSidebarWidth(Math.max(180, sidebarWidth - sidebarWidth * 0.02));
if (e.key === 'ArrowDown') setSidebarWidth(Math.min(600, sidebarWidth + sidebarWidth * 0.02));
}}
title="Drag to resize"
/>
<div className="overflow-y-auto" style={{ width: sidebarWidth }}>

View File

@ -93,6 +93,12 @@ export default function HelpContent() {
<Shortcut keys="Ctrl+F" desc="Find in transcript" />
<Shortcut keys="?" desc="Toggle cheatsheet" />
</div>
<button
onClick={() => window.dispatchEvent(new KeyboardEvent('keydown', { key: '?' }))}
className="text-editor-accent hover:underline text-xs mt-2"
>
View full keyboard shortcut reference
</button>
</Section>
<div className="text-[10px] text-editor-text-muted leading-relaxed border-t border-editor-border pt-4">

View File

@ -1,6 +1,6 @@
import { useEffect, useRef } from 'react';
import { useEditorStore } from '../store/editorStore';
import { loadBindings } from '../lib/keybindings';
import { loadBindings, DEFAULT_PRESETS } from '../lib/keybindings';
import type { KeyBinding } from '../types/project';
export function useKeyboardShortcuts() {
@ -180,6 +180,8 @@ function toggleCheatsheet(bindings: KeyBinding[]) {
overlay.remove();
};
const presetName = JSON.stringify(bindings) === JSON.stringify(DEFAULT_PRESETS['left-hand']) ? 'Left-Hand Preset' : 'Standard Preset';
const rows = bindings
.map(
(b) =>
@ -188,6 +190,7 @@ function toggleCheatsheet(bindings: KeyBinding[]) {
.join('');
overlay.innerHTML = `<div style="background:#1a1d27;border:1px solid #2a2d3a;border-radius:12px;padding:24px 32px;max-width:450px;position:relative;" onclick="event.stopPropagation()">
<div style="font-size:11px;color:#94a3b8;margin-bottom:12px">Active preset: <span style="color:#818cf8;font-weight:500">${presetName}</span></div>
<h3 style="margin:0 0 16px;font-size:14px;font-weight:600;color:#e2e8f0">Keyboard Shortcuts</h3>
<table style="font-size:13px">${rows}</table>
<p style="margin:16px 0 0;font-size:11px;color:#94a3b8;text-align:center">Customize in Settings &bull; Press ? to close</p>