Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Nov 7, 2025

opening this pr to reduce the size of the two-point-nine branch

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a new "You Win" animation asset to the mobile SDK.
  • Chores

    • Optimized animation asset file formats for improved loading performance through size reduction.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Walkthrough

The PR reformats four existing JSON animation assets from pretty-printed to minified format and introduces a new animation asset file (youWin.json) containing keyframes and layered composition definitions for the mobile SDK.

Changes

Cohort / File(s) Summary
Animation Asset Minification
packages/mobile-sdk-alpha/src/animations/loading/fail.json, misc.json, prove.json, success.json
Reformatted from multi-line, human-readable JSON to compact, single-line minified format. Data structure and values remain unchanged; only whitespace and line breaks removed.
New Animation Asset
packages/mobile-sdk-alpha/src/animations/loading/youWin.json
Added new animation asset defining a multi-layer, time-animated composition with keyframe data, transform properties, shape definitions, opacity animations, and layer hierarchy.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Verify youWin.json is valid JSON and follows the structural pattern of existing animation files
  • Confirm minified files did not inadvertently strip or corrupt data during formatting

Possibly related PRs

Poem

✨ Four animations trimmed to fit,
Minified bytes, each bit a hit,
A victory call—youWin appears,
Loading states through all the years! 🎬

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'minify app animations' is directly related to the main change—all modified files are JSON animation assets being reformatted from pretty-printed to minified format.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch justin/minify-animations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/mobile-sdk-alpha/src/animations/loading/youWin.json (1)

1-1: Valid new asset, but verify integration and documentation.

The youWin.json asset is properly formatted and follows the established animation structure. However, ensure it's integrated correctly into the SDK's loader/export mechanism and documented in the README.

Per the learnings, new/updated SDK modules should be documented in packages/mobile-sdk-alpha/README.md.

Please confirm:

  1. Whether animation files are auto-discovered by the SDK loader or require explicit imports
  2. If documentation updates are needed in the README for the new "youWin" animation
  3. Whether any export statements in a parent module need updating (e.g., index.ts, animations loader)
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ccb9e14 and 28fc901.

📒 Files selected for processing (5)
  • packages/mobile-sdk-alpha/src/animations/loading/fail.json (1 hunks)
  • packages/mobile-sdk-alpha/src/animations/loading/misc.json (1 hunks)
  • packages/mobile-sdk-alpha/src/animations/loading/prove.json (1 hunks)
  • packages/mobile-sdk-alpha/src/animations/loading/success.json (1 hunks)
  • packages/mobile-sdk-alpha/src/animations/loading/youWin.json (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md

Applied to files:

  • packages/mobile-sdk-alpha/src/animations/loading/success.json
  • packages/mobile-sdk-alpha/src/animations/loading/misc.json
  • packages/mobile-sdk-alpha/src/animations/loading/prove.json
  • packages/mobile-sdk-alpha/src/animations/loading/youWin.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)

Applied to files:

  • packages/mobile-sdk-alpha/src/animations/loading/misc.json
  • packages/mobile-sdk-alpha/src/animations/loading/prove.json
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/**/package.json : Ensure package exports are properly configured

Applied to files:

  • packages/mobile-sdk-alpha/src/animations/loading/prove.json
