Commit Graph
39 Commits
Author SHA1 Message Date
jakeandClaude Opus 5.5 45667f3540 fix(native): keep widget refreshes after resets and don't claim nothing is upcoming
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:34:42 -04:00
jakeandClaude Opus 5.5 fcd8731a6a fix(web): settings toggles refresh cache, backup next-run from server, update toast once
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:28:20 -04:00
jakeandClaude Opus 5.5 a6d642616b fix(cron): start manual jobs in the background and report busy jobs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:23:28 -04:00
jakeandClaude Opus 5.5 085b681d8a fix(native): explain change-password failures and block double submit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:15:57 -04:00
jakeandClaude Sonnet 5.5 ecf119c98e fix(native): show errors for Explore rows, failed pages and Register
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 22:06:42 -04:00
jakeandClaude Sonnet 5.5 669fc74653 fix(native): report SSO sign-in failures
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 22:03:06 -04:00
jakeandClaude Sonnet 5.5 8a6c32f376 fix(native): translate the recently viewed row's accessibility label
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 21:57:24 -04:00
jakeandClaude Sonnet 5.5 911dc7e5f1 fix(tracking): clamp same-day log-a-watch time to now
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 21:50:57 -04:00
jakeandClaude Sonnet 5.5 cb5e0c19e7 feat(tracking): remove a single watch and log a watch on a date
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 21:50:56 -04:00
jakeandClaude Sonnet 5.5 4669d3b76d feat(native): add a watch history screen and trim the web phone tab bar
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 21:50:53 -04:00
jakeandClaude Sonnet 5.5 b292fe37ab feat(tracking): add a paginated watch history and Last watched library sort
Adds tracking.history (cursor-paginated, movies and episodes merged), a
last_watched library sort, and a /history web page.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 14:36:44 -04:00
jakeandClaude Sonnet 5.5 e625f319a2 feat(upcoming): add a "Recently aired" view of unwatched episodes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 14:29:47 -04:00
jakeandClaude Sonnet 5.5 04bcb66436 feat(dashboard): mark episodes watched from Continue Watching and Upcoming
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 14:20:09 -04:00
jakeandClaude Sonnet 5.5 b7887eef70 fix(native): make select sheets and row actions usable with VoiceOver and TalkBack
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 13:43:21 -04:00
jakeandClaude Sonnet 5.5 851a188f00 fix(native): recover from render errors and let Close leave deep-linked titles
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 13:40:39 -04:00
jakeandClaude Opus 5.5 ccaacfeae5 feat(native): follow the system language instead of an in-app picker
Declare the app's 12 languages to iOS and Android via expo-localization,
resolve the language from the device's preferred languages at start-up and
on Android runtime changes, and make Settings > Language open the system
settings page. Drops the MMKV-stored locale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 13:24:59 -04:00
jakeandClaude Sonnet 5.5 786a4ba7c5 fix(native): re-probe the server on retry and rebuild the auth client before marking a new server reachable
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-05 12:59:59 -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 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
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 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 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 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 Opus 5.5 a2724abd89 fix(imports): show a readable file format in the upload hint
The upload hint interpolated the raw `accept` string, so Trakt rendered
as "Upload a .json,.zip export…". Derive a label from `accept` with a new
locale-aware `formatList` helper ("JSON or ZIP"), and wrap the source
card descriptions in `msg` so they are translatable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 15:46:53 -04:00
Gonçalo Fonseca 56ba14aaaf fix: extract shared i18n messages. Tomorrow and Next Week not showing properly. (#59) 2026-10-04 14:51:59 -04:00
jake 75ede459d2 chore: upgrade Expo SDK 55 → 57 and React Native 0.83 → 0.86 (#54) 2026-10-04 13:47:13 -04:00
Crowdin Bot bd8ae4ccf9 New Crowdin translations by GitHub Action 2026-07-12 17:32:44 -04:00
Crowdin Bot 213977d7f8 New Crowdin translations by GitHub Action 2026-03-24 21:01:43 -04:00
Crowdin Bot 02f2c51f72 New Crowdin translations by GitHub Action 2026-03-24 16:05:21 -04:00
Crowdin Bot fe8c652b4a New Crowdin translations by GitHub Action 2026-03-23 16:35:24 -04:00
jake f2f5e823f4 fix: UX polish across web and native — error boundaries, query tuning, and i18n improvements
- Add `RouteError` component for route-level error boundaries (web) with "Try again" and "Dashboard" links; wire it into dashboard, explore, upcoming, people, and settings routes
- Add `await queryClient.cancelQueries()` before every optimistic update in `useTitleActions` to prevent in-flight refetches from overwriting local state
- Cap all `useInfiniteQuery` calls at `maxPages: 10` (web and native) to bound memory growth on scroll-heavy pages
- Replace `ActivityIndicator` with `Spinner` in search, person detail, and list footer components (native)
- Tune native query client defaults: add `staleTime: 60_000` and lower `gcTime` to `300_000` (was 24h)
- Darken `--color-muted-foreground` for better contrast in the native theme
- Improve error message copy in `error-messages.ts` for clarity (TMDB, import, registration errors)
- Update i18n `.po` files across all 12 locales with new strings (route error, improved error messages)
2026-03-22 16:46:39 -04:00
Crowdin Bot ef90e57f19 New Crowdin translations by GitHub Action 2026-03-21 13:06:23 -04:00
jake 1a503df2ae feat: add upcoming episodes and movies timeline (#17) 2026-03-21 12:31:53 -04:00
jake 5aaf88591b feat(i18n): add RTL layout support for Arabic and other RTL locales
- Export `isLocaleRTL` from `@sofa/i18n` to detect right-to-left locales
- Native: call `I18nManager.allowRTL` / `forceRTL` on locale init and on locale change; reload the app immediately if the current layout direction doesn't match the persisted locale, and prompt the user to restart when switching between LTR and RTL locales
- Native: flip the `SettingsRow` chevron to `IconChevronLeft` when `I18nManager.isRTL` is true
- Native: add Arabic Intl polyfill locale data (PluralRules, NumberFormat, DateTimeFormat, RelativeTimeFormat)
- Web: enable `"rtl": true` in `components.json` and regenerate all shadcn UI components to use CSS logical properties (`ms-*`, `me-*`, `ps-*`, `pe-*`, `text-start`, `text-end`) instead of physical `ml-*`/`mr-*`/`text-left` equivalents
- Web: apply the same logical-property conversions to non-generated components (nav-bar, settings sections, title cards, hero banner, continue-watching card)
- Web: set `document.dir` based on the active locale's RTL flag in the i18n initialiser and root route
- Add `../../packages/i18n/src/po.d.ts` to native `tsconfig.json` includes so TypeScript accepts `.po` imports
2026-03-20 19:25:04 -04:00
jake b540a9111a refactor(i18n): replace compiled .ts catalogs with direct .po imports
- Remove `lingui compile` / `i18n:compile` script — Vite and Metro LingUI plugins now compile `.po` files on the fly at dev/build time; no manual compile step needed
- Import `.po` files directly in `@sofa/i18n` (`./po/en.po` etc.) and add `po.d.ts` ambient module declaration so TypeScript accepts them
- Add `fallbackLocales: { default: "en" }` and `lineNumbers: false` to `lingui.config.ts`; prefix catalog paths with `<rootDir>` for correctness
- Derive `SupportedLocale` and `SUPPORTED_LOCALES` from `LOCALE_INFO` in `locales.ts` to eliminate the circular import between `index.ts` and `locales.ts`
- Update Crowdin config to use `project_id_env` instead of a hardcoded ID, drop `languages_mapping` (no longer needed), and add `preserve_hierarchy: true`
- Add a daily cron trigger (`0 6 * * *`) to the Crowdin GitHub Actions workflow and drop the now-redundant compile step from it
- Update docs and `AGENTS.md` to reflect that no compile step is required after `i18n:extract`
2026-03-20 16:36:02 -04:00
jake 5c70d29fac refactor: consolidate watchlist states (#18)
- Rename `watchlist` → `in_watchlist` and `in_progress` → `watching` across the full stack (DB migration, Drizzle schema, core services, API contract, web, native)
- Add a new `caught_up` status for TV shows where all aired episodes are watched but the show is still airing
- Add `titles.watchAll` procedure and `markAllWatched` action to mark every episode of a TV show as watched in one step; replace the old "Mark as Watching" / "Mark as Completed" context-menu actions with "Mark All Watched" (TV) and "Mark as Watched" (movie)
- Extract `display-status.ts` in `@sofa/api` to share status → display label/color logic between web and native
- Add `getDisplayStatusesByTitleIds` to `@sofa/core/tracking` and wire it into the dashboard library feed so clients receive resolved display statuses
- Show a destructive Alert confirmation before removing a title from the library (native)
- Remove "Mark as Completed" from the continue-watching card context menu
- Update i18n catalogs for all 6 locales (de, en, es, fr, it, pt)
2026-03-20 15:31:31 -04:00
jake 78266cf202 feat(native): internationalize tab bar labels and improve recently-viewed row
- Wrap tab bar trigger labels and stack screen titles with `useLingui()` / `t` so they translate correctly across all 6 supported locales
- Swap `IconDeviceTv` → `IconDeviceTvOld` in the recently-viewed badge to match the icon used elsewhere in the app
- Show the type icon inside the pill badge and display a department label (Actor, Director, Writer, etc.) for person results instead of the generic "Person" / "TV" label
- Suppress the subtitle row for person results (department is shown in the badge instead)
- Merge the separate iOS/Android `headerTitleStyle` variables in `TabStack` into a single shared style
- Mark `packages/i18n/src/po/*` as readonly/excluded in VS Code settings alongside `routeTree.gen.ts`
- Extract and compile updated PO/TS catalogs for all locales (de, en, es, fr, it, pt)
2026-03-19 15:06:02 -04:00
jake 7b0c07ad3c chore(i18n): add Claude-powered translation script and fill missing PO translations
- Add `packages/i18n/scripts/claude.ts` — a Bun script that translates empty PO entries via the Claude Code CLI, supporting batch mode, dry-run, optional AI context from `crowdin-context.jsonl`, and structured JSON output validation
- Add `i18n:claude` root script (`bun packages/i18n/scripts/claude.ts`) as a convenience alias
- Fill all previously empty msgstr entries across de, es, fr, it, pt PO catalogs and recompile `.ts` catalogs
- Polish README with badges (license, CI status, release, language, Crowdin localization) and minor formatting fixes
2026-03-18 20:42:01 -04:00
jakeandClaude Opus 4.6 ad0497ccd6 feat: add i18n with LingUI, Crowdin integration, and typed error codes (#16)
* feat: add i18n with LingUI, Crowdin integration, and typed error codes

- Add `@sofa/i18n` shared package with LingUI v5 (v6-ready config using
  `defineConfig` + `@lingui/format-po`), eager English + lazy-loaded
  fr/de/es/it/pt catalogs, `Intl`-based date/number format utilities,
  and test helpers
- Wire `@lingui/vite-plugin` + babel macro plugin for web, and
  `@lingui/metro-transformer` + babel config for native
- Add `I18nProvider` to both app roots with locale auto-detection
  (navigator.language / expo-localization) and persistence
  (localStorage / MMKV)
- Wrap all ~512 user-facing strings across web and native with LingUI
  macros (`<Trans>`, `useLingui`/`t`, `i18n._(msg`...`)`, `plural`)
- Add language switcher to Settings in both apps
- Add `@sofa/api/errors` with 13 typed `AppErrorCode` values and
  `appErrorData()` helper for contract `.errors()` schemas
- Update all oRPC contract error definitions with typed `data` fields;
  convert import procedure `throw new Error()` to `ORPCError` with codes
- Add per-app `error-messages.ts` utilities that map error codes to
  localized strings; update global `QueryCache.onError` handlers to stop
  leaking raw `error.message` to users
- Add `crowdin.yml` config and `.github/workflows/crowdin.yml` for
  automated source upload on merge and translation pull via dispatch
- Add `lingui.config.ts` at repo root with `bun run i18n:extract` and
  `bun run i18n:compile` convenience scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: add Crowdin language mapping and ignore context file

* fix(i18n): address 20 localization quality issues

- Stop leaking raw error.message to users in change-password and
  account-section; use localized fallbacks instead
- Add typed error data to discover contract's .errors() schema
- Replace all manual English plural suffixes with LingUI plural() macro
  in episode counts, backup counts, star ratings, title/image counts
- Replace date-fns formatDistanceToNow and hardcoded date patterns with
  locale-aware formatDate/formatRelativeTime from @sofa/i18n/format
- Convert integration-configs from module-scope translations (frozen at
  import time) to lazy getIntegrationConfigs(i18n) function
- Combine split Trans fragments into single translatable units in
  backup-schedule retention sentence and stats-display period labels
- Localize TV media type badge and full episode accessibilityLabel
- Replace Android-incompatible Alert.alert language picker (max 3
  buttons) with zeego DropdownMenu
- Await async locale initialization before hiding splash screen so
  non-English users don't see English flash on cold start
- Add @lingui/core as direct native app dependency

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(i18n): add Intl polyfills for Hermes, replace DropdownMenu language picker, and remove date-fns
- Add `@formatjs/intl-*` polyfills loaded at app startup in `intl-polyfills.ts` so Hermes on Android has full `Intl` support for locale-aware formatting
- Alias `@formatjs/icu-messageformat-parser` to its `no-parser` variant in metro config to reduce bundle size
- Replace the zeego `DropdownMenu` language picker in Settings with a new `SelectModal` component that works reliably on all platforms without the Android 3-button limit
- Replace `date-fns` `format`/`parseISO` in `person/[id].tsx` with `formatDate` from `@sofa/i18n/format`; remove `date-fns` from native and web `package.json`
- Refactor `StatusActionButton` to use a `StatusLabel` component with `<Trans>` rather than a `getStatusConfig(t)` factory so labels are always reactive to locale changes
- Fix crowdin workflow to use root `bun run i18n:compile` script instead of `cd packages/i18n && bun run compile`
- Wrap root layout `GestureHandlerRootView` in `SafeAreaProvider` and add `.catch` to locale-ready promise to prevent unhandled rejections blocking the splash screen

* fix(i18n): localize integration status helpers, fix stats-display Trans wrapping, and clean up SelectModal
- Localize `webhookStatus` and `listStatus` in `integration-card.tsx` using `i18n._(msg`...`)` so status strings are translated instead of always rendering in English
- Wrap "Movies {select}" and "Episodes {select}" in a single `<Trans>` in `stats-display.tsx` so the period selector element is embedded inside the translatable unit rather than concatenated outside it
- Fix locale activation order in Settings: close the modal first, then `activateLocale`, and only call `setPersistedLocale` on success to avoid persisting a locale that failed to load
- Remove the redundant `SafeAreaProvider`/`SafeAreaView` wrapper from `SelectModal` — the root layout already provides `SafeAreaProvider`
- Recompile all six `.po`/`.ts` catalogs to pick up new and updated message strings

* chore(i18n): crowdin sync

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:16:10 -04:00