mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 00:02:41 +00:00
* feat(diff-comments): draft inline notes as editor view zones Move comment drafting from floating popover to inline view zone. The draft card now appears in the editor flow, preventing overlap with code and integrating naturally with the diff layout. Includes styled margin indicator, auto-resizing textarea, and keyboard/submission handling. * Preserve inline draft comments when switching diff views - Reanchor draft zones to new models when file/line mapping changes - Disable draft mode on large diffs to maintain performance - Enhance draft card UX: shadow depth, outside-click handling, toast errors - Carry draft body and position when reopening comments * Ensure draft comment textarea auto-focuses and preserve drafts through e - Focus textarea on mount via requestAnimationFrame for reliable focusing - Add onDomNodeTop callback to focus textarea when zone reaches viewport - Preserve pending draft when editor model refreshes and re-anchor on reload - Add editor.getModel() checks before opening and re-anchoring drafts - Test that textarea is focused on creation and errors are surfaced * fix(diff-comments): prevent draft loss and duplicate submission on swap - Track submission state to prevent carrying in-flight text to new cards - Restore failed submissions for retry after model swap with unmount safety - Use effects for proper ref management per React patterns - Add isDraftOpen() guard to prevent re-opening the keyboard chord while composing - Separate concerns between user clicks and draft-open state in decorator * fix(diff-comments): show save error and restore focus intelligently - Toast error when draft submission fails, so users see why it didn't save - Return focus to editor only if the card still holds it when save completes, preventing focus theft on slow saves * minor fix * fix(diff-comments): park focus before submit button disables Chromium moves focus to <body> when a focused button becomes disabled, causing the draft zone to lose focus context. By explicitly moving focus to the textarea before the button disables, the zone can properly return focus to the editor after save. * add all translation