Skip to content

Conversation

@NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Aug 14, 2025

Again does what it says, allow the webapp to query the app version, so we can enable and disable feature depending on the version

Summary by CodeRabbit

  • New Features

    • App now provides and displays its version and build number (accurate across Expo Go and standalone installs).
  • Chores

    • App version updated to 3.4.0.
    • Added a dependency to improve reliable retrieval of version/build information across environments.

@coderabbitai
Copy link

coderabbitai bot commented Aug 14, 2025

📝 Walkthrough

Walkthrough

Adds expo-application dependency, bumps app.json version and runtimeVersion to 3.4.0, and registers a new MessageManager handler getAppVersion that returns { version, buildNumber } using app.json in Expo Go or expo-application values in native builds.

Changes

Cohort / File(s) Summary of Changes
Configuration
app.json, package.json
app.json: version 3.3.1 → 3.4.0 and runtimeVersion 3.3.0 → 3.4.0. package.json: added dependency expo-application ^6.1.5.
Message Manager
src/lib/getMessageManager.ts
Added imports for expo-application, expo-constants, and local app.json; added isRunningInExpoGo detection; registered new getAppVersion handler returning `{ version: string; buildNumber: string

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant MessageManager
  participant Env

  Client->>MessageManager: invoke("getAppVersion")
  alt Running in Expo Go
    MessageManager->>Env: read appJson.version
    Env-->>MessageManager: version
    MessageManager-->>Client: { version, buildNumber: undefined }
  else Running standalone/native
    MessageManager->>Env: read Application.nativeApplicationVersion & nativeBuildVersion
    Env-->>MessageManager: version, buildNumber
    MessageManager-->>Client: { version, buildNumber }
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

I hop through package.json and app.json bright,
Bumped to three-four-oh in the soft twilight.
I check if Expo Go's my roaming ground,
Or native builds where build numbers are found.
A whisker-twitch — version returned, light and spry 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch app-version

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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: 2

🔭 Outside diff range comments (1)
app.json (1)

61-61: CRITICAL: Bump runtimeVersion (or set policy) to avoid OTA crashes after adding a new native module.

This PR adds a new native module (expo-application). Shipping this via EAS Updates without bumping runtimeVersion can push a JS bundle to older binaries that don’t contain the native module, leading to runtime “unavailability”/module-not-found crashes at startup (due to the static import in getMessageManager.ts).

Two safe options:

  • Bump runtimeVersion to a new value (e.g., 3.3.2) and ship a new binary.
  • Preferably, adopt the appVersion policy so runtimeVersion auto-tracks app version.

Example update:

"runtimeVersion": { "policy": "appVersion" }

or

"runtimeVersion": "3.3.2"

Note: See the getMessageManager.ts comment for an additional guard (dynamic import) to keep older clients from crashing if they ever receive a mismatched bundle.

I can provide a minimal PR diff to switch to policy-based runtimeVersion if desired.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 397d561 and eb3e0ad.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • app.json (1 hunks)
  • package.json (1 hunks)
  • src/lib/getMessageManager.ts (2 hunks)
🔇 Additional comments (2)
app.json (1)

3-3: Version bump looks good; ensure store build numbers are incremented for release.

Marketing version is now 3.3.2. If you intend to ship a new binary:

  • Android: increment android.versionCode (currently 329).
  • iOS: ensure ios.buildNumber is incremented (not present here; either add it or use EAS auto-increment).

If you rely on EAS auto-increment, confirm eas.json is configured accordingly to avoid upload failures.

package.json (1)

25-25: expo-application@^6.1.5 — compatible with Expo SDK 53; plan native rebuild

Verified: Expo SDK 53 bundles expo-application ~6.1.5, so the dependency is SDK-compatible.

  • File: package.json — line ~25: "expo-application": "^6.1.5" (OK)
  • Action: Plan a new iOS/Android binary (this is a native module). Don’t rely on OTA-only rollout unless all installed binaries already include this module.
  • If using EAS Updates: constrain the update by the new runtimeVersion (or equivalent) in app.json to prevent older binaries from loading this bundle.
  • Optional: run npx expo install expo-application to ensure the SDK-compatible package is installed.

Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these settings in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 492bcf7 and a8e1f36.

📒 Files selected for processing (1)
  • app.json (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: NeOMakinG
PR: shapeshift/mobile-app#131
File: src/lib/getMessageManager.ts:0-0
Timestamp: 2025-08-14T09:51:12.307Z
Learning: NeOMakinG prefers clean, simple code over complex backward compatibility fallbacks, and favors pushing users to update native app versions rather than maintaining extensive error handling for older versions.
🔇 Additional comments (1)
app.json (1)

61-61: Confirm runtimeVersion bump; consider switching to a policy-based runtimeVersion

Verified: app.json sets runtimeVersion to "3.4.0" (this will gate OTAs to that native runtime and prevent older runtime bundles from receiving updates).

Files to check:

  • app.json — line ~61: "runtimeVersion": "3.4.0"
  • package.json — includes "expo-updates" (repo uses EAS/Expo updates)
  • README.md — documents runtimeVersion OTA gating and bump process

Suggested minimal change to let Expo derive runtimeVersion from the app version:

-  "runtimeVersion": "3.4.0"
+  "runtimeVersion": { "policy": "appVersion" }

Notes:

  • If you intentionally want to lock OTAs to a specific native runtime, keep the explicit "3.4.0".
  • If you gate by native build numbers across platforms, prefer { "policy": "nativeVersion" } instead.
  • After changing to a policy, manually confirm your EAS Update channels and channel partitioning behave as expected.

{
"name": "ShapeShift",
"version": "3.3.1",
"version": "3.4.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Avoid pushing OTA for this one so we ensure users have the expo-application native files

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

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

@0xApotheosis 0xApotheosis merged commit 1a87913 into main Aug 14, 2025
2 checks passed
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.

4 participants