Commit Graph
425 Commits
Author SHA1 Message Date
jakeandClaude Sonnet 5.5 b46bc4cdcb fix(native): make the server-URL check reactive so the reachability monitor and banner work after first setup
With the React Compiler, hasServerUrl read from MMKV during render was
memoized forever at the root. Read it through useSyncExternalStore instead.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 12:54:17 -04:00
jakeandClaude Sonnet 5.5 8f4cd03715 fix(native): persist the query cache per server+user and clear it with the session
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 12:51:00 -04:00
jakeandClaude Opus 5.5 870d130261 chore(i18n): extract catalogs after sharing client helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:28:17 -04:00
jakeandClaude Opus 5.5 778a1356d5 refactor(api): share tracking-dependent query key lists between web and native
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:27:43 -04:00
jakeandClaude Opus 5.5 88e777d5ce refactor(api): share sparkline path and luminance helpers between web and native
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:27:15 -04:00
jakeandClaude Opus 5.5 4b38303404 refactor(i18n): re-export error helpers by name to satisfy no-barrel-file
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:27:12 -04:00
jakeandClaude Opus 5.5 01a14157c6 refactor(i18n): share integration status text between web and native
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:26:05 -04:00
jakeandClaude Opus 5.5 4adaa4a73b refactor(i18n): share error message maps between web and native
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:25:28 -04:00
jakeandClaude Opus 5.5 d874ae9198 refactor(web): share one import-job flow between import dialogs
Extract the job loop into runImportJob (with tests), hold its UI state in
useImportJob, and move the importing/done steps and stat/option components
into import-dialog-parts. Both dialogs now close when an import continues in
the background or the connection drops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 04:11:48 -04:00
b63fbce60d feat(search): find titles by IMDb ID
Search queries that look like an IMDb ID (e.g. tt0133093) are now resolved
through TMDB's find endpoint, respecting the movie/tv type filter.

Supersedes #60.

Co-authored-by: Gonçalo Fonseca <gcare.fonseca99@outlook.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:57:00 -04:00
jakeandClaude Opus 5.5 0f82de55cb refactor(core): move discover logic into @sofa/core/browse
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:56:10 -04:00
jakeandClaude Opus 5.5 07e8e79e51 test(server): characterize discover procedures
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:53:30 -04:00
jakeandClaude Opus 5.5 d6ac2324e7 fix(discover): map TV date sorts, clamp TMDB page counts, and pause infinite scroll after a failed page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:31:06 -04:00
jakeandClaude Opus 5.5 7269209d43 fix(web): load more titles in Explore rows and show status in Discover
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:23:27 -04:00
jakeandClaude Opus 5.5 9aebca7121 perf(metadata): process episode art in the background with bounded concurrency
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:17:41 -04:00
jakeandClaude Opus 5.5 40517b5214 fix(native): add the Library tab and translated labels on Android
The Android tab bar only declared four tabs with hard-coded English
labels, so the Library route was never registered and "See all" on Home
did nothing. Match the iOS tab set and order and use LingUI labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:11:21 -04:00
jakeandClaude Opus 5.5 67766298d8 fix(native): block duplicate watch taps, stop invalidating title details, and show refresh spinner only on pull
- invalidateTitleQueries no longer invalidates titles.get and returns a promise for tracking/library refetches; mutations return it from onSuccess so isPending covers the refetch
- per-episode pending guard (disabled + dimmed row) and disabled season "Mark All Watched" while pending
- add usePullToRefresh so RefreshControl only reflects user-initiated pulls (Home, Explore, Library, Upcoming)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:07:24 -04:00
jakeandClaude Opus 5.5 bc3ea712f9 fix(imports): poll device codes one request at a time
The Trakt/Simkl sign-in dialog polled with setInterval and no in-flight
guard, so while the first "authorized" poll was still fetching the
library, the next tick re-sent the redeemed device code. Trakt answers
409, which was mapped to "expired", producing a false "Device code
expired" error.

- public-api: map Trakt 409 (already redeemed) to pending
- web: add a single-flight device-code poller that drops late responses
  after stop() and aborts the in-flight request
