Skip to content

Conversation

@RGarrido03
Copy link
Member

@RGarrido03 RGarrido03 commented May 28, 2025

the end. 🥹

Summary by CodeRabbit

  • New Features

    • Introduced indoor navigation with real-time beacon-based positioning, dynamic product navigation, and enhanced map visualization.
    • Added haptic feedback for navigation directions.
    • Implemented checkout flow and improved in-store modal UI with progress tracking and product image handling.
    • Expanded app permissions for Bluetooth, location, and device motion on Android and iOS.
    • Added support for advanced product search by name or EAN.
  • Bug Fixes

    • Improved distance formatting in product details.
  • Refactor

    • Major restructuring of navigation and modal components for clarity, maintainability, and enhanced user experience.
  • Chores

    • Added and updated dependencies for indoor positioning, map rendering, sensors, and permissions.
    • Introduced new static data files for floor plans, waypoints, and product locations.
  • Documentation

    • Added type declarations for navigation, beacon scanning, and GeoJSON imports.

@coderabbitai
Copy link

coderabbitai bot commented May 28, 2025

Walkthrough

This update introduces comprehensive enhancements for indoor navigation and product search within a retail application. Major changes include dynamic beacon-based positioning using a Kalman filter, updated GraphQL queries for efficient product listing and search, new GeoJSON spatial datasets, and improved UI components for navigation and checkout flows. Supporting utility modules, constants, and type declarations were added or refactored to facilitate these features.

Changes

File(s) / Group Change Summary
.idea/compiler.xml Added IDE TypeScript compiler config using server types.
andreribeiro.tail05225.ts.net.crt Added two PEM-encoded X.509 certificates.
app.json Added Android/iOS permissions and plugins for location, Bluetooth, and sensors.
app/(tabs)/navigation.tsx Refactored router usage, updated GraphQL query/refetch logic, and improved location handling.
app/navigation-in-store/index.tsx Major refactor: dynamic product fetching, beacon-based positioning with Kalman filter, real-time navigation, and enhanced map/UI logic.
app/productSearch/index.tsx Updated product search to use granular EAN/name filters; adjusted query logic accordingly.
assets/floor_plan.ts Added static GeoJSON floor plan as a TypeScript export.
assets/map/closestPoint.json, assets/map/intersectWaypoint.json, assets/map/myhouse.json, assets/map/possiblePoints.json, assets/map/products_simple.json, assets/map/products_without_ean.json, assets/map/waypoints.json Added multiple GeoJSON files with points, lines, and polygons for spatial data.
assets/map/dummy/points.tsx Simplified navigation points; made ean property optional.
assets/map/path.json Changed geometry from Polygon to LineString for "Thick line" feature.
assets/style_map_basic_light_2.json Added Mapbox GL style JSON for a light vector map theme.
components/InStoreModal.tsx Refactored modal to use enum-based navigation state, improved UI, added checkout view, changed progress logic.
components/VoiceBottomSheet.tsx Changed GraphQL lazy query to use dynamic variables at execution time.
components/helpers/bearing.tsx Added direction-aware haptic feedback function.
components/helpers/calculateDistance.tsx Refactored distance calculation; added function for primitive inputs; output now in meters.
components/ui/detailsCard.tsx Distance now displayed with one decimal place.
components/ui/distanceCard.tsx Commented out unused button prop.
constants/kalman-filter.ts Added Kalman filter constants and beacon position data.
declarations.d.ts Declared module for .geojson imports.
graphql/gql.ts, graphql/graphql.ts Replaced product sheet query with supermarket list query; updated search query to use granular filters; adjusted types and mappings.
intersect.js Added script to compute intersections between LineStrings in GeoJSON using Turf.js.
package.json Added/updated dependencies: iBeacon, Turf.js, sensors, mathjs, permissions; tightened version ranges.
patches/@indoor-track+ibeacon+1.0.16.patch Patched iBeacon module: changed BLE scan logic, updated scan result handling.
types/beacon.ts Added interfaces for beacon scan results and Kalman filter state.
types/navigation.ts Added navigation types, product-with-position interface, and navigation state enum.
utils/navigation-in-store.ts New utility: position estimation from beacon distances, heading calculation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant Beacons
    participant KalmanFilter
    participant GraphQL
    participant MapView

    User->>App: Starts in-store navigation
    App->>Beacons: Requests scan (via permissions)
    Beacons-->>App: Emits scan results (RSSI, id)
    App->>KalmanFilter: Updates beacon distances
    KalmanFilter-->>App: Smoothed distances
    App->>App: Calculate user position (least squares)
    App->>GraphQL: Fetches product list for current shopping list
    GraphQL-->>App: Returns products
    App->>App: Match products to map features
    App->>MapView: Updates map with user position, path, products
    App->>User: Shows navigation modal (directions, progress, checkout)
    User->>App: Marks product as picked / proceeds to checkout
    App->>GraphQL: Updates picked status / navigates home
