Skip to content

Conversation

@tanii1125
Copy link
Contributor

@tanii1125 tanii1125 commented Aug 13, 2025

This PR will resolve Issue -- #110

The following packages should be updated for best compatibility with the installed expo version:

@react-native-async-storage/async-storage@2.2.0 - expected version: 2.1.2
react-native-safe-area-context@5.5.2 - expected version: 5.4.0
react-native-screens@4.13.1 - expected version: ~4.11.1
expo-image-picker@16.0.6 - expected version: ~16.1.4

@tanii1125 tanii1125 requested a review from vrajpatelll as a code owner August 13, 2025 07:46
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 13, 2025

Walkthrough

Added explicit web support in Expo config by introducing the platforms field. Adjusted four dependency version ranges in frontend/package.json to earlier versions. No source code or control flow changes.

Changes

Cohort / File(s) Change Summary
Expo config
frontend/app.json
Added "platforms": ["ios", "android", "web"] under expo.
Frontend dependencies
frontend/package.json
Downgraded version ranges: @react-native-async-storage/async-storage ^2.2.0 → ^2.1.2, expo-image-picker ~16.0.2 → ^16.1.4, react-native-safe-area-context ^5.5.2 → ^5.4.0, react-native-screens ^4.13.1 → ^4.11.1.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I twitched my nose at config’s dome,
“Web may enter!”—now it’s home.
Packages hop a version lane,
Back a step, yet still the same.
With gentle thumps, I sign and cheer—
Ship it swift, the path is clear! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
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: 5

🧹 Nitpick comments (1)
frontend/package.json (1)

13-13: Consider tilde for async-storage to truly match the expected 2.1.x line

With ^2.1.2, a future install could resolve to 2.2.x again, undermining the intent to align with the expected version. If the goal is strict alignment, use ~2.1.2.

-    "@react-native-async-storage/async-storage": "^2.1.2",
+    "@react-native-async-storage/async-storage": "~2.1.2",

If broader compatibility is acceptable for this community package, keeping ^ is fine—just be aware it can float to newer minors.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cb82fcb and 04f35a4.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • frontend/app.json (1 hunks)
  • frontend/package.json (1 hunks)

