Skip to content

Conversation

@feruzm
Copy link
Member

@feruzm feruzm commented Jan 21, 2026

Summary by CodeRabbit

  • New Features

    • Channel options sheet, DM privacy control, DM warning banner, in-chat image viewer, reply/wave autosave (reply cache), bookmarks & favourites infinite scrolling, uploads/gallery pagination, per-tab scroll-to-top.
  • Improvements

    • App-wide migration to SDK/query-backed fetching for faster, more reliable loading, caching and pagination (search, feeds, communities, editor, profiles, wallet, drafts); improved notification handling (FCM/WebSocket) and draft/reply lifecycle.
  • Version

    • App updated to v3.5.0.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

Migrate app-wide data fetching to @ecency/sdk + TanStack React Query, standardize account identity to name, add a reply autosave cache (replyCache), introduce chat DM/privacy features and WebSocket metrics, add many SDK-backed hooks/mutations and pagination/list-ref wiring, and bump app version to 3.5.0.

Changes

Cohort / File(s) Summary
Version & Packages
package.json, android/app/build.gradle, ios/Ecency/Info.plist, ios/EcencyTests/Info.plist, ios/eshare/Info.plist, ios/Ecency.xcodeproj/...
Bump app version to 3.5.0; add @ecency/sdk, remeda; update package versions.
SDK init & query client
src/providers/queries/index.ts, src/providers/queries/sdk-config.ts
Expose SDK getQueryClient, add initSdkConfig(queryClient) with DMCA fetching/config, and extend dehydration logic.
Global React Query migration
src/providers/queries/**, src/providers/hive/*, many src/components/**, src/screens/**, src/containers/**, src/utils/**
Replace numerous direct dhive/ecency calls with SDK query options and TanStack React Query (fetchQuery, useQuery, useInfiniteQuery, useBroadcastMutation); widespread switch from usernamename.
Auth & credentials
src/providers/hive/auth.ts, src/hooks/useAuth.ts, src/utils/authMapper.ts, src/utils/crypto.ts
Add fetchAccount (enriched account + RC), new useAuth hook (returns decrypted { username, code }), auth-type → login-type mapper, and hardened decryptKey behavior.
Drafts & reply autosave
src/redux/reducers/cacheReducer.ts, src/redux/actions/cacheActions.ts, src/redux/constants/constants.ts, src/providers/queries/draftQueries.ts, src/screens/drafts/**, src/screens/editor/**
Introduce replyCache with UPDATE_REPLY_CACHE/DELETE_REPLY_CACHE_ENTRY; migrate reply/wave autosave to replyCache; migrate drafts to SDK infinite queries and add pagination helpers.
Posts, parsing & caches
src/providers/queries/postQueries/*.ts, src/utils/postParser.tsx, src/utils/editor.ts, src/components/postHtmlRenderer/**, src/components/postComments/**
Add parsePost/parseComment, injectPostCache/injectVoteCache; switch posts/discussions to SDK query options; improve immutability, parsing, vote/comment cache application; update useGetPostQuery props shape.
Chat / Mattermost & WebSocket
src/providers/chat/mattermost.ts, src/providers/chat/mattermostWebSocket.ts, src/screens/chats/**, src/components/chatChannelOptionsSheet/**, src/navigation/sheets.tsx
Add optional pendingPostId to messages, DM privacy APIs, ChatChannelOptionsSheet and registration, WS metrics + reconnect cap, channel resolution/leave flow, and DM warning UI.
Notifications & mark-read
src/providers/queries/notificationQueries.ts, src/components/notification/**, src/screens/notification/**
Use SDK useMarkNotificationsRead with credential decryption, memoize/aggregate notification data, add listRef and tab scroll-to-top wiring.
Wallet / trade / power-down
src/providers/queries/walletQueries/walletQueries.ts, src/utils/wallet.ts, src/screens/trade/**, src/screens/transfer/**, src/screens/transfer/screen/powerDownScreen.tsx
Migrate wallet/trade flows to SDK infinite queries, aggregate pending requests, refactor PowerDown as functional component, normalize owner/name usage, add engineTrxId to activities.
Bookmarks, editor & media
src/providers/queries/bookmarkQueries.ts, src/providers/queries/editorQueries.ts, src/components/snippetsModal/**, src/components/uploadsGalleryModal/**
Add bookmark hooks/mutations, migrate media/snippets to SDK infinite queries, add pagination/load-more wiring and gallery pagination props.
UI pagination, list refs & perf
multiple components/screens (bookmarks, drafts, uploadsGallery, lists, search, communities, notifications)
Add listRef props, expose fetchNextPage/hasNextPage/isFetchingNextPage (and renames where applicable), stabilize handlers with memoization, wire onEndReached/load-more.
Selectors, hooks & barrels
src/redux/selectors/index.ts, src/hooks/index.ts, src/components/index.tsx
Add selectors (selectDraftById, selectReplyById, selectVoteByPath), export useAuth, export ChatChannelOptionsSheet in components barrel.
Chat UX & DM privacy in Settings
src/screens/chats/**, src/screens/settings/**, src/components/chatChannelOptionsSheet/**
Add DM privacy UI and persistence, channel options sheet integration, DM warning banner and styles; surface DM privacy in settings.
Mana, parsers & misc
src/utils/manaBar.ts, src/utils/postParser.tsx, README.md, various small files
Add mana calculation helpers and types, parser hardening and new parseComment signature, remove noisy logs, add locale key chats.leave_conversation, README updates and assorted fixes.

Sequence Diagram(s)

sequenceDiagram
  participant UI as App UI
  participant QC as QueryClient (SDK)
  participant API as Ecency API
  participant WS as Mattermost WS

  UI->>QC: fetchQuery(getPost/getDiscussions/getAccountFull/...)
  QC->>API: HTTP request via SDK
  API-->>QC: response
  QC-->>UI: cached data (useQuery / useInfiniteQuery)
  UI->>QC: mutate (useBroadcastMutation / useMarkNotificationsRead) with credentials
  QC->>API: broadcast/mutation (signed)
  API-->>QC: tx/result
  QC-->>UI: invalidate/refresh relevant queries
  UI->>WS: send chat message (include pendingPostId)
  WS-->>UI: confirmation (pendingPostId)
  UI->>QC: invalidate discussions / refetch related feeds
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120+ minutes

Poem

🐰 I hopped through SDK fields bright and new,
Queries caching carrots, tidy and true,
Replies tucked snug in a cozy den,
DM banners and webs reconnecting friends,
Version 3.5.0 — a hop, a patch, a view!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'SDK migration' is vague and generic, using a non-descriptive term that doesn't convey specific information about what is actually being migrated or why. Use a more descriptive title that specifies the scope of the SDK migration, such as 'Migrate data fetching to @ecency/sdk query options' or 'Replace legacy Hive/dhive calls with SDK-based queries'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@feruzm feruzm merged commit 4b7c104 into development Jan 27, 2026
5 checks passed
@feruzm feruzm deleted the sdk branch January 27, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants