Commit Graph

789 Commits

Author SHA1 Message Date
Johannes Klein
3036529323 Switch react-native-fs (#3524)
* Update package.json

* Update package-lock.json

* Update Podfile.lock

* Update PrivacyInfo.xcprivacy

* Update react-native-logs.config.ts

* Update paths.ts

* Update savePhotoToDocumentsDirectory.ts

* Update useAppSize.ts

* Update installData.ts

* Update mlModel.ts

* Update storageMetrics.ts

* Update removeAllFilesFromDirectory.ts

* Update util.ts

* Update removeSyncedFilesFromDirectory.ts

* Update contexts.ts

* Update index.ts

* Update Photo.ts

* Update Sound.js

* Update logManagementHelpers.ts

* Update PhotoLibrary.tsx

* Update flattenUploadParams.ts

* Update shouldFetchObservationLocation.ts

* Update Developer.tsx

* Update vision-camera.js

* Update sentinelFiles.ts

* Move mock

* Switch to unlink util
2026-04-14 00:57:20 +02:00
Johannes Klein
164ca02fa0 Replace involuntary sign out on jwt 401 with user action to login again (#3502)
* MOB-1276: first pass

* Move realm clearing below other resets

Before we were seeing a crash where a user signsOut and while deleting realm still has a reference to a realm object somewhere the app crashes (something along the lines of "accessing object which has been invalidated or deleted", I think). Which meant that subsequent lines here after reaml.deleteAll were never hit. So, we got rid of realm but still had the signals that the user is logged in like jwt and mmkv stuff. This is problematic because UI and server request have different definitions of a user is logged in: 1) sensitive item named "username" exists, and 2) realm entry for current user exists.
I don't see how this change here get's rid of the actual crash, but at least we maybe have more likelihood of deleting all things we want to delete here.

According to @FLGMwt s investigations into this this closes MOB-820 https://linear.app/inaturalist/issue/MOB-820/user-account-seem-to-be-mixed-up#comment-80cd5378

* Do not clear auth cache and sensitive info on automatic login again initiation

I think we should fully rely on the login again action to refresh jwtToken, jwtGeneratedAt, and accessToken.

We don't know which one of them is corrupt at this point, and a re-login will give us correct new ones.

* Remove comments

A) I don't think it means that *for any reason* we delete the local database. Only when we had a 401 we were deleting everything.
B) is alleviated

* Quick fix idea

If we are on the login screen for the login again flow do not show a close button. This means the user has to close the app and open again. If the 401 persists the only action the user can take is to do the login again.

* Alternative fix: sign out on login again flow close

Adding back the X button to the login flow. Pressing it explains that this is a sign out action and signs the user out making sure we also clear realm during an entire sign out deletion flow.

* Remove test

* Update src/components/LoginSignUp/LoginForm.tsx

Co-authored-by: Ryan Stelly <ryan@inaturalist.org>

* Clean up previous code suggestion

* Revert "Clean up previous code suggestion"

This reverts commit 345bb31510.

* Revert "Update src/components/LoginSignUp/LoginForm.tsx"

This reverts commit 968fcd8601.

---------