- web: use it in the imports dialog and ignore device-code responses
  that arrive after the dialog was closed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 03:00:42 -04:00
jakeandClaude Opus 5.5 feb41e3149 fix(native): sync React Query online state with server reachability
Probe the health endpoint while unreachable, refetch errored queries when the server
returns, and keep gcTime at least as long as the persister maxAge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:51:59 -04:00
jakeandClaude Opus 5.5 07ea8f68f2 fix(native): keep cached screens on refetch errors and show errors instead of empty states
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:51:57 -04:00
jakeandClaude Opus 5.5 25cf4f1bc8 fix(native): route to the right screen when the session is lost
The session-loss effect never ran because sessionLost was computed in a
render that also called setState, so the committed value was always false.
Compare against a ref inside the effect instead, re-validate the session on
401s, stop retrying 4xx errors, and show the change-server link on
OIDC-only login screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:39:54 -04:00
jakeandClaude Sonnet 5.5 e5209f80fe fix(auth): key rate limits on the resolved client IP and restrict the Expo auth proxy
Resolve the client IP from the TCP peer plus trusted-proxy X-Forwarded-For hops
(TRUSTED_PROXIES) and hand it to Better Auth in an internal header, so spoofed
forwarding headers can no longer rotate sign-in rate-limit buckets. The Expo
authorization proxy now only redirects to the OIDC provider's authorization endpoint.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 00:09:53 -04:00
jakeandClaude Opus 5.5 b8b5b31fa1 fix(i18n): render mapped error messages and stop showing raw server errors
Helpers that took Lingui's `t` as a parameter rendered empty strings because
the macro only transforms `t` imported from the macro. Use msg descriptors
plus i18n._ instead, so mapped error toasts and native server-URL errors are
real, extractable strings. Also map Better Auth error codes to localized
messages instead of showing raw server text, and send a REGISTRATION_CLOSED
code from the auth hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:44:10 -04:00
jakeandClaude Opus 5.5 4c58b550b1 fix(server): cap request bodies and require a session before large uploads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:33:36 -04:00
jakeandClaude Opus 5.5 e9fb4797e5 perf(imports): poll job progress without the payload and drop it when done
readImportJob now selects only progress columns instead of the multi-MB
payload, processImportJob empties the payload once a job reaches a terminal
status, and server startup clears payloads of previously finished jobs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:27:04 -04:00
jake 0b7d75a59b chore(native): bump version to 0.3.0 2026-10-04 23:26:50 -04:00
jakeandClaude Opus 5.5 82f0bb11e2 perf(db): collect planner statistics on connect and after imports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:18:25 -04:00
jakeandClaude Opus 5.5 6620f0b76f test(server): add test harness and auth coverage for every procedure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:14:56 -04:00
jakeandClaude Opus 5.5 810bbecf78 fix(imports): cap uncompressed size and entry count of uploaded ZIPs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:06:34 -04:00
jakeandClaude Sonnet 5.5 69b252e99b fix(native): serialize widget refreshes and fall back to other artwork
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 18:02:06 -04:00
jakeandClaude Sonnet 5.5 c62ef6b620 fix(native): keep widget timelines current and localize widget text
expo-widgets rebuilds each widget timeline from the stored entries when it
ends, so five entries 15 minutes apart left the widgets stuck on the last
entry (the 5th show, or the furthest-away release) after an hour.

Continue Watching now rotates through up to five shows every 30 minutes for
12 hours, then rests on the top show. Upcoming writes one entry per local
midnight at which the shown item or its Today/Tomorrow label changes, moves
on after each air date and ends on the empty state once everything has aired.

All widget text is now produced in widgets.ts through LingUI and passed to the
widget extension as string props, replacing the hard-coded English labels and
month table. The widget catalogs gain "S{seasonNum} E{epNum}", "Nothing to
watch" and "Nothing upcoming"; the rest reuse existing messages. The refresh
now waits for the locale catalog so English labels are not baked in first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 17:47:52 -04:00
jakeandClaude Sonnet 5.5 b4fdf6164f fix(native): cache widget artwork at its real pixel size
UIGraphicsImageRenderer(size:) uses the screen scale by default, so the cached JPEGs came out about 1395px wide instead of the intended 465px. WidgetKit refuses to render images whose pixel area is far beyond the widget's, and the extension has a tight memory limit, so oversized art could blank the widget.