Loading

Poem

In aisles mapped by beacon light,
The rabbit hops with joy and might.
Kalman whispers, sensors sing,
Products found in a circle ring.
With haptic hops and checkout cheer,
Navigation magic—spring is here!
🥕✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0324336 and 98c8f4c.

⛔ Files ignored due to path filters (3)
  • assets/images/lucide/location.png is excluded by !**/*.png
  • assets/images/lucide/navigation-2.png is excluded by !**/*.png
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (33)
  • .idea/compiler.xml (1 hunks)
  • andreribeiro.tail05225.ts.net.crt (1 hunks)
  • app.json (3 hunks)
  • app/(tabs)/navigation.tsx (3 hunks)
  • app/navigation-in-store/index.tsx (1 hunks)
  • app/productSearch/index.tsx (2 hunks)
  • assets/floor_plan.ts (1 hunks)
  • assets/map/closestPoint.json (1 hunks)
  • assets/map/dummy/points.tsx (1 hunks)
  • assets/map/intersectWaypoint.json (1 hunks)
  • assets/map/myhouse.json (1 hunks)
  • assets/map/path.json (1 hunks)
  • assets/map/possiblePoints.json (1 hunks)
  • assets/map/products_simple.json (1 hunks)
  • assets/map/products_without_ean.json (1 hunks)
  • assets/map/waypoints.json (1 hunks)
  • assets/style_map_basic_light_2.json (1 hunks)
  • components/InStoreModal.tsx (7 hunks)
  • components/VoiceBottomSheet.tsx (2 hunks)
  • components/helpers/bearing.tsx (1 hunks)
  • components/helpers/calculateDistance.tsx (1 hunks)
  • components/ui/detailsCard.tsx (1 hunks)
  • components/ui/distanceCard.tsx (1 hunks)
  • constants/kalman-filter.ts (1 hunks)
  • declarations.d.ts (1 hunks)
  • graphql/gql.ts (4 hunks)
  • graphql/graphql.ts (7 hunks)
  • intersect.js (1 hunks)
  • package.json (3 hunks)
  • patches/@indoor-track+ibeacon+1.0.16.patch (1 hunks)
  • types/beacon.ts (1 hunks)
  • types/navigation.ts (1 hunks)
  • utils/navigation-in-store.ts (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Join our Discord community for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@VioletaR VioletaR self-requested a review May 28, 2025 17:53
@sonarqubefindit
Copy link

Failed Quality Gate failed

  • 11 New Issues (is greater than 0)

Project ID: PI-FindIt_client-app_6ea8cb86-d2f7-4f01-84cb-a3c7850e949f

View in SonarQube

Copy link
Member

@VioletaR VioletaR left a comment

Choose a reason for hiding this comment

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

Pain

@VioletaR VioletaR merged commit 214f1dc into main May 28, 2025
3 checks passed
@github-actions
Copy link

🚀 Expo preview is ready!

  • Project → client-app
  • Platforms → android, ios
  • Scheme → findit
  • Runtime Version → 1.16.0
  • More info

Learn more about 𝝠 Expo Github Action

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.

5 participants