Skip to content

Conversation

lposen
Copy link
Contributor

@lposen lposen commented Sep 30, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

@lposen lposen requested a review from Copilot September 30, 2025 02:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a new architecture for the Iterable React Native SDK with comprehensive unit tests. The changes include adding testIDs to inbox components for better testing infrastructure and setting up TurboModule support for React Native's New Architecture.

  • Added testIDs to all major inbox UI components for automated testing
  • Implemented comprehensive unit tests for core inbox components and hooks
  • Created new architecture support with TurboModule integration

Reviewed Changes

Copilot reviewed 41 out of 44 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/inbox/components/*.tsx Added testIDs to inbox components for testing infrastructure
src/inbox/components/*.test.tsx Added comprehensive unit tests for inbox components
src/core/hooks/*.test.tsx Added unit tests for device orientation and app state hooks
src/core/classes/Iterable.ts Updated type signatures for null safety and added new architecture support
src/api/* Added new API layer with TurboModule support
ios/RNIterableAPI/* Updated iOS implementation for new architecture compatibility
android/src/* Added Android new/old architecture separation
package.json Updated dependencies for React Navigation and testing libraries

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

{emptyStateTitle ? emptyStateTitle : defaultTitle}
</Text>
<Text style={styles.body}>
<Text testID={inboxEmptyStateTestIDs.body} style={styles.body}>
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before style attribute. Should be testID={inboxEmptyStateTestIDs.body} style={styles.body}.

Copilot uses AI. Check for mistakes.

},
})
).current;
);
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing .current accessor. The panResponder is created with useRef(), so it should be accessed as panResponder.current when getting the panHandlers.

Copilot uses AI. Check for mistakes.

Comment on lines +427 to 428
testID={inboxMessageCellTestIDs.selectButton}
activeOpacity={1}
Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation. The testID should be aligned with the other props on the same indentation level as activeOpacity.

Copilot uses AI. Check for mistakes.

Comment on lines +294 to +295


Copy link
Preview

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary blank lines. Remove the extra empty lines.

Copilot uses AI. Check for mistakes.

@lposen lposen changed the base branch from master to new-arch/master September 30, 2025 02:11
Copy link

github-actions bot commented Sep 30, 2025

Lines Statements Branches Functions
Coverage: 70%
69.85% (329/471) 58.06% (108/186) 61.84% (94/152)

Copy link

qltysh bot commented Sep 30, 2025

❌ 5 blocking issues (6 total)

Tool Category Rule Count
eslint Lint Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
5
qlty Structure Function with many returns (count = 8): IterableInbox 1

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

@@ -1,8 +1,8 @@
import { NativeEventEmitter } from 'react-native';
import { NativeEventEmitter, Platform } from 'react-native';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

@@ -0,0 +1,184 @@
import { renderHook, act } from '@testing-library/react-native';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

@@ -0,0 +1,424 @@
import { renderHook, act } from '@testing-library/react-native';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

@@ -0,0 +1,768 @@
import { render, waitFor } from '@testing-library/react-native';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

@@ -0,0 +1,647 @@
import { render, fireEvent } from '@testing-library/react-native';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]

Copy link

qltysh bot commented Sep 30, 2025

Diff Coverage: The code coverage on the diff in this pull request is 100.0%.

Total Coverage: This PR will increase coverage by 31.6%.

File Coverage Changes
Path File Coverage Δ Indirect
src/core/classes/Iterable.ts 22.6
src/core/classes/IterableAuthResponse.ts 100.0
src/core/hooks/useAppStateListener.ts 100.0
src/core/hooks/useDeviceOrientation.tsx 100.0
src/hooks/index.ts -100.0
src/inApp/classes/IterableInAppMessage.ts 12.1
src/inbox/components/IterableInbox.tsx 68.8
src/inbox/components/IterableInboxEmptyState.tsx 71.4
src/inbox/components/IterableInboxMessageCell.tsx 50.0
src/inbox/components/IterableInboxMessageDisplay.tsx 35.1
src/inbox/components/IterableInboxMessageList.tsx 52.6
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

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