📚 Learning: 2025-08-24T18:54:04.809Z
Learnt from: CR
Repo: selfxyz/self PR: 0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.809Z
Learning: Applies to packages/mobile-sdk-alpha/src/proving/** : Place proof input generation in packages/mobile-sdk-alpha/src/proving/

Applied to files:

  • packages/mobile-sdk-alpha/src/animations/loading/prove.json
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: type-check
  • GitHub Check: e2e-ios
  • GitHub Check: android-build-test
  • GitHub Check: build-deps
  • GitHub Check: android-e2e
  • GitHub Check: analyze-android
  • GitHub Check: analyze-ios
  • GitHub Check: ios-e2e
🔇 Additional comments (4)
packages/mobile-sdk-alpha/src/animations/loading/fail.json (1)

1-1: Minification complete and effective.

The JSON has been successfully minified to a single line, reducing whitespace without altering structure or semantics. The asset remains valid and functional.

packages/mobile-sdk-alpha/src/animations/loading/misc.json (1)

1-1: Minification complete and valid.

Successfully reformatted to compact single-line JSON with structure and data integrity maintained.

packages/mobile-sdk-alpha/src/animations/loading/success.json (1)

1-1: Minification complete and valid.

Successfully minified with all keyframe, color, and transform data preserved.

packages/mobile-sdk-alpha/src/animations/loading/prove.json (1)

1-1: Minification complete and valid.

Successfully minified with all stroke properties, keyframes, and composition data preserved correctly.

@transphorm transphorm merged commit 77b063c into dev Nov 7, 2025
29 checks passed
@transphorm transphorm deleted the justin/minify-animations branch November 7, 2025 22:33
transphorm added a commit that referenced this pull request Nov 7, 2025
* Setup and add turnkey utils

* update CloudBackupScreen

* fix: turnkey

* add yarn.lock

* lint

* add podfile.lock

* fix deeplink

* fix tests: mock turnkey

* yarn nice

* update .gitleaksignore

* patch react-native-svg

* fix patch-package

* fix lineHeight

* points.tsx: fix lineHeight

* fix: recover with turnkey disabled state

* fix turnkey flow

* fix: address generation

* minify animations (#1368)

* fix pipelines

* fix false positives

* fix gitguardian

---------

Co-authored-by: Justin Hernandez <[email protected]>
transphorm added a commit that referenced this pull request Nov 11, 2025
* 2.9 release

* 2.9 release

* Remove debug console logs from generateTEEInputsRegister function in registerInputs.ts

* parse only the passport data during the dsc step

* Add ReferralScreen and integrate referral functionality
- Introduced ReferralScreen for sharing referral links via messages, WhatsApp, and clipboard.
- Updated navigation to include ReferralScreen in the home stack.
- Added new icons for sharing and messaging.
- Enhanced points utility functions to check user identity document registration and points disclosure status.
- Minor adjustments to existing components for better integration with the new referral feature.

* fix types

* fix font

* fix vertical spacing

* save current abstraction

* clean up linking

* clean up spurious ai slop comments

* add dinot bold font

* minify animations

* update fonts and add placeholder animation

* fix pipelines

* fix order

* Update dependencies and enhance Points component functionality
- Added `@react-native-masked-view/masked-view` and `react-native-linear-gradient` to dependencies for improved UI components.
- Refactored `PointHistoryList` to accept `ListHeaderComponent` and `onRefreshRef` props for better integration with parent components.
- Enhanced `Points` component to manage notification and backup point events, including user feedback through modals.
- Updated navigation to use `PointsNavBar` for a more cohesive user experience.
- Introduced new utility functions for managing incoming points and point event records.

* update lock

* update lock and project settings

* fix line height for android

* save wip referral message fix and deeplink setup

* Fix whatsapp link (#1352)

* add 2 new lines

* use path based param instead of query string

* use staging url for now

* SELF-1089: Fix black screen on Points (#1351)

* Fix black screen on Points

* Fix: black screen on Referral Page

* fix: prevent BlurView from displaying when IdDetailsScreen loses focus

* Fix Android message share (#1355)

* Referral flow (#1354)

* SELF-1139: update getUserAddress() (#1353)

* update getUserAddress()

* rename getUserAddress to getPointsAddress

* [SELF-1098, SELF-1099] polish gratification screen post referrer update history (#1356)

* fix: mark document as registered after restoring secret (#1350)

* update lock

* create useRegisterReferral hook and test

* add referral message test

* save wip register referral flow request

* use register referral from the home screen

* fix typing and sort screens

* fix linting issues

* register poitns and update tests

* use package

* fix tests

* simplify HomeScreen with hooks

* fix tests

* address tests

* abstract points logic, fix types and linting

* add test referral flow hook

* coderabbit feedback: fix refereral logic issues, remove sensitive logs

* move test referral flow button to dev settings screen

* close modal after referring and viewing gratification screen

* fix tests, remove alert, format

---------

Co-authored-by: Seshanth.S <[email protected]>

* add gratification bg; use safe bottom padding hook on home screen

* prep 2.7.4 as 2.9.0

* manually bump version for custom deploy

* match version code

* fix types

* formatting

* fix tests

* SELF-1144 - use real points on home screen and improve points screen (#1361)

* fix whitespace

* move effects for fetching points and incoming points to hooks, add items to deps array so that they refresh when we expect points to change.

* cleanup

* Add events for new Points Flow (#1362)

* remove deeplinkCallback from pointsSelfApp. (#1365)

* fix pipelines

* SELF-978: wire cloudbackup with points (#1360)

* wire cloudbackup with points

* wire cloudbackup with points

* Remove redundant setSelfPoints()

* add signature and simplify POST api requests (#1367)

* add signature and simplify POST api requests

* better gitleaks ignore

* update toml

* have gitguardian ignore gitleaks

* add buffer lib

* update api with 202 success code

* update scope and contract-address (#1366)

* fix navigation test

* SELF-915: Setup and add turnkey utils (#1314)

* Setup and add turnkey utils

* update CloudBackupScreen

* fix: turnkey

* add yarn.lock

* lint

* add podfile.lock

* fix deeplink

* fix tests: mock turnkey

* yarn nice

* update .gitleaksignore

* patch react-native-svg

* fix patch-package

* fix lineHeight

* points.tsx: fix lineHeight

* fix: recover with turnkey disabled state

* fix turnkey flow

* fix: address generation

* minify animations (#1368)

* fix pipelines

* fix false positives

* fix gitguardian

---------

Co-authored-by: Justin Hernandez <[email protected]>

* enable turnkey only on success

* use prod url

* fix tests and update mocks

* update version and fastlane readme

* pointsSelfApp: update scope

* bump android version to 117

* incremenet timestamp

* abstract points css, hide explore button for now, add points guardrail

* better logic

* simplify point event list data acquisition (#1375)

* simplify point event list data acquisition

* explain

* Remove BlurView in Points.tsx

* Move Points and IncomingPoints to the Point Events Store (#1363)


* add polling for event processing.
atomically update store state

* handle failed states and use real backend api


* improve concurrency reliability of pointevents

* move points to the store


* refresh all points on pull

* add points tracking events

* fix imports

* fix headers

* fix import

* fix misspelling

* enable apps link

* remove __DEV__ logging

* remove additional referall dev mode features

* Add turnkey env

* don't allow users to refer themselves

* prettier

* trim both addresses

* fix close webview button

* fix tests and format

* lint and format

* Update point rewards in NavBar component: change earned points from 20 to 44 and from 100 to 32.

* Refactor point rewards in NavBar component: replace hardcoded values with constants for backup and notification points, and update subscription state variable names for clarity.

* Update POINT_VALUES in types.ts: adjust point rewards for disclosure, notification, and backup events to 8, 44, and 32 respectively.

* App/fix backup points (#1381)

* Enhance backup completion tracking in Points component: Introduce a ref to manage backup check flag, ensuring points are recorded only when explicitly set, preventing false triggers from other navigation flows.

* Update API endpoint in getTotalPoints function: change URL from /distribution to /points for accurate points retrieval.

* formatting

* update points url

* Clear referrer on modal dismiss in useEarnPointsFlow hook to prevent retry loop

* use points private key to sign api requests

* formatting

* save working version of referral confirmation

* fix circular dependency

* don't fetch private key if unable to fetch points key

* add url

* add debug info

* Refactor optimistic points calculation in usePointEventStore: update return value to only include incomingPoints.amount, marking the optimistic approach for future improvement.

* save clean up

* clean useReferralConfirmation logic

* fix tests

* tests pass

* standardize android compile sdk version

* fix package version

* don't log errors

* Update app/src/hooks/useReferralConfirmation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* better test

* add turnkey entitlements

* fix linting

* remove entitlements

* prettier and fix lint

* update gradle version

* update lock file

* fix tests

* fix build failure

* bump android version to 118

* update date

* bump version for next build

* address failing pipelines due to cache issues

* Hide turnkey button (#1387)

* prep for 2.9.0 release

* fix mobile e2e test

* fix tests

* bump android version

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S <[email protected]>
Co-authored-by: Leszek Stachowski <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: seshanthS <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
transphorm added a commit that referenced this pull request Nov 12, 2025
* 2.9 release

* 2.9 release

* Remove debug console logs from generateTEEInputsRegister function in registerInputs.ts

* parse only the passport data during the dsc step

* Add ReferralScreen and integrate referral functionality
- Introduced ReferralScreen for sharing referral links via messages, WhatsApp, and clipboard.
- Updated navigation to include ReferralScreen in the home stack.
- Added new icons for sharing and messaging.
- Enhanced points utility functions to check user identity document registration and points disclosure status.
- Minor adjustments to existing components for better integration with the new referral feature.

* fix types

* fix font

* fix vertical spacing

* save current abstraction

* clean up linking

* clean up spurious ai slop comments

* add dinot bold font

* minify animations

* update fonts and add placeholder animation

* fix pipelines

* fix order

* Update dependencies and enhance Points component functionality
- Added `@react-native-masked-view/masked-view` and `react-native-linear-gradient` to dependencies for improved UI components.
- Refactored `PointHistoryList` to accept `ListHeaderComponent` and `onRefreshRef` props for better integration with parent components.
- Enhanced `Points` component to manage notification and backup point events, including user feedback through modals.
- Updated navigation to use `PointsNavBar` for a more cohesive user experience.
- Introduced new utility functions for managing incoming points and point event records.

* update lock

* update lock and project settings

* fix line height for android

* save wip referral message fix and deeplink setup

* Fix whatsapp link (#1352)

* add 2 new lines

* use path based param instead of query string

* use staging url for now

* SELF-1089: Fix black screen on Points (#1351)

* Fix black screen on Points

* Fix: black screen on Referral Page

* fix: prevent BlurView from displaying when IdDetailsScreen loses focus

* Fix Android message share (#1355)

* Referral flow (#1354)

* SELF-1139: update getUserAddress() (#1353)

* update getUserAddress()

* rename getUserAddress to getPointsAddress

* [SELF-1098, SELF-1099] polish gratification screen post referrer update history (#1356)

* fix: mark document as registered after restoring secret (#1350)

* update lock

* create useRegisterReferral hook and test

* add referral message test

* save wip register referral flow request

* use register referral from the home screen

* fix typing and sort screens

* fix linting issues

* register poitns and update tests

* use package

* fix tests

* simplify HomeScreen with hooks

* fix tests

* address tests

* abstract points logic, fix types and linting

* add test referral flow hook

* coderabbit feedback: fix refereral logic issues, remove sensitive logs

* move test referral flow button to dev settings screen

* close modal after referring and viewing gratification screen

* fix tests, remove alert, format

---------

Co-authored-by: Seshanth.S <[email protected]>

* add gratification bg; use safe bottom padding hook on home screen

* prep 2.7.4 as 2.9.0

* manually bump version for custom deploy

* match version code

* fix types

* formatting

* fix tests

* SELF-1144 - use real points on home screen and improve points screen (#1361)

* fix whitespace

* move effects for fetching points and incoming points to hooks, add items to deps array so that they refresh when we expect points to change.

* cleanup

* Add events for new Points Flow (#1362)

* remove deeplinkCallback from pointsSelfApp. (#1365)

* fix pipelines

* SELF-978: wire cloudbackup with points (#1360)

* wire cloudbackup with points

* wire cloudbackup with points

* Remove redundant setSelfPoints()

* add signature and simplify POST api requests (#1367)

* add signature and simplify POST api requests

* better gitleaks ignore

* update toml

* have gitguardian ignore gitleaks

* add buffer lib

* update api with 202 success code

* update scope and contract-address (#1366)

* fix navigation test

* SELF-915: Setup and add turnkey utils (#1314)

* Setup and add turnkey utils

* update CloudBackupScreen

* fix: turnkey

* add yarn.lock

* lint

* add podfile.lock

* fix deeplink

* fix tests: mock turnkey

* yarn nice

* update .gitleaksignore

* patch react-native-svg

* fix patch-package

* fix lineHeight

* points.tsx: fix lineHeight

* fix: recover with turnkey disabled state

* fix turnkey flow

* fix: address generation

* minify animations (#1368)

* fix pipelines

* fix false positives

* fix gitguardian

---------

Co-authored-by: Justin Hernandez <[email protected]>

* enable turnkey only on success

* use prod url

* fix tests and update mocks

* update version and fastlane readme

* pointsSelfApp: update scope

* bump android version to 117

* incremenet timestamp

* abstract points css, hide explore button for now, add points guardrail

* better logic

* simplify point event list data acquisition (#1375)

* simplify point event list data acquisition

* explain

* Remove BlurView in Points.tsx

* Move Points and IncomingPoints to the Point Events Store (#1363)


* add polling for event processing.
atomically update store state

* handle failed states and use real backend api


* improve concurrency reliability of pointevents

* move points to the store


* refresh all points on pull

* add points tracking events

* fix imports

* fix headers

* fix import

* fix misspelling

* enable apps link

* remove __DEV__ logging

* remove additional referall dev mode features

* Add turnkey env

* don't allow users to refer themselves

* prettier

* trim both addresses

* fix close webview button

* fix tests and format

* lint and format

* Update point rewards in NavBar component: change earned points from 20 to 44 and from 100 to 32.

* Refactor point rewards in NavBar component: replace hardcoded values with constants for backup and notification points, and update subscription state variable names for clarity.

* Update POINT_VALUES in types.ts: adjust point rewards for disclosure, notification, and backup events to 8, 44, and 32 respectively.

* App/fix backup points (#1381)

* Enhance backup completion tracking in Points component: Introduce a ref to manage backup check flag, ensuring points are recorded only when explicitly set, preventing false triggers from other navigation flows.

* Update API endpoint in getTotalPoints function: change URL from /distribution to /points for accurate points retrieval.

* formatting

* update points url

* Clear referrer on modal dismiss in useEarnPointsFlow hook to prevent retry loop

* use points private key to sign api requests

* formatting

* save working version of referral confirmation

* fix circular dependency

* don't fetch private key if unable to fetch points key

* add url

* add debug info

* Refactor optimistic points calculation in usePointEventStore: update return value to only include incomingPoints.amount, marking the optimistic approach for future improvement.

* save clean up

* clean useReferralConfirmation logic

* fix tests

* tests pass

* standardize android compile sdk version

* fix package version

* don't log errors

* Update app/src/hooks/useReferralConfirmation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* better test

* add turnkey entitlements

* fix linting

* remove entitlements

* prettier and fix lint

* update gradle version

* update lock file

* fix tests

* fix build failure

* bump android version to 118

* update date

* bump version for next build

* address failing pipelines due to cache issues

* Hide turnkey button (#1387)

* prep for 2.9.0 release

* patch turnkey to prevent keychain deletes

* add yarn.lock

* update yarn.lock

* enable buttons

* remove console logging from patch

* fix test

* skip tests

* fix test

* allow users to advance if they backup via turnkey

* Recognize Turnkey backups in onboarding (#1394)

* rename var

* update var name

* remove transform

* simplify tests to avoid oom issues

* fix check

* fix tests

---------

Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Leszek Stachowski <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

2 participants