- Security: API keys no longer transit IPC as plaintext; renderer sends
providerId and main process decrypts via safeStorage. Add ReDoS
protection for user-supplied blocklist regex. Sanitize error messages
to strip file paths and sensitive URLs before displaying in chat.
- Bug fixes: approval timeout now notifies user in chat instead of
silently aborting. statusText cleared consistently across all 7 code
paths. useAIState persistence race condition fixed with mountedRef
guard, storage sync validated with type checks.
- Accessibility: InlineApprovalCard uses role="alertdialog" with focus
on approve button. ChatInput menus have proper ARIA roles, labels,
and aria-expanded. ThinkingBlock toggle has aria-expanded/controls.
Model selector submenu supports keyboard navigation.
- UX: switching agents preserves old session and creates new one.
Approval card buttons disabled immediately after click.
- Performance: text-delta streaming batched via requestAnimationFrame.
- Refactor: extract useAIChatStreaming, useToolApproval, and
useConversationExport hooks from AIChatSidePanel (1514 → 751 lines).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>