[C4GT Bounty] Fix: Critical Bugs (Black Screen, Video Timer, Cloud Sync, PDF Crash, Admin Nav)#8
Open
aviralsaxena16 wants to merge 10 commits intoPlanetRead:mainfrom
Open
Conversation
Author
|
Hi @keerthiseelan-planetread, just checking in on this PR and my proposal. Any updates on the review timeline? I would love to contribute to this Thanks! |
|
Hi @aviralsaxena16 I'm working the evaluation process, probably on Monday we can connect and my mail id is keerthiseelan@planetread.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello @keerthiseelan-planetread,
This PR is submitted for the **C4GT Bounty: PlanetRead Video Watch Timer Issue #7 **.
After cloning the repository, setting up the full local environment, and testing on an Android emulator, I identified and fixed several critical bugs—including all the major issues listed on the bounty ticket and other unlisted blockers I discovered.
This PR serves as my "proof of work" and demonstrates my ability to debug and solve issues across the entire stack (React Native, native Android, and backend services).
1. The "Black Screen" Crash: SOLVED ⬛
video/[id].tsx) was in the middle of an async operation.isMountedRefguard in thevideo/[id].tsxcomponent. This ref preventssetStatecalls from being executed on an unmounted component, which was the root cause of the crash.2. Incorrect Video Watch Time: SOLVED ⏱️
app/video/[id].tsx. ThereturnBackToHomefunction and thestatusChangelistener now ensure thattotalWatchTimeRefis always updated with the final elapsed time before the component unmounts or the player stops, guaranteeing accurate time capture.3. The "Cloud Sync" Errors: SOLVED ☁️
The app's data-syncing feature was entirely broken due to multiple issues. I debugged and fixed all of them by setting up a local Supabase instance.
Error: Could not find the table 'public.user'.components/SyncToCloud.tsxfromuserto the correctusers.Error: null value in column "id" of relation "video_analytics".syncUsersfunction was not including the requiredidfrom the local analytics table when building the payload for Supabase. Addedid: analytics.idto the data mapping, resolving the constraint violation.users.idandvideo_analytics.user_idcolumns to accepttextdata type, matching the app's local ID format.Result: With these code fixes and a correctly configured backend, cloud sync now runs successfully. ✅
4. The PDF Loading Crash: SOLVED 📄
ReactNativeBlobUtil request error... Use of own trust manager...android/app/build.gradleand forcing a stable version of theokhttplibrary:implementation("com.squareup.okhttp3:okhttp:4.9.3").5. The Admin Login Navigation Bug: SOLVED 🔒
app/(tabs)/index.tsxand changed the incorrectonLongPresstrigger on theTouchableOpacityto a simpleonPress, fixing navigation to/login.🎥 Video Proof of All Fixes
Here is a video from my emulator demonstrating all the fixes working correctly:
Watch the Full Demo Video (Google Drive) 🎬
I am confident I can successfully implement the remaining features outlined in the bounty. Thank you for your consideration.