Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7b76a62
This commit adds the ability for you to create new groups and join ex…
google-labs-jules[bot] Jul 30, 2025
7211eba
This commit introduces several improvements to the expense creation a…
google-labs-jules[bot] Jul 30, 2025
b46be03
This commit fixes a bug in the settlement summary on the Group Detail…
google-labs-jules[bot] Jul 30, 2025
9011da7
This commit introduces a new "Friends" page to the application.
google-labs-jules[bot] Jul 30, 2025
57e23d5
This commit fixes a bug that caused the Friends page to crash.
google-labs-jules[bot] Jul 30, 2025
e201e83
This commit introduces a new "Account" page to the application.
google-labs-jules[bot] Jul 30, 2025
4b7a0c3
This commit enhances the UI by displaying group icons.
google-labs-jules[bot] Jul 30, 2025
9e97947
This commit adds a new GitHub Actions workflow to automatically build…
google-labs-jules[bot] Jul 31, 2025
d6bf0bb
Update android-build.yml
Devasy Jul 31, 2025
f29d3ac
Update android-build.yml
Devasy Jul 31, 2025
a12a642
This commit refactors the GitHub Actions workflow to create previews …
google-labs-jules[bot] Jul 31, 2025
cdea9ef
adds eas login id
Delinkelin Jul 31, 2025
e554381
add project configuration and update channels in eas.json
Devasy Jul 31, 2025
57f0757
Revert "add project configuration and update channels in eas.json"
Devasy Jul 31, 2025
dcb00e9
Add permissions for pull request handling in EAS preview workflow
Devasy Jul 31, 2025
2c449d7
Refactor GroupDetailsScreen component for improved readability and ma…
Devasy Jul 31, 2025
9f1146c
Enhance currency formatting in GroupDetailsScreen and improve settlem…
Delinkelin Jul 31, 2025
4068a50
This commit fixes several bugs in the unequal split functionality and…
google-labs-jules[bot] Jul 31, 2025
4adf84b
Revert "This commit fixes several bugs in the unequal split functiona…
Devasy Aug 1, 2025
3110bef
Refactor AddExpenseScreen for improved structure and functionality; e…
Devasy Aug 1, 2025
97e14f1
Refactor AddExpenseScreen to improve payer selection logic and enhanc…
Devasy Aug 1, 2025
b3f42c6
Add paidBy field to ExpenseCreateRequest and ExpenseResponse; validat…
Devasy Aug 1, 2025
d86cf74
Merge branch 'main' of https://github.com/Devasy23/splitwiser into fe…
Devasy Aug 2, 2025
e94d7ea
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 2, 2025
df567a7
Add required paidBy field to ExpenseCreateRequest in expense tests
Devasy Aug 2, 2025
ff40e6e
Add test for expense creation with payer not in group
Devasy Aug 2, 2025
b642a27
Update GitHub Actions and enhance group expense handling
Devasy Aug 2, 2025
48b11b6
Implement AsyncStorage for user authentication and balance calculatio…
Devasy Aug 2, 2025
8302d6f
Downgrade actions/checkout version from v4 to v3 in GitHub Actions wo…
Devasy Aug 2, 2025
ca65c8a
Upgrade actions/checkout version from v3 to v4 in GitHub Actions work…
Devasy Aug 2, 2025
96934b2
Enhance bundle analysis workflow: use Expo export for builds, improve…
Devasy Aug 2, 2025
8892b95
Add EAS update workflow and improve bundle analysis steps
Devasy Aug 2, 2025
1490526
Add React Native bundle analysis workflow with fallback dependency an…
Devasy Aug 2, 2025
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
135 changes: 114 additions & 21 deletions .github/workflows/bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,134 @@ jobs:
cache-dependency-path: frontend/package-lock.json

- name: Install Dependencies
run: |
cd frontend
npm ci
run: npm install
working-directory: ./frontend

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Build for Bundle Analysis
run: |
cd frontend
# Create a production build for analysis
if npm run build --dry-run 2>/dev/null; then
npm run build
# Try to build with Expo for web, but handle React Native compatibility issues
if npx expo export --platform web --output-dir web-build 2>/dev/null; then
echo "✅ Expo web export successful"
else
# Use Expo's build process
npx expo export:web
echo "⚠️ Web export failed, using alternative bundle analysis approach"
# Create a basic bundle using Metro bundler directly
npx metro build --entry-file index.js --platform web --bundle-output web-build/bundle.js --assets-dest web-build/static || true
# If that also fails, create a minimal analysis report
if [ ! -f "web-build/bundle.js" ]; then
echo "📊 Creating basic size analysis from node_modules..."
mkdir -p web-build/static/js
# Analyze the main dependencies that would be bundled
echo "# Bundle Analysis Report (Estimated)" > bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Bundle Size Analysis" >> bundle-analysis.md
echo "- React Native web build failed due to platform-specific modules" >> bundle-analysis.md
echo "- This is common with React Native apps that use platform-specific code" >> bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Key Dependencies Analysis" >> bundle-analysis.md
du -sh node_modules/react node_modules/react-native node_modules/@expo 2>/dev/null | while read size dir; do
echo "- ${dir}: ${size}" >> bundle-analysis.md
done || echo "- Unable to analyze individual dependencies" >> bundle-analysis.md
exit 0
fi
fi
working-directory: ./frontend

