Skip to content

Video, UI & Stability Patches + Per-User Settings#12

Open
rferrari wants to merge 12 commits intoSkateHive:vaipraondefrom
rferrari:development
Open

Video, UI & Stability Patches + Per-User Settings#12
rferrari wants to merge 12 commits intoSkateHive:vaipraondefrom
rferrari:development

Conversation

@rferrari
Copy link
Copy Markdown
Collaborator

This PR bundles critical bug fixes, UI improvements, and a new per-user settings feature for the mobile app.

🎬 Video System

  • Video configuration & rendering patches — Fixed platform-specific video config issues affecting playback stability
  • Port thumbnails to VideoWithAutoplay — Ported thumbnail generation from main into the VideoWithAutoplay component for consistent preview images
  • Video Release Error fix — Forced VideoPlayer instances to unmount gracefully during logout, preventing the "shared object already released" crash

🎨 UI & Loading

  • Unified Loading Indicators — Replaced all hardcoded ActivityIndicator and MatrixRain instances with the theme-aware ThemedLoading component across the entire app
  • Leaderboard Bottom Spacing — Refactored padding from ScrollView container style to contentContainerStyle and increased to 130px, fixing clipped items at the bottom

🐛 Bug Fixes

  • Search Component TypeError — Added optional chaining for cases where the search API returns a timeout error instead of the expected array structure
  • Notification Badge Count — Fixed bounce-back bug where badge count reappeared after "Mark All Read" by implementing a 20-second debounce window to account for Hive blockchain indexer lag

✨ New Feature

  • Per-User App Settings — Refactored AppSettingsContext to persist settings with user-namespaced keys (e.g., app_settings_alice). Themes, session duration, and video preferences are now isolated per account. AuthProvider automatically pushes the username during login/logout/initialization.

Android will continue to aggressively unmount players when they leave the screen to prevent Out-Of-Memory (OOM) crashes, and will use WebView fallbacks as needed via your VideoConfig. This retains all your memory leak fixes.
iOS will now keep the native AVPlayer buffered and mounted regardless of isInView constraints (imitating the main branch), ensuring smooth, instantaneous video playback without the "fail to play" issues caused by rapid mounting/unmounting.
I've also reverted useApi to false in SnapConfig.ts strictly for iOS so it uses the native stable DHive fetching mechanism like the main branch.
VideoWithAutoplay.tsx: Reintroduced the thumbnailUrl prop and added isPlaying tracking.
Overlay UI: Merged the static Image poster and ActivityIndicator spinner overlays identically to how it functioned in main (only hiding it once onPlaybackStarted fires).
MediaPreview.tsx: Updated its props and ensured thumbnailUrl cascades correctly into <VideoWithAutoplay /> when rendering a video.
…cefully during the logout sequence before the navigation transitions resolve.
…llView container style to its contentContainerStyle and increased it to 130px.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b7da5f35-b312-48a2-9c3d-9e8a7d054068

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Here is what has been implemented:

Feed Normalization: I created a reusable function (normalizeFeedData) in lib/api.ts that takes the raw API response and properly converts the soft posts, formatting, stringified JSON, and active_votes so that PostCard can read them smoothly. This gives Trending and Following exactly the same shape and treatment as the SnapsFeed.
New endpoints added: getFollowingFeedAPI utilizes /feed/${username}/following and getTrendingFeedAPI utilizes /trending.
Toggle Logic: Inside useSnaps.ts, it now checks SnapConfig.useApi. If it's true, the Following and Trending feeds will hit the new API endpoints. It successfully tracks the pagination with apiPageRef.
Dhive Fallback: If useApi is false, or if the Skatehive API fails unexpectedly, it has a built-in catch block that seamlessly falls back to the native dhive implementation (getDiscussions mapped by feed type and COMMUNITY_TAG, respectively).
…t should be /api/v2/feed/trending, but my previous code was hitting /api/v2/trending, which resulted in a 404 HTML page.
…naps.ts! Now, when the app gathers the Following feed, it manually iterates through everything and aggressively strips out any post that is not tagged with hive-173115 or not posted directly into the Skatehive community.
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.

1 participant