v3.8.44: root folder param, proxy cookies, cold-launch timeout, retries=0, quick-switch flash - #248
Merged
Merged
Conversation
…es=0, quick-switch flash - Fix "Create root folder" toggle being a silent no-op: torrents/add's root_folder parameter has been dropped by qBittorrent since 4.3.2 (WebAPI 2.7.0); switch to contentLayout, gated by the new ApiFeatures.useContentLayoutAddParam. ON keeps sending nothing (server default, unchanged behavior for every existing user); only OFF now sends contentLayout=NoSubfolder. Legacy root_folder param preserved for WebAPI < 2.7. - Fix losing the session behind reverse proxies that set their own cookies (Cloudflare __cf_bm, forward-auth, etc.): client.ts now merges Set-Cookie values into the jar by name instead of replacing it wholesale, so a proxy-issued cookie can no longer silently drop the qBittorrent SID cookie. - Fix connection timeout/retry preferences being ignored on the very first cold-launch connect attempt (ServerContext's auto-connect effect now applies them before firing, not just RootLayout's effect which ran too late). - Fix retryAttempts=0 always being coerced back to 3 via `|| 3`; extracted a shared resolveConnectionSettings() helper used by both cold-start call sites. - Fix a loading skeleton flashing on every foreground return, even a quick app-switch: TorrentContext/TransferContext now only run the full recovery dance when backgrounded >= LONG_BACKGROUND_THRESHOLD_MS (10s, extracted to constants/timing.ts), otherwise just nudge an incremental refresh. - Faster connect: application.ts's getVersion fetches app/version and app/webapiVersion concurrently instead of sequentially. - Bump to 3.8.44 (3.8.43 already shipped 2026-09-07) and update AGENTS.md (File Index + a Gotchas entry on the root_folder/contentLayout wiki drift). No stored preference, ServerConfig field, or colors key was added, renamed, or repurposed by any of the above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
root_folderparameter ontorrents/addsince 4.3.2 (WebAPI 2.7.0). Switched to the realcontentLayoutparameter, gated by a newApiFeatures.useContentLayoutAddParam. Toggle ON still sends nothing (server default — unchanged behavior for every current user); only toggling OFF now sendscontentLayout=NoSubfolder. Verified against qBittorrent'storrentscontroller.cppsource at the 4.6.0 and 5.0.0 tags, not just the wiki (which still documents the dead parameter).__cf_bm, Authelia/Traefik forward-auth, etc.) — the client now mergesSet-Cookievalues into the jar by cookie name instead of replacing it wholesale, so a proxy-issued cookie can no longer silently drop the qBittorrentSIDcookie and force an unnecessary re-login.retryAttemptsof0always getting coerced back to3on launch (an|| 3fallback also caught the legitimate value0). Extracted a sharedresolveConnectionSettings()helper used by both cold-start call sites so they can't drift again.TorrentContext/TransferContextnow only run the full recovery dance when backgrounded 10s or more; a shorter background just nudges an incremental refresh.application.ts'sgetVersionnow fetchesapp/versionandapp/webapiVersionconcurrently instead of sequentially.AGENTS.md(File Index + a new Gotchas entry on theroot_folder/contentLayoutwiki drift).Compatibility
No stored preference key,
ServerConfigfield, orcolorskey was added, renamed, or repurposed. The root-folder fix specifically preserves "toggle ON = server default" as the behavior every existing user already has today; only turning it OFF changes anything, and only on WebAPI ≥ 2.7 (qBit 4.3.2+) — older servers keep getting the legacyroot_folderfield unchanged.Test plan
npx tsc --noEmit— exit 0npm test— 78 suites / 1104 tests passing (both projects)npm run lint— 0 errors, 37 warnings (documented baseline)npm run format— no changes neededNote: pushing this branch's merge to
mainwill trigger the App Store build (easBuild: trueinpackage.json) — not part of this PR, that's a separate step.🤖 Generated with Claude Code