"expo": {
"name": "frontend",
"slug": "frontend",
"platforms": ["ios", "android", "web"],
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Adding platforms is fine; confirm web readiness across dependencies

Declaring explicit platforms, including "web", is OK. Please double-check that all runtime paths used by the app (navigation, image picker flows, and any native APIs) have working web fallbacks to avoid runtime errors when expo start --web is used.

You can sanity-check with:


🏁 Script executed:

#!/bin/bash
# 1) Ensure web entry point resolves
jq -r '.scripts.web' frontend/package.json

# 2) Grep for native-only APIs that lack web guards (heuristic)
rg -n "Platform\.OS\s*===\s*['\"](ios|android)['\"]|NativeModules|requireNativeComponent" -g '!node_modules' -S || true

Length of output: 280


Ensure web readiness: guard Platform.OS usage in AddExpenseScreen

  • Verified scripts.web resolves to expo start --web in frontend/package.json

  • Found a native‐only API usage in frontend/screens/AddExpenseScreen.js:345:

    behavior={Platform.OS === "ios" ? "padding" : "height"}

    On web, Platform.OS is "web", so it falls back to "height", but KeyboardAvoidingView’s behavior prop may not be supported in react-native-web. Please wrap this in a web‐safe guard or use Platform.select, for example:

    behavior={Platform.select({
      ios: "padding",
      android: "height",
      default: undefined
    })}

    This ensures no unsupported props are passed on web.

🤖 Prompt for AI Agents
In frontend/app.json around line 5, the project targets web but
AddExpenseScreen.js at line ~345 passes a behavior prop to KeyboardAvoidingView
using Platform.OS which can pass unsupported values on web; change the prop to
use a web-safe guard such as Platform.select (ios: "padding", android: "height",
default: undefined) or conditionally omit the behavior prop on web so no
unsupported prop is passed; update the JSX to compute behavior via
Platform.select or a small helper and use that variable as the behavior prop (or
only spread the prop when defined).

Comment on lines 12 to 28
"@expo/metro-runtime": "~5.0.4",
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-native-async-storage/async-storage": "^2.1.2",
"@react-navigation/bottom-tabs": "^7.4.4",
"@react-navigation/native": "^7.1.16",
"@react-navigation/native-stack": "^7.3.23",
"axios": "^1.11.0",
"expo": "~53.0.20",
"expo-image-picker": "~16.0.2",
"expo-image-picker": "^16.1.4",
"expo-status-bar": "~2.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.5",
"react-native-paper": "^5.14.5",
"react-native-safe-area-context": "^5.5.2",
"react-native-screens": "^4.13.1",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "^4.11.1",
"react-native-web": "^0.20.0"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Automated check for range operators against expected SDK-aligned versions

Run this script to verify you’re using ~ where intended for SDK-aligned packages and avoid caret drift.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

PKG_FILE="frontend/package.json"

check_pkg() {
  local name="$1"
  local want_op="$2"   # "~" or "^"
  local version
  version=$(jq -r --arg name "$name" '.dependencies[$name] // empty' "$PKG_FILE")
  if [[ -z "$version" ]]; then
    echo "Missing dependency: $name"
    return
  fi
  op="${version:0:1}"
  if [[ "$op" != "$want_op" ]]; then
    echo "Range operator mismatch for $name: found '$version' (op '$op'), want operator '$want_op'"
  else
    echo "OK: $name uses '$version'"
  fi
}

# Expo-managed packages should usually use '~'
check_pkg "expo-image-picker" "~"
# Navigation ecosystem often pinned by SDK templates; prefer '~'
check_pkg "react-native-screens" "~"
check_pkg "react-native-safe-area-context" "~"
# If strict alignment desired, also use '~' for async-storage:
check_pkg "@react-native-async-storage/async-storage" "~" || true

echo "Tip: run 'npx expo install' or 'npx expo install --fix' to auto-align known compatible versions."

Length of output: 2323


Align SDK-managed package versions to tilde (~) ranges

Several Expo and related packages currently use caret (^) ranges, which can drift beyond the tested SDK versions. Please pin these to tilde (~) to match the Expo SDK 53 alignment.

Affected dependencies in frontend/package.json:

  • expo-image-picker: currently ^16.1.4 → should be ~16.1.4
  • react-native-screens: currently ^4.11.1 → should be ~4.11.1
  • react-native-safe-area-context: currently ^5.4.0 → should be ~5.4.0
  • @react-native-async-storage/async-storage: currently ^2.1.2 → should be ~2.1.2

Suggested diff:

--- a/frontend/package.json
+++ b/frontend/package.json
@@ dependencies
-    "expo-image-picker": "^16.1.4",
-    "react-native-screens": "^4.11.1",
-    "react-native-safe-area-context": "^5.4.0",
-    "@react-native-async-storage/async-storage": "^2.1.2",
+    "expo-image-picker": "~16.1.4",
+    "react-native-screens": "~4.11.1",
+    "react-native-safe-area-context": "~5.4.0",
+    "@react-native-async-storage/async-storage": "~2.1.2",

After updating, run:

npx expo install

to ensure all versions align with your SDK.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@expo/metro-runtime": "~5.0.4",
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-native-async-storage/async-storage": "^2.1.2",
"@react-navigation/bottom-tabs": "^7.4.4",
"@react-navigation/native": "^7.1.16",
"@react-navigation/native-stack": "^7.3.23",
"axios": "^1.11.0",
"expo": "~53.0.20",
"expo-image-picker": "~16.0.2",
"expo-image-picker": "^16.1.4",
"expo-status-bar": "~2.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.5",
"react-native-paper": "^5.14.5",
"react-native-safe-area-context": "^5.5.2",
"react-native-screens": "^4.13.1",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "^4.11.1",
"react-native-web": "^0.20.0"
},
"@expo/metro-runtime": "~5.0.4",
"@react-native-async-storage/async-storage": "~2.1.2",
"@react-navigation/bottom-tabs": "^7.4.4",
"@react-navigation/native": "^7.1.16",
"@react-navigation/native-stack": "^7.3.23",
"axios": "^1.11.0",
"expo": "~53.0.20",
"expo-image-picker": "~16.1.4",
"expo-status-bar": "~2.2.3",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.5",
"react-native-paper": "^5.14.5",
"react-native-safe-area-context": "~5.4.0",
"react-native-screens": "~4.11.1",
"react-native-web": "^0.20.0"
},
🤖 Prompt for AI Agents
In frontend/package.json around lines 12 to 28, several SDK-managed dependencies
use caret (^) ranges instead of tilde (~); update the four entries to use tilde:
change "@react-native-async-storage/async-storage": "^2.1.2" → "~2.1.2",
"expo-image-picker": "^16.1.4" → "~16.1.4", "react-native-safe-area-context":
"^5.4.0" → "~5.4.0", and "react-native-screens": "^4.11.1" → "~4.11.1"; after
editing package.json run `npx expo install` to reconcile and install versions
aligned with the Expo SDK.