Render at scale 1 into a center-cropped 510px square (systemSmall is at most 170pt, or 510px at 3x) and bump JPEG quality to 0.8 now that the files are much smaller.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 17:38:04 -04:00
jakeandClaude Sonnet 5.5 9bbe36b2d4 fix(native): give home-screen widgets a container background and full-bleed artwork
iOS 17+ rendered 'Please adopt containerBackground API' because expo-widgets 56 dropped its hard-coded container background and neither widget applied the modifier. Artwork also drew at its raw pixel size because the images were never resizable, and the layout assumed a fixed 155pt box with default content margins.

Apply containerBackground, make the artwork resizable, aspect-filled and clipped, replace the flat overlay with a gradient scrim, left-align the text block, use a native linear ProgressView, and disable content margins via the plugin's ios config. Also correct the Continue Watching description, since the feed only contains TV episodes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 17:37:08 -04:00
jakeandClaude Sonnet 5.5 6a1b753a49 fix(public-api): paginate Trakt sign-in import and keep it under the response limit
Follow Trakt's pagination headers, slim items to the fields Sofa reads,
keep the most recent plays when the payload would exceed Vercel's 4.5 MB
response limit, surface failed/truncated lists as warnings, and return a
readable fetch_error instead of an oversized response for every provider.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 17:27:26 -04:00
jakeandClaude Sonnet 5.5 57aaa5e7d2 fix(core): allow scheduler jitter in update-check and telemetry throttles
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 17:17:18 -04:00
jakeandClaude Sonnet 5.5 98fd236b5c fix(auth): refresh the session cookie cache after first-admin promotion
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 17:10:49 -04:00
jakeandClaude Sonnet 5.5 d42a022a30 fix(i18n): format date-only values in UTC and share an age helper
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 17:05:33 -04:00
jakeandClaude Sonnet 5.5 5a96fd39f1 fix(webhooks): accept native Emby payloads, ignore episode TMDB ids, refresh on missing episodes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:46:00 -04:00
jakeandClaude Sonnet 5.5 f05e63bab7 fix(public-api): treat Simkl KO as pending and unwrap all-items responses
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:41:00 -04:00
jakeandClaude Sonnet 5.5 96a0771e8c fix(web): keep subscription settings in sync and report save failures
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:34:31 -04:00
jakeandClaude Sonnet 5.5 d84126f51a fix(discover): pass explicit browse fields from search
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:30:11 -04:00
jakeandClaude Sonnet 5.5 dea8ea74f7 fix(metadata): enrich and fully populate TV shows on first view
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:28:12 -04:00
jakeandClaude Sonnet 5.5 57bac67b36 fix(tmdb): keep the /3 prefix for custom base URLs and trailing slashes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:21:18 -04:00
jakeandClaude Sonnet 5.5 8b10b5cb45 fix: stop infinite lists from evicting their first page
Every infinite list set maxPages: 10 without getPreviousPageParam, so TanStack Query dropped the first page once an 11th was fetched and it could never be scrolled back to. These lists are forward-only, so remove maxPages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:17:03 -04:00
jakeandClaude Sonnet 5.5 68693415bf fix(tracking): skip watched episodes in bulk marks; read ratings without status
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:10:45 -04:00
jakeandClaude Sonnet 5.5 65d070ff23 fix(credits): replace title cast on refresh and remove duplicate crew rows
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 16:06:00 -04:00
jakeandClaude Sonnet 5.5 4addc32e76 fix(native): invalidate discover and people after title actions
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 15:59:38 -04:00
jakeandClaude Sonnet 5.5 a0159a3d4b fix(web): make Retry and Try again actually refetch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 15:59:08 -04:00
jakeandClaude Sonnet 5.5 8a7dc2c8c0 fix(web): refresh tracking-dependent queries after mutations
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 15:58:41 -04:00
jakeandClaude Sonnet 5.5 923924a76f fix(native): reset home-screen widgets when the session ends
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-04 15:52:54 -04:00