diff --git a/AI_dev_plan.md b/AI_dev_plan.md index faf8600..88a1f9d 100644 --- a/AI_dev_plan.md +++ b/AI_dev_plan.md @@ -108,6 +108,34 @@ Must-have plan is complete when all are true: 2. Feature PRs without spec updates are blocked. 3. Backend router contracts cover core success and error paths. 4. Frontend has at least one stable test command integrated into validation. + +## 7. AI Tools Validation Strategy + +Required: + +1. **Per-edit validation**: After each code change (file edit, replacement, or creation), validate immediately with appropriate tools. +2. **Tool selection by change type**: + - Frontend changes: ESLint (`npm run -s lint`), then TypeScript build (`npm run build`) + - Backend changes: Syntax check via Python import, then run relevant test suite + - Type/interface changes: Full type check via build or `tsc -b` +3. **Failure handling**: If validation fails, fix immediately before proceeding to next edit. +4. **Documentation updates**: When changing architecture, always update [.github/copilot-instructions.md](.github/copilot-instructions.md) as part of the same PR. +5. **Large multi-edit operations**: Use `multi_replace_string_in_file` to batch independent edits and reduce tool call overhead. +6. **Error collection**: Use `get_errors` tool to identify issues across multiple files in one call post-change. + +Current implementation: + +1. Electron removal completed with post-edit lint and build validation at each phase. +2. Zone editor feature implemented with immediate lint/build validation after component creation and UI integration. +3. Validation tools: `npm run -s lint`, `npm run build`, `get_errors`, `run_in_terminal` for test scripts. + +Best practices established: + +- Always run lint before build to catch TypeScript errors early +- Run full build after component changes to verify tree-shaking and bundling +- Use `get_errors` for multi-file error detection rather than sequential file reads +- Batch unrelated edits with `multi_replace_string_in_file` for efficiency +- Cache key decisions in session memory to avoid repeated exploration 5. AI policy + diagnostics workflow are active. ## Current State Summary diff --git a/FEATURES.md b/FEATURES.md index dcb2b4e..8de3df4 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -44,6 +44,8 @@ Features are grouped by priority. Check off items as they are implemented. - [ ] [#017] **Chapters** — group markers into named chapter ranges. Useful for podcasts and lectures. Exportable as YouTube chapter timestamps in the description. +- [ ] [#041] **Customizable hotkeys / keymap editor (left-hand focused)** — allow users to view, remap, and reset keyboard shortcuts (transport, edit, save/export, zone tools), with a default preset optimized for left-hand reach (Q/W/E/R/A/S/D/F/Z/X/C/V + modifiers). Include conflict detection, an alternate standard preset, and one-click "restore defaults". + --- ## 🟢 Lower Priority — Differentiating / power features diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 0fa0da1..51f6558 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -8,7 +8,7 @@ import ExportDialog from './components/ExportDialog'; import SettingsPanel from './components/SettingsPanel'; import DevPanel from './components/DevPanel'; import SilenceTrimmerPanel from './components/SilenceTrimmerPanel'; -import VolumePanel from './components/VolumePanel'; +import ZoneEditor from './components/ZoneEditor'; import { useKeyboardShortcuts } from './hooks/useKeyboardShortcuts'; import { Film, @@ -20,15 +20,15 @@ import { Save, Scissors, VolumeX, - Volume2, SlidersHorizontal, FilePlus2, RefreshCw, + Grid3x3, } from 'lucide-react'; const LAST_MEDIA_PATH_KEY = 'talkedit:lastMediaPath'; -type Panel = 'ai' | 'settings' | 'export' | 'silence' | 'volume' | null; +type Panel = 'ai' | 'settings' | 'export' | 'silence' | 'zones' | null; export default function App() { const { @@ -459,17 +459,29 @@ export default function App() { onClick={handleMute} active={muteMode} /> +