"axios": "^1.11.0",
"expo": "~53.0.20",
"expo-image-picker": "~16.0.2",
"expo-image-picker": "^16.1.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Use tilde range for Expo-managed module to match SDK expectations

Expo-managed packages are typically pinned with a tilde to the exact minor that the SDK expects. Using ^ may drift beyond the SDK’s supported set and trigger expo doctor warnings.

Apply:

-    "expo-image-picker": "^16.1.4",
+    "expo-image-picker": "~16.1.4",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"expo-image-picker": "^16.1.4",
"expo-image-picker": "~16.1.4",
🤖 Prompt for AI Agents
In frontend/package.json around line 19 change the version specifier for
expo-image-picker from a caret (^) to a tilde (~) so the package is pinned to
the expected minor release (e.g., "^16.1.4" -> "~16.1.4"); update the dependency
entry accordingly, run your package manager install (npm/yarn) and then run expo
doctor to ensure the SDK no longer reports a mismatch.

"react-native-paper": "^5.14.5",
"react-native-safe-area-context": "^5.5.2",
"react-native-screens": "^4.13.1",
"react-native-safe-area-context": "^5.4.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Pin react-native-safe-area-context to tilde range

To keep consistency with the SDK’s expected set and reduce compatibility churn, prefer ~ here as well.

-    "react-native-safe-area-context": "^5.4.0",
+    "react-native-safe-area-context": "~5.4.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"react-native-safe-area-context": "^5.4.0",
- "react-native-safe-area-context": "^5.4.0",
+ "react-native-safe-area-context": "~5.4.0",
🤖 Prompt for AI Agents
In frontend/package.json around line 25, the dependency
"react-native-safe-area-context": "^5.4.0" uses a caret range; change it to a
tilde range to pin to patch updates only. Edit the package.json to replace the
caret (^) with a tilde (~) for this dependency so it becomes "~5.4.0", then run
dependency install (or lockfile update) to ensure the lockfile matches.

"react-native-safe-area-context": "^5.5.2",
"react-native-screens": "^4.13.1",
"react-native-safe-area-context": "^5.4.0",
"react-native-screens": "^4.11.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Pin react-native-screens to tilde range to avoid SDK drift

react-native-screens is frequently version-checked by Expo templates and React Navigation. Use ~ to stay within the expected minor and avoid accidental upgrades.

-    "react-native-screens": "^4.11.1",
+    "react-native-screens": "~4.11.1",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"react-native-screens": "^4.11.1",
"react-native-screens": "~4.11.1",
🤖 Prompt for AI Agents
In frontend/package.json around line 26, change the react-native-screens
dependency from a caret range to a tilde range to prevent SDK/minor version
drift; replace "^4.11.1" with "~4.11.1" in the dependencies and then run your
package manager (npm/yarn/pnpm install) to update the lockfile.

@aasthagaudani
Copy link
Collaborator

@tanii1125 Would you please take a pull from main, so that EAS preview build passes

@Devasy Devasy added the run-preview To run Expo preview build on forks label Aug 14, 2025
@Devasy Devasy self-requested a review August 16, 2025 05:01
@Devasy Devasy merged commit 790c7bf into Devasy:main Aug 16, 2025
33 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Splitwiser Aug 16, 2025
@Devasy
Copy link
Owner

Devasy commented Aug 16, 2025

@tanii1125 Thank you so much for your contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc25 level1 migration run-preview To run Expo preview build on forks

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Fix Web UI Functionality for npx expo start --web [GSSoC25] Missing Dependency in package.json

3 participants