Fix torrents screen flashing when tapping a disconnected server (#252) - #259
Merged
taylorcox75 merged 1 commit intoSep 20, 2026
Merged
Conversation
Tapping a server on the not-connected screen flipped serverIsLoading true the instant the connect mutation went pending, which unmounted QuickConnectPanel in favor of the skeleton loader before falling back to the panel once connect settled — a panel/skeleton/panel flash (instant in airplane mode, ~10s on a real network per the issue). Keep the panel mounted while a user-initiated connect (connectingId set by this screen's own handleQuickConnect) is in flight; an automatic background reconnect leaves connectingId null so it still falls through to the skeleton as before (#245 behavior preserved). Fixes #252
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
handleQuickConnect,connectMutationgoes pending andserverIsLoadingflipstrue, which fell through to the full-screen skeleton branch and unmountedQuickConnectPanelmid-tap.QuickConnectPanelwas already built to stay mounted through this (per-row spinner viaconnectingId, disabled other rows, per-server error text) — the screen just wasn't giving it the chance.connectingId !== null, i.e. for a user-initiated connect from this screen. An automatic background reconnect never setsconnectingId, so it's unaffected and still falls through to the skeleton branch exactly as before (Fix reconnect UI after a long background (skeleton instead of stale data + auth toast) #245's "skeleton instead of stale data during an established-session reconnect" behavior is preserved).app/(tabs)/(torrents)/index.tsxonly, per this task's scope in the v3.8.45 plan (Task A ownsservices//context/, Task C owns RSS).Test plan
tests/rn/screens/TorrentsScreen.test.tsx(newtests/rn/screens/subtree — first screen-level test in the repo), covering the three cases called out for this fix:connectingIdprop reachingQuickConnectPanel), instead of unmounting into the skeleton.isConnected: true,isReconnecting: true) still shows the skeleton, not the panel — confirms Fix reconnect UI after a long background (skeleton instead of stale data + auth toast) #245 behavior survives.initialLoadComplete: false,serverIsLoading: true, no tap) still shows the skeleton, not the panel.npx tsc --noEmit— exit 0.npm test— 79/79 suites, 1133/1133 tests passing (baseline was 78/1130; +1 suite/+3 tests from this PR).npm run lint— 0 errors, 37 warnings (repo baseline, unchanged).npm run format— clean.QuickConnectPanel's design; the owner should still eyeball it once in Xcode.Fixes #252
🤖 Generated with Claude Code