Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"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).

"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand Down
45 changes: 24 additions & 21 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
},
"dependencies": {
"@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",
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.

"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",
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-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.

"react-native-web": "^0.20.0"
},
Comment on lines 12 to 28
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.

"devDependencies": {
Expand Down
Loading