- name: Analyze Bundle Size
working-directory: ./frontend
run: |
cd frontend
# Install bundle analyzer
npm install --no-save webpack-bundle-analyzer
# Install analysis tools
npm install --no-save @expo/metro-config metro-visualizer
sudo apt-get update && sudo apt-get install -y bc

echo "📊 Analyzing bundle size for Expo/React Native project..."

# Generate bundle stats (adjust path based on your build output)
# Check if bundle analysis report already exists (from build step failure handling)
if [ -f "bundle-analysis.md" ]; then
echo "� Using existing analysis report from build step"
cat bundle-analysis.md
exit 0
fi

# Check if web-build directory exists
if [ -d "web-build" ]; then
# Expo web build
npx webpack-bundle-analyzer web-build/static/js/*.js --report --mode static --report-filename bundle-report.html
elif [ -d "dist" ]; then
# Standard React build
npx webpack-bundle-analyzer dist/static/js/*.js --report --mode static --report-filename bundle-report.html
echo "✅ Web build directory found"
ls -la web-build/

# Look for JavaScript bundles in various locations
BUNDLE_FOUND=false

# Check standard Expo web build structure
if [ -d "web-build/static/js" ] && [ "$(ls -A web-build/static/js 2>/dev/null)" ]; then
echo "📁 JavaScript bundle files in static/js:"
find web-build/static/js -name "*.js" -type f -exec ls -lh {} \; | awk '{print $5 " " $9}'

# Calculate total bundle size
TOTAL_SIZE=$(find web-build/static/js -name "*.js" -type f -exec stat -c%s {} \; | awk '{sum+=$1} END {print sum}')
TOTAL_SIZE_MB=$(echo "scale=2; $TOTAL_SIZE / 1024 / 1024" | bc -l)
echo "📊 Total JavaScript bundle size: ${TOTAL_SIZE_MB} MB"
BUNDLE_FOUND=true
elif [ -f "web-build/bundle.js" ]; then
echo "📁 Single bundle file found:"
ls -lh web-build/bundle.js
BUNDLE_SIZE=$(stat -c%s web-build/bundle.js)
TOTAL_SIZE_MB=$(echo "scale=2; $BUNDLE_SIZE / 1024 / 1024" | bc -l)
echo "📊 Bundle size: ${TOTAL_SIZE_MB} MB"
BUNDLE_FOUND=true
fi

if [ "$BUNDLE_FOUND" = true ]; then
# Create analysis report
echo "# Bundle Analysis Report" > bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Bundle Size Summary" >> bundle-analysis.md
echo "- Total JavaScript bundle size: **${TOTAL_SIZE_MB} MB**" >> bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Build Details" >> bundle-analysis.md
echo "- Platform: Web (React Native)" >> bundle-analysis.md
echo "- Bundler: Metro (Expo)" >> bundle-analysis.md
echo "" >> bundle-analysis.md

if [ -d "web-build/static/js" ]; then
echo "## Individual Files" >> bundle-analysis.md
find web-build/static/js -name "*.js" -type f -exec ls -lh {} \; | awk '{print "- " $9 ": " $5}' >> bundle-analysis.md
fi

cat bundle-analysis.md
else
echo "❌ No JavaScript bundles found in expected locations"
echo "📁 Available files in web-build:"
find web-build -type f -name "*.js" -o -name "*.json" | head -10
fi
else
echo "No build output found for bundle analysis"
echo "❌ No web-build directory found"
echo "📁 Available directories:"
ls -la

# Create fallback analysis
echo "# Bundle Analysis Report (Fallback)" > bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Analysis Status" >> bundle-analysis.md
echo "- Web build failed - this is common for React Native apps with platform-specific code" >> bundle-analysis.md
echo "- Bundle analysis skipped for this build" >> bundle-analysis.md
fi

- name: Upload Bundle Analysis Report
if: always() && hashFiles('frontend/bundle-analysis.md') != ''
uses: actions/upload-artifact@v4
with:
name: bundle-analysis-report
path: frontend/bundle-analysis.md
retention-days: 30

- name: Upload Bundle Analysis to Codecov
uses: codecov/codecov-action@v5
if: github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v4
if: github.actor != 'dependabot[bot]' && hashFiles('frontend/bundle-analysis.md') != ''
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: bundle,frontend,javascript
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Create EAS Preview

on:
pull_request:

permissions:
contents: read
pull-requests: write

jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install dependencies
run: npm install
working-directory: ./frontend

- name: Create preview
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto --branch ${{ github.event.pull_request.head.ref }}
working-directory: ./frontend
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish EAS Update

on:
push:
branches:
- main
paths:
- 'frontend/**'

permissions:
contents: read

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: 🏗 Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: 🏗 Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: 📦 Install dependencies
run: npm install
working-directory: ./frontend

- name: 🚀 Create update
run: npx eas update --auto --non-interactive
working-directory: ./frontend
117 changes: 117 additions & 0 deletions .github/workflows/rn-bundle-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: React Native Bundle Analysis

on:
pull_request:
paths:
- 'frontend/**'
branches: [ main, master ]
push:
paths:
- 'frontend/**'
branches: [ main, master ]

jobs:
rn-bundle-analysis:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Setup EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Install Dependencies
run: npm install
working-directory: ./frontend

- name: Analyze React Native Bundle Size
working-directory: ./frontend
run: |
echo "📊 Analyzing React Native bundle size..."

# Install bundle analysis tools
npm install --no-save metro-visualizer

# Create bundle for Android (this usually works better than web)
echo "🤖 Creating Android bundle for analysis..."
if npx expo export --platform android --output-dir android-build --max-workers 1; then
echo "✅ Android export successful"

# Find and analyze the bundle
if [ -f "android-build/bundles/android-*.js" ]; then
BUNDLE_FILE=$(find android-build/bundles -name "android-*.js" | head -1)
BUNDLE_SIZE=$(stat -c%s "$BUNDLE_FILE")
BUNDLE_SIZE_MB=$(echo "scale=2; $BUNDLE_SIZE / 1024 / 1024" | bc -l)

echo "# React Native Bundle Analysis Report" > bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Bundle Size Summary" >> bundle-analysis.md
echo "- Platform: Android (React Native)" >> bundle-analysis.md
echo "- Bundle size: **${BUNDLE_SIZE_MB} MB**" >> bundle-analysis.md
echo "- Bundler: Metro (Expo)" >> bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Bundle Details" >> bundle-analysis.md
echo "- File: $(basename "$BUNDLE_FILE")" >> bundle-analysis.md
echo "- Size: ${BUNDLE_SIZE_MB} MB" >> bundle-analysis.md

echo "📊 Bundle analysis complete: ${BUNDLE_SIZE_MB} MB"
else
echo "❌ No Android bundle found"
ls -la android-build/
fi
else
echo "⚠️ Android export failed, analyzing dependencies instead..."

# Fallback: analyze key dependencies
echo "# React Native Bundle Analysis Report (Dependencies)" > bundle-analysis.md
echo "" >> bundle-analysis.md
echo "## Dependencies Analysis" >> bundle-analysis.md
echo "Bundle creation failed, analyzing key dependencies:" >> bundle-analysis.md
echo "" >> bundle-analysis.md

# Get sizes of major dependencies
if command -v du >/dev/null 2>&1; then
echo "### Core Dependencies" >> bundle-analysis.md
for dep in react react-native expo @react-navigation; do
if [ -d "node_modules/$dep" ]; then
size=$(du -sh "node_modules/$dep" 2>/dev/null | cut -f1)
echo "- $dep: $size" >> bundle-analysis.md
fi
done
fi

echo "" >> bundle-analysis.md
echo "Note: Bundle size analysis requires successful export. Check React Native compatibility." >> bundle-analysis.md
fi

# Install bc for calculations if needed
sudo apt-get update && sudo apt-get install -y bc

# Display the report
if [ -f "bundle-analysis.md" ]; then
cat bundle-analysis.md
fi

- name: Upload RN Bundle Analysis Report
if: always() && hashFiles('frontend/bundle-analysis.md') != ''
uses: actions/upload-artifact@v4
with:
name: rn-bundle-analysis-report
path: frontend/bundle-analysis.md
retention-days: 30

- name: RN Bundle Analysis Skipped
if: github.actor == 'dependabot[bot]'
run: echo "📦 React Native bundle analysis skipped for Dependabot PR"
2 changes: 2 additions & 0 deletions backend/app/expenses/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ExpenseCreateRequest(BaseModel):
amount: float = Field(..., gt=0)
splits: List[ExpenseSplit]
splitType: SplitType = SplitType.EQUAL
paidBy: str = Field(..., description="User ID of who paid for the expense")
tags: Optional[List[str]] = []
receiptUrls: Optional[List[str]] = []

Expand Down Expand Up @@ -89,6 +90,7 @@ class ExpenseResponse(BaseModel):
id: str = Field(alias="_id")
groupId: str
createdBy: str
paidBy: str
description: str
amount: float
splits: List[ExpenseSplit]
Expand Down
Loading
Loading