Skip to content

v3.8.42: swipe actions, connect states, auth race, badge colors - #242

Merged
taylorcox75 merged 2 commits into
mainfrom
release/v3.8.42
Sep 6, 2026
Merged

taylorcox75 merged 2 commits into
mainfrom
release/v3.8.42

Conversation

@taylorcox75

Copy link
Copy Markdown
Owner

Release v3.8.42. package.json bumped to match CHANGELOG[0].

⚠️ easBuild: true — merging this to main builds and submits to the App Store.

Fixes

Swipe actions — The action panel is absoluteFill over the whole row while the card inside carries a 4px vertical margin and a 12/16px radius, so the orange/red backgrounds stood proud of the card with square corners. Separately, the icon scale interpolations were calibrated for a reveal animation Swipeable doesn't perform (the panel is static; the card slides over it), so icons flashed or showed blank blocks. Actions now slide in with progress — the library's own pattern — and the panel is clipped to the card's bounds.

"Authentication failed" when switching servers — The previous server's 2s /sync/maindata poll stayed enabled through a connect. apiClient.setServer(newServer) clears the cookie, the poll tick then 403s, and the shared 403 handler wiped the new server's just-issued session cookie — so the connect's own getVersion() failed with an auth error. Retrying worked because the poll was disabled by then. Three-part fix:

  • apiClient stamps each request with a session epoch and only lets a 403 clear the cookie when the request was issued under the current session; a superseded 403 throws a distinct non-reconnectable error.
  • The connect mutation drops connection state in onMutate, stopping the poll before login runs.
  • reconnect/checkAndReconnect no-op while a connect is in flight, the in-flight promise is keyed by server id, and ServerManager.reconnect() takes an explicit server (storage's "current server" isn't written until after login, so it can still name the previous one mid-switch).

"No Torrents" during a connect — initialLoadComplete is set once and never reset, so after any earlier session the skeleton condition was false during a connect and the screen fell through to the empty-list branch for the full 10s timeout. New isConnecting flag on ServerContext gates the skeleton.

Unreadable Connect button — colors.error is an rgba() string, and colors.error + '18' appends hex alpha that RN's unanchored color parser silently ignores, producing an opaque fill — error-red text on error-red. New withAlpha() util (hex/rgb/rgba, with tests) fixes the pill and the four server debug-row sites with the same latent bug.

Server badge color changing on its own — The fallback was avatarColor(name), rehashing an 8-colour palette on every keystroke and shifting again on rename. Servers now use a fixed DEFAULT_AVATAR_COLOR until the user picks one. avatarColor stays for category/tag colours.

Color picker — Added a Save button beside the X. Cosmetic only; selections already apply live.

Sound effects removed — Native module, utils/sounds.ts, call sites, preference fields, settings UI and all six locales' strings.

Existing users

  • No preference key was renamed or repurposed. The two sound keys are simply no longer read; savePreferences spreads the stored object so they stay untouched in AsyncStorage and every other preference is preserved.
  • No stored ServerConfig field changed. Servers that never had an explicit iconColor will render with the default blue instead of a name-derived colour — a deliberate visual change, no data touched, and any colour can still be picked.
  • No colors theme keys renamed; withAlpha only changes how alpha is applied at render time.
  • 4.x compatibility untouched — no API endpoints or parameters changed.

Test plan

  • npx tsc --noEmit — clean
  • npm test — 76 suites / 1089 tests passing (includes new tests/utils/color.test.ts and session-epoch cases in tests/services/client.test.ts)
  • npm run lint — 0 errors (38 baseline warnings)
  • npm run format

Swipe rendering, the connect/skeleton states and the badge default need an on-device pass — they can't be verified from tests.

🤖 Generated with Claude Code

- Swipe actions now slide in with the drag (canonical RNGH progress
  pattern) and are clipped to the card's bounds, fixing the action
  background bleeding past the card and the blank/flashing icons.
- Fixed the "Authentication failed" that could appear when switching
  servers: the previous server's sync poll kept running through the
  connect and its 403 wiped the new server's fresh session cookie.
  apiClient now stamps each request with a session epoch and ignores a
  403 from a superseded session; the poll is stopped before login, and
  reconnects no longer race an in-flight connect.
- The torrent list now shows the skeleton while a connect is in
  flight instead of falling through to "No Torrents".
- New withAlpha() util: appending hex alpha to an rgba() theme color
  silently produced an opaque fill, making the Connect pill red-on-red
  after a connection error. Fixed there and on the server debug rows.
- A server's badge color is now a fixed default until the user picks
  one — it is never derived from the server name, so it no longer
  changes while typing or editing the name.
- Added a Save button to the color picker header.
- Removed the sound-effects feature (native module, preferences,
  settings UI and strings).
Patch-level bumps within SDK 57: expo, expo-dev-client, expo-linking,
expo-router, expo-secure-store, expo-sharing, expo-updates.
`expo install --check` reports the tree aligned.

Leaves the 3 moderate npm audit advisories (decode-uri-component via
query-string via expo-router) unaddressed on purpose — see the PR for
why neither available remedy is safe to apply.
@taylorcox75
taylorcox75 merged commit 0cf4211 into main Sep 6, 2026
3 of 4 checks passed
@taylorcox75
taylorcox75 deleted the release/v3.8.42 branch September 6, 2026 16:35
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