Feature/nigeria location profiling 6234891006861133526#675
Feature/nigeria location profiling 6234891006861133526#675madakixo wants to merge 5 commits intopermissionlesstech:mainfrom
Conversation
- Add mandatory Nigeria location selection to onboarding - Implement location-scoped posting and reposting (State, LGA, Ward, etc.) - Add Profiling/Scouting feature for entering detailed person data - Implement decentralized Alerts and Notifications for specific locations - Add background location footprint recording and compression - Implement database merging with version control - Update UI with Nigeria Dashboard and Profiling sheets - Add README_NIGERIA.md with run and deployment instructions Co-authored-by: madakixo <[email protected]>
- Refined Nigeria Dashboard and Profiling UI - Fixed build errors and improved location footprint tracking - Added comprehensive README_NIGERIA.md deployment guide - Verified core logic with automated tests Co-authored-by: madakixo <[email protected]>
- Add mandatory Nigeria location selection to onboarding with search (FTS) - Implement location-scoped posting and reposting via Nostr - Add Profiling/Scouting system with local Room DB and versioned merging - Implement decentralized Vouching system for building trust - Add decentralized Alerts and Notifications for specific locations - Implement background digital footprint tracking with spatial compression - Add Nigeria Dashboard and Super Admin Visualization Dashboard - Optimize media performance with image resizing - Added comprehensive README_NIGERIA.md guide Co-authored-by: madakixo <[email protected]>
- Full-Text Search for administrative data - Spatial compression for location history - Decentralized vouching and super admin visualization - Image resizing and batched Nostr filters Co-authored-by: madakixo <[email protected]>
- Nigerian administrative hierarchy with FTS search - Location-scoped interactions and decentralized alerts - Profiling system with versioned database merging - Decentralized vouching and digital footprint tracking - Super Admin and Nigeria dashboards - Media and protocol performance optimizations - Comprehensive deployment and operation guides Co-authored-by: madakixo <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7155fa07a6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| mainViewModel.updateOnboardingState(OnboardingState.INITIALIZING) | ||
| initializeApp() | ||
| } else { | ||
| mainViewModel.updateOnboardingState(OnboardingState.LOCATION_SELECTION) |
There was a problem hiding this comment.
Seed location tables before moving to LOCATION_SELECTION
This branch sends users without user_location to LOCATION_SELECTION before any admin data has been inserted, but seeding only happens later inside initializeApp() (MainActivity.kt lines 717-718). On first-run (and existing installs upgrading without a stored location), NigeriaLocationSelectionScreen immediately queries adminDao.getAllStates() and gets an empty list, leaving the user unable to select a location and blocking onboarding.
Useful? React with 👍 / 👎.
| val state = event.tags.find { it[0] == "ng_state" }?.get(1) | ||
| val lga = event.tags.find { it[0] == "ng_lga" }?.get(1) | ||
| val ward = event.tags.find { it[0] == "ng_ward" }?.get(1) | ||
| val scope = event.tags.find { it[0] == "ng_scope" }?.get(1) |
There was a problem hiding this comment.
Validate alert tag length before indexing into tuples
handleAlertEvent reads relay-supplied tags using it[0] and get(1) without checking tuple length. If any event contains an empty or single-element tag array, this path throws IndexOutOfBoundsException and can crash alert handling for incoming Nostr traffic. Other tag-parsing code in the repo already guards with size >= 2, so this new path should do the same.
Useful? React with 👍 / 👎.
| val resizedPath = com.bitchat.android.features.file.FileUtils.resizeImage(context, filePath) ?: filePath | ||
| val finalPath = resizedPath | ||
| try { | ||
| Log.d(TAG, "🔄 Starting image send: $filePath") | ||
| val file = java.io.File(filePath) |
There was a problem hiding this comment.
Send the resized image instead of the original file
sendImageNote computes resizedPath/finalPath but then still constructs File from filePath, so the optimization never takes effect and full-size images are transmitted. This also leaves an unnecessary resized temp file in cache, increasing storage churn without benefit.
Useful? React with 👍 / 👎.
Description
Checklist