Skip to content

Merge Main with Canary#19

Merged
MercilessMarcel merged 9 commits into
canaryfrom
main
May 10, 2026
Merged

Merge Main with Canary#19
MercilessMarcel merged 9 commits into
canaryfrom
main

Conversation

@MercilessMarcel
Copy link
Copy Markdown
Owner

@MercilessMarcel MercilessMarcel commented May 10, 2026

Note

Medium Risk
Touches GitHub API request/error handling and download listing paths; mistakes could change retryability/classification of auth vs rate-limit failures or hide real network errors. UI changes are straightforward but widely used (replaces alert() with a global toast mechanism).

Overview
Adds a global, dismissible in-app toast (src/lib/userToast.ts) surfaced by App and exposed via window.cnsToast, replacing blocking window.alert() error popups in archive/parts flows.

Improves GitHub rate-limit handling end-to-end: GitHub client now parses rate-limit headers, throws structured CNSError with rateLimitMeta, shows throttled toast notifications, and classifies 403/429 responses more accurately across API requests, workflow dispatch, blob downloads, and downloads listing (including a new getDownloadFolderFiles). Persian error messages now include an estimated wait time and reset timestamp.

Release/version updates: bumps app version to 1.2.2 across package.json, Tauri configs, and README links, and updates macOS release workflow to build .app bundles (--bundles app).

Reviewed by Cursor Bugbot for commit 403cff8. Bugbot is set up for automated code reviews on this repo. Configure here.

@MercilessMarcel MercilessMarcel merged commit ef31825 into canary May 10, 2026
9 checks passed
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 403cff8. Configure here.

Comment thread src/lib/errors.ts
message.includes('api rate limit exceeded') ||
message.includes('too many requests')
) {
return persianGithubRateLimit();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading "1 second" wait displayed for rate limits

Medium Severity

When persianGithubRateLimit() is called without metadata (line 143, the string-matching path in toPersianErrorMessage), both resetUtcMs and retryAfterSec are null, so waitMs stays 0. Then secTotal becomes Math.max(1, Math.ceil(0/1000)) = 1, producing "estimated wait: 1 second" — a misleading message for GitHub rate limits that typically last minutes to hours. The old code displayed a more appropriate "wait a few minutes and try again" for this case.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 403cff8. Configure here.

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