Skip to content

fix(updater): handle benign network errors and deduplicate error statuses - #146

Merged
AmethystLiang merged 2 commits into
mainfrom
fixUpdate
Mar 27, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
fixUpdate

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • Treats net::ERR_FAILED during update checks as benign — transitions to idle instead of showing a scary error toast
  • Deduplicates identical error statuses to prevent double-firing when both the promise rejection and the error event fire for the same failure
  • Adds a manual download link (GitHub releases) to user-facing error toasts for user-initiated checks
  • Dismisses the "checking" toast when transitioning to idle on benign failures

Test plan

  • Added updater.test.ts with tests for error deduplication and benign failure handling
  • Manual: trigger a user-initiated update check while offline — should not show error toast
  • Manual: trigger a user-initiated check with a real error — should show error with download link

🤖 Generated with Claude Code

AmethystLiang and others added 2 commits March 27, 2026 15:01
…uses

Treats net::ERR_FAILED during update checks as benign (transitions to idle
instead of showing error), deduplicates identical error statuses, and adds
a manual download link to user-facing error toasts.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@AmethystLiang
AmethystLiang merged commit bbc4a98 into main Mar 27, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…uses (stablyai#146)

* fix(updater): handle benign network errors and deduplicate error statuses

Treats net::ERR_FAILED during update checks as benign (transitions to idle
instead of showing error), deduplicates identical error statuses, and adds
a manual download link to user-facing error toasts.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: use T[] array syntax instead of Array<T> to pass oxlint

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
nwparker pushed a commit to Afloat16/orca that referenced this pull request Nov 27, 2026
Link-preview and workspace-port page titles passed numeric character
references straight to String.fromCodePoint, so legacy references such
as &stablyai#146; became invisible C1 controls, &#xD800; produced a lone
surrogate, and &#0; or &#x110000; stayed literal.

Follow the WHATWG numeric character reference rules: 0x80-0x9F map
through the Windows-1252 replacement table, and NUL, surrogates and
values above U+10FFFF become U+FFFD.

Fixes stablyai#50344
nwparker pushed a commit that referenced this pull request Nov 27, 2026
…es (#50345)

Link-preview and workspace-port page titles passed numeric character
references straight to String.fromCodePoint, so legacy references such
as &#146; became invisible C1 controls, &#xD800; produced a lone
surrogate, and &#0; or &#x110000; stayed literal.

Follow the WHATWG numeric character reference rules: 0x80-0x9F map
through the Windows-1252 replacement table, and NUL, surrogates and
values above U+10FFFF become U+FFFD.

Fixes #50344
nwparker added a commit to Pr1p/orca that referenced this pull request Nov 28, 2026
…red decoder

htmlToText decoded entities with its own small table, so mail from
Outlook or Word showed C1 control characters for &stablyai#146; and &stablyai#151;,
common named entities such as &mdash; stayed literal, and a surrogate
reference produced a broken string. It now strips tags as before and
runs the shared decodeHtmlEntities, which maps Windows-1252 references
to their characters and replaces unusable ones with U+FFFD. The named
&nbsp; still becomes a plain space so the line-end trim strips it.

Fixes stablyai#51598

Co-authored-by: Neil <[email protected]>
nwparker added a commit that referenced this pull request Nov 28, 2026
…red decoder (#51599)

htmlToText decoded entities with its own small table, so mail from
Outlook or Word showed C1 control characters for &#146; and &#151;,
common named entities such as &mdash; stayed literal, and a surrogate
reference produced a broken string. It now strips tags as before and
runs the shared decodeHtmlEntities, which maps Windows-1252 references
to their characters and replaces unusable ones with U+FFFD. The named
&nbsp; still becomes a plain space so the line-end trim strips it.

Fixes #51598

Co-authored-by: Neil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant