Skip to content

fix: add missing error handlers and abort cleanup in async effects#1766

Merged
lalalune merged 1 commit intomilady-ai:developfrom
NubsCarson:fix/chatview-image-bugs
Apr 10, 2026
Merged

fix: add missing error handlers and abort cleanup in async effects#1766
lalalune merged 1 commit intomilady-ai:developfrom
NubsCarson:fix/chatview-image-bugs

Conversation

@NubsCarson
Copy link
Copy Markdown
Contributor

Summary

  • ChatView addImageFiles: FileReader promises lacked onerror/onabort handlers, causing promises that never settle on read failure (e.g. permission errors, corrupt files). Added .catch() on Promise.all to prevent unhandled rejections.
  • ChatView preflight fetch: Added AbortController so the coding-agents preflight request is cancelled on unmount, preventing state updates on unmounted components.
  • CodingAgentSettingsSection: Added AbortController for the preflight fetch and abort guards before state updates, preventing post-unmount state writes when navigating away during the 5-fetch initialization.

Test plan

  • Open chat view, attach an image — verify it still previews correctly
  • Quickly navigate away from chat view while preflight fetch is in-flight — verify no console warnings about state updates on unmounted component
  • Open coding agent settings then navigate away quickly — verify no console warnings
  • Attempt to attach a file that fails to read (e.g. revoke permissions mid-read) — verify console warning instead of unhandled rejection

🤖 Generated with Claude Code

…ingAgentSettings

- ChatView addImageFiles: FileReader promises lacked onerror/onabort handlers,
  causing promises that never settle on read failure. Also added .catch() on
  Promise.all to prevent unhandled rejections.
- ChatView preflight fetch: added AbortController so the request is cancelled
  on unmount, preventing state updates on unmounted components.
- CodingAgentSettingsSection: added AbortController for the preflight fetch and
  abort guards before state updates, preventing post-unmount state writes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Agent Review — Service Unavailable

Both AI reviewers failed to complete the review for this run:

  • Claude: failure
  • Codex (fallback): failure

This is likely a temporary API outage. The PR will need to be re-reviewed once services recover.

View workflow run

  1. Decision: REQUEST CHANGES (automated review unavailable — please re-trigger or wait for service recovery)

@github-actions github-actions bot added category:feature Auto-managed semantic PR category trust:probationary Building trust, closer scrutiny (auto-managed) labels Apr 9, 2026
@lalalune lalalune merged commit 8ec0b16 into milady-ai:develop Apr 10, 2026
15 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:feature Auto-managed semantic PR category trust:probationary Building trust, closer scrutiny (auto-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants