Conversation
|
📝 WalkthroughWalkthroughUpdates Stream SDK dependencies across sample apps, upgrades React Native dogfood libraries (flash-list, react-native-teleport), removes dark-mode color logic from theme hook, adds React Native dogfood architecture documentation, and corrects Next.js type reference path. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
sample-apps/react-native/dogfood/CLAUDE.md (1)
63-70: Add language specification to fenced code block.The fenced code block lacks a language identifier. Since this is navigation flow pseudocode rather than executable code, specify
textas the language for proper rendering.📝 Proposed fix
-``` +```text Meeting: JoinMeetingScreen → MeetingScreen → ChatScreen (optional) → GuestModeScreen → GuestMeetingScreen Call: JoinCallScreen → [RingingCallContent overlay for incoming calls]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sample-apps/react-native/dogfood/CLAUDE.md` around lines 63 - 70, The fenced code block containing the navigation pseudocode (the lines starting with "Meeting: JoinMeetingScreen → MeetingScreen → ChatScreen (optional)" etc.) should include a language identifier to ensure proper rendering; edit the triple-backtick fence enclosing that block in CLAUDE.md to use "text" (i.e., ```text) so the pseudocode is rendered as plain text.sample-apps/react-native/dogfood/src/hooks/useTheme.ts (1)
12-14: Consider returning a stable theme object reference.
useStreamChatThemecurrently creates a fresh object on each call; using a module-level constant (or memoization) can avoid unnecessary provider value churn.♻️ Suggested tweak
+const CHAT_STYLE: DeepPartial<Theme> = { + avatar: { + image: { + height: 32, + width: 32, + }, + }, +}; + -const getChatStyle = (): DeepPartial<Theme> => ({ - avatar: { - image: { - height: 32, - width: 32, - }, - }, -}); +const getChatStyle = (): DeepPartial<Theme> => CHAT_STYLE;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sample-apps/react-native/dogfood/src/hooks/useTheme.ts` around lines 12 - 14, useStreamChatTheme currently returns a fresh theme object every call (via getChatStyle), causing unnecessary re-renders; change it to return a stable reference by memoizing the result or using a module-level constant: inside useStreamChatTheme, use React.useMemo(() => getChatStyle(), []) or compute getChatStyle once at module scope and return that constant so the provider value from useStreamChatTheme remains referentially stable.sample-apps/react-native/dogfood/package.json (2)
51-52: Please attach a migration smoke-test checklist for this beta upgrade.Given the beta jump, include explicit dogfood validation notes for chat flows and push-notification integration before merge.
Based on learnings: Use the dogfood sample app (
sample-apps/react-native/dogfood/) for manual testing of all SDK features and integration with push notifications before release.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sample-apps/react-native/dogfood/package.json` around lines 51 - 52, The package.json update bumps "stream-chat" and "stream-chat-react-native" to a beta; add a migration smoke-test checklist and dogfood validation notes to the repo so reviewers can manually verify chat flows and push notifications before merging: create a short CHECKLIST.md or add to the existing README that references the dogfood sample app and lists explicit steps to test (1) sign-in/token flow, (2) sending/receiving messages, attachments, reactions, typing indicators, and presence, (3) channel creation/permissions, (4) offline/reconnect behavior, and (5) push-notification registration/receipt for both iOS and Android, plus expected results and any known beta caveats; link these instructions to the dependency change (package.json entries "stream-chat" and "stream-chat-react-native") so the reviewer can run the checklist against the sample-app before merging.
51-52: Pin exact beta version for dogfood reproducibility.Line 52 uses a caret prerelease range (
^9.0.0-beta.1), which can drift to9.0.0-beta.2,9.0.0, or9.1.0during integration testing. Since dogfood serves as a QA environment for manual testing, exact pinning ensures consistent, reproducible builds across test runs.♻️ Suggested change
- "stream-chat-react-native": "^9.0.0-beta.1" + "stream-chat-react-native": "9.0.0-beta.1"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@sample-apps/react-native/dogfood/package.json` around lines 51 - 52, Change the prerelease dependency range on stream-chat-react-native from a caret range to an exact version to prevent drift; in package.json update the dependency "stream-chat-react-native" so it is pinned to the exact version 9.0.0-beta.1 (remove the leading caret) to ensure reproducible dogfood builds during testing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@sample-apps/react/react-dogfood/next-env.d.ts`:
- Line 3: Remove the dev-only generated import from the framework-managed
next-env.d.ts: delete the import statement that references
"./.next/dev/types/routes.d.ts" so the file no longer depends on a local dev
artifact; leave the rest of next-env.d.ts untouched since Next.js manages it and
tsconfig already includes .next/types/**/*.ts.
---
Nitpick comments:
In `@sample-apps/react-native/dogfood/CLAUDE.md`:
- Around line 63-70: The fenced code block containing the navigation pseudocode
(the lines starting with "Meeting: JoinMeetingScreen → MeetingScreen →
ChatScreen (optional)" etc.) should include a language identifier to ensure
proper rendering; edit the triple-backtick fence enclosing that block in
CLAUDE.md to use "text" (i.e., ```text) so the pseudocode is rendered as plain
text.
In `@sample-apps/react-native/dogfood/package.json`:
- Around line 51-52: The package.json update bumps "stream-chat" and
"stream-chat-react-native" to a beta; add a migration smoke-test checklist and
dogfood validation notes to the repo so reviewers can manually verify chat flows
and push notifications before merging: create a short CHECKLIST.md or add to the
existing README that references the dogfood sample app and lists explicit steps
to test (1) sign-in/token flow, (2) sending/receiving messages, attachments,
reactions, typing indicators, and presence, (3) channel creation/permissions,
(4) offline/reconnect behavior, and (5) push-notification registration/receipt
for both iOS and Android, plus expected results and any known beta caveats; link
these instructions to the dependency change (package.json entries "stream-chat"
and "stream-chat-react-native") so the reviewer can run the checklist against
the sample-app before merging.
- Around line 51-52: Change the prerelease dependency range on
stream-chat-react-native from a caret range to an exact version to prevent
drift; in package.json update the dependency "stream-chat-react-native" so it is
pinned to the exact version 9.0.0-beta.1 (remove the leading caret) to ensure
reproducible dogfood builds during testing.
In `@sample-apps/react-native/dogfood/src/hooks/useTheme.ts`:
- Around line 12-14: useStreamChatTheme currently returns a fresh theme object
every call (via getChatStyle), causing unnecessary re-renders; change it to
return a stable reference by memoizing the result or using a module-level
constant: inside useStreamChatTheme, use React.useMemo(() => getChatStyle(), [])
or compute getChatStyle once at module scope and return that constant so the
provider value from useStreamChatTheme remains referentially stable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: be601737-a851-4e1e-b594-4e52924ea2d0
⛔ Files ignored due to path filters (2)
sample-apps/react-native/dogfood/ios/Podfile.lockis excluded by!**/*.lockyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (7)
sample-apps/react-native/dogfood/CLAUDE.mdsample-apps/react-native/dogfood/package.jsonsample-apps/react-native/dogfood/src/hooks/useTheme.tssample-apps/react/messenger-clone/package.jsonsample-apps/react/react-dogfood/next-env.d.tssample-apps/react/react-dogfood/package.jsonsample-apps/react/zoom-clone/package.json
| /// <reference types="next" /> | ||
| /// <reference types="next/image-types/global" /> | ||
| import "./.next/types/routes.d.ts"; | ||
| import "./.next/dev/types/routes.d.ts"; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== References to .next/dev/types =="
rg -n --hidden -g '!**/node_modules/**' '\.next/dev/types/routes\.d\.ts|\.next/dev/types' || true
echo
echo "== References to .next/types =="
rg -n --hidden -g '!**/node_modules/**' '\.next/types/routes\.d\.ts|\.next/types/\*\*/\*\.ts|typedRoutes' || true
echo
echo "== next-env.d.ts files =="
fd 'next-env\.d\.ts$' -HRepository: GetStream/stream-video-js
Length of output: 537
🏁 Script executed:
cat -n sample-apps/react/react-dogfood/next-env.d.tsRepository: GetStream/stream-video-js
Length of output: 363
🏁 Script executed:
cd sample-apps/react/react-dogfood && sed -n '20,35p' tsconfig.json && echo "..." && sed -n '26,32p' tsconfig.jsonRepository: GetStream/stream-video-js
Length of output: 382
🏁 Script executed:
grep -A 5 -B 5 '\.next/types' sample-apps/react/react-dogfood/tsconfig.jsonRepository: GetStream/stream-video-js
Length of output: 225
Remove the dev-only artifact import from the framework-managed next-env.d.ts file.
The file explicitly states "This file should not be edited" and is managed by Next.js. The import on line 3 points to ./.next/dev/types/routes.d.ts, which is a local dev-only generated artifact that does not exist in CI, production, or other environments. The tsconfig is already correctly configured with .next/types/**/*.ts for framework-managed type includes. Removing this import ensures type checking works across all build contexts.
Suggested fix
-import "./.next/dev/types/routes.d.ts";📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import "./.next/dev/types/routes.d.ts"; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@sample-apps/react/react-dogfood/next-env.d.ts` at line 3, Remove the dev-only
generated import from the framework-managed next-env.d.ts: delete the import
statement that references "./.next/dev/types/routes.d.ts" so the file no longer
depends on a local dev artifact; leave the rest of next-env.d.ts untouched since
Next.js manages it and tsconfig already includes .next/types/**/*.ts.
💡 Overview
Upgrades to the newest Stream Chat beta SDKs;
Summary by CodeRabbit
Documentation
Chores
Style