Co-authored-by: sepeterson <10458078+sepeterson@users.noreply.github.com>
Co-authored-by: Ryan Stelly <ryan@inaturalist.org>
2026-04-08 22:34:35 +02:00
Abbey Campbell
8438d0248a Merge pull request #3486 from inaturalist/mob-1056-nav-bar-ui-changes
Mob 1056 nav bar UI changes
2026-04-02 11:23:57 -07:00
Abbey Campbell
7736471a35 update snapshot 2026-03-31 15:41:20 -07:00
Abbey Campbell
fee6b8176f Merge pull request #3478 from inaturalist/mob-1264-announcements-design-changes
Mob 1264 announcements design changes
2026-03-31 10:19:35 -07:00
Abbey Campbell
d979202df4 test query updates 2026-03-30 11:55:44 -07:00
Johannes Klein
e3c53cf7ad Switch to react-native-exify (#3471)
* Update package.json

* Update package.json

* MIgrate parseExif to TS

* Update parseExif.ts

* Type exif objects

* Update types

* Remove write wrapper

* Update parseExif.ts

* Remove react-native-exif-reader

* Replace mock

* Wrongly mocked

* Replace library in test

* Update package-lock.json

* Update Podfile.lock

* Update project.pbxproj

* Append scheme if missing

* Log rejected promises reasons

* Update parseExif.ts

* Adjust exif coordinates with ref with

* Time zone error

* Revert "Time zone error"

This reverts commit 538fb244b7.

* Update parseExif.ts

* Update parseExif.test.js

* Show literal date string in debug mode

* Simpler regex

* Update parseExif.ts

* Major code cleanup

* Update parseExif.test.js

* Update parseExif.ts

* Update Observation.js

* Rename param

* Infer readExifFromMultiplePhotos return type
2026-03-29 20:32:40 +02:00
Abbey Campbell
4b621d69ee remove layout prop from tests 2026-03-27 12:54:24 -07:00
Abbey Campbell
77c620c2f4 fix tests 2026-03-26 18:02:33 -07:00
Abbey Campbell
e2346888fb mock only screenOptions 2026-03-25 12:18:36 -07:00
Abbey Campbell
c210b7c1de Merge pull request #3455 from inaturalist/mob-1184-startup-time-time-to-interactive
Mob 1184 startup time time to interactive
2026-03-24 11:01:01 -07:00
Seth Peterson
22be7db215 Merge pull request #3456 from inaturalist/mob-1224-refactor-obsdetails-components-to-pass-observation-id-2
MOB-1224: refactor project fetching for ProjectList
2026-03-24 09:06:28 -05:00
Abbey Campbell
a19fb0541c add polyfill for idleCallback 2026-03-23 23:46:37 -07:00
sepeterson
1c48dfe403 MOB-1224: flesh out unit test 2026-03-20 10:40:07 -05:00
Johannes Klein
c7b596a519 Update react-native-logs jest mock (#3450)
* Update jest.setup.js

* Let's log all args instead
2026-03-19 09:34:53 +01:00
sepeterson
d6964b0e86 MOB-1224: first pass 2026-03-18 16:53:17 -05:00
Ryan Stelly
793c6bb215 MOB-992 start using rolling daily logs instead of a single append-only (#3433)
* extract non-react log helpers out of custom hook

* git mv useLogs to more appropriate name / location

* update logmgmt imports, clean up getLogs

* git mv Log.js Log.tsx

* remove sharing functionality from log preview screen

* reorganize debug screen w/ headers

* refactor all Debug sections for consistency

* add rolling log config, switch existing logmgmt to 'legacy' var

* factor path out of share/email for legacy wrappers

* add 'legacy' log category in prep for showing new logs

* add legacy flag to log preview screen params

* add useLogPreview for Log screen supporting legacy and aggregated recent rolling logs

* actually support sharing the new logs w/ a tmp file of concatenated recent logs

* delete low value developer screen test

* fix double reverse and handle bad filename
2026-03-17 16:19:18 -05:00
Abbey Campbell
41f66ecf3c Merge pull request #3427 from inaturalist/mob-1234-upgrade-react-native-reanimated-to-latest-version-and-fix
Mob 1234 upgrade react native reanimated to latest version and fix
2026-03-12 16:22:43 -07:00
Abbey Campbell
1a7faba1d9 remove eslint-disables 2026-03-12 15:15:08 -07:00
Abbey Campbell
a7f262d9d6 add mock for worklets and update snapshots 2026-03-11 13:06:09 -07:00
Seth Peterson
adf33cb8b2 Merge pull request #3407 from inaturalist/mob-1182-disable-firebase-for-unauthenticated-users-and-users-with
MOB-1182: disable firebase for unauthenticated and opted-out users
2026-03-10 17:10:45 -05:00
Abbey Campbell
6aeb7ca87b update snapshots 2026-03-09 19:46:40 -07:00
sepeterson
b3ec2788a6 MOB-1182: mocks for unit tests 2026-02-26 11:10:42 -06:00
Johannes Klein
25c13c9eb5 Reapply react-native-sensitive-info update with "migration" (#3373)
* Reapply "Update react-native-sensitive-info to 5.6.2 (#3346)"

This reverts commit 4bd596074c.

* Explicitly set keychainService to "app" for all calls to RNSInfo

So, apparently the default string used to save sensitive items changed from "app" to "default" between versions 6.0.0-alpha.9 and 5.6.2.
So if we install an app update built with 5.6.2 on top of our previous version (using 6.0.0-alpha.9) we can no longer find our previously stored secrets.
I am leaving the key as overridable by actual options propped in, in case someone wants to build a separate slice at one point. In contrast to accessControl which probably should not be a decision in engineerings court.

* Add comment

* Update test helpers
2026-02-19 22:36:20 +01:00
Johannes Klein
ee59977501 Consolidate named and default export (#3387)
* Rely only on default export for savePhotosToPhotoLibrary

* Fix the same in useSuggestions

We already only use the default export.
2026-02-19 21:16:48 +01:00
Johannes Klein
4bd596074c Revert "Update react-native-sensitive-info to 5.6.2 (#3346)"
This reverts commit d30e788ed0.
2026-02-11 23:51:15 +01:00
Johannes Klein
d30e788ed0 Update react-native-sensitive-info to 5.6.2 (#3346)
* Update react-native-sensitive-info

* Delete react-native-sensitive-info+6.0.0-alpha.9.patch

* Migrate sensitive info error handling

* Lint rules changes

* Add comment

* Remove incomplete type

* Add hasItem mock

* Update type

* Remove exported function getUsername

This is nowhere imported, used only in AuthenticationService. Have added the only function that makes use of getSensitiveItem( "username" ) = isCurrentUser to the Auth integration test instead.

* Update package-lock.json

* Update Podfile.lock

* Replace string with exported error code

* Add try catch to hasItem call
2026-02-10 23:42:35 +01:00
Ryan Stelly
10137c4b83 implement experiment for running offline suggestions in parallel to online (#3321)
* extract imperative offline sugg logic and sneak that into online query for experiment

* fire-and-forget promise before await, fix types & function names

* fix useOffline's useEffect misfiring
2026-02-06 10:13:07 -06:00
sepeterson
98845b0598 Merge branch 'main' into mob-968-add-edit-icon-to-top-right-of-match-screen-2 2026-02-04 10:30:04 -06:00
Abbey Campbell
f4faf3a47d Merge pull request #3326 from inaturalist/mob-1047-add-sorting-to-my-observations
Mob 1047 add sorting to my observations
2026-02-03 11:18:30 -08:00
Johannes Klein
3d9f2c3040 Refactor lodash function imports (#3348)
* Change destructured imports to individual imports

* Change full lodash imports to individual function imports

* Remove unused imports

* One more
2026-02-03 18:12:48 +01:00
sepeterson
a48877a85b MOB-1089: merge main 2026-01-29 21:35:55 -06:00
sepeterson
815e47e533 MOB-1089: more cleanup 2026-01-29 20:56:53 -06:00
sepeterson
a1aa257c12 MOB-1089: rm unnecessary test logic 2026-01-25 14:43:49 -06:00
sepeterson
41fa4b7734 MOB-968: unrefactor Match screen 2026-01-20 11:32:59 -06:00
sepeterson
027292e418 Merge branch 'main' into mob-968-add-edit-icon-to-top-right-of-match-screen-2 2026-01-19 22:05:27 -06:00
sepeterson
806a1c6c9a MOB-1089: add some reducer tests 2026-01-19 22:01:06 -06:00
sepeterson
73073ecee7 MOB-1089: add id sheet tests 2026-01-19 21:38:48 -06:00
Ryan Stelly
cda082d555 additional user context for feedback (#3324)
* additional context when submitting user feedback

* remove log

* add local obs count

* add a generic breakpoint mapper as a shared function and migrate media query breakpoints to use it

* remove original getBreakpoint impl after test validated

* switch feedback logging to structured data
2026-01-16 15:33:29 -06:00
sepeterson
8e72928400 MOB-1089: tests for SuggestIDSheet 2026-01-16 09:43:23 -06:00
Abbey Campbell
409f0edace update snapshots 2026-01-15 13:32:06 -08:00
sepeterson
cf5ab3abe2 MOB-968: test fix 2026-01-12 12:17:42 -06:00
sepeterson
20fd3559bb MOB-968: don't make user discard match for automatic obs updates 2026-01-12 11:55:29 -06:00
sepeterson
2c3206e7fe Merge branch 'main' into mob-1077-cannot-go-back-from-edit-saved-observation-screen 2026-01-09 16:54:24 -06:00
sepeterson
0baef4ab75 MOB-721: consolidate test files 2026-01-09 09:11:38 -06:00
sepeterson
287cb5b94c MOB-721: fix tests, linting, and some visual bugs 2026-01-07 17:08:19 -06:00
sepeterson
a8deb6f5f3 MOB-721: first pass component consolidation 2026-01-06 19:16:02 -06:00
sepeterson
7bb9831198 MOB-1077: navigate back from obs edit discard changes for match flow 2026-01-05 10:20:29 -06:00
sepeterson
964451ae33 MOB-1077 better component name 2026-01-01 18:40:14 -06:00
sepeterson
02cbf91aa1 MOB-1077: rm SavedMatchHeaderRight and add unit tests 2025-12-29 14:03:00 -06:00