Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Jul 4, 2025

Summary

  • remove DocumentScanner source references from iOS project
  • add @types/node to common package dev deps
  • fix utils path in core tsconfig

Testing

  • pod install (fails: command not found)
  • yarn workspace @selfxyz/common run types
  • yarn workspace @selfxyz/core run types

https://chatgpt.com/codex/tasks/task_b_6867ee657d18832d8b9815ec4e72fe43

Summary by CodeRabbit

  • Chores

    • Removed document scanner source files from the iOS project configuration.
    • Updated TypeScript configuration to disallow JavaScript files and improved formatting.
    • Adjusted TypeScript include paths for SDK core utilities.
    • Added Node.js type definitions as a development dependency.
    • Added TypeScript module declaration to support importing JSON files.
  • Refactor

    • Updated type definitions for button press handlers and event listeners for improved type safety.
    • Changed type annotations in several components and screens to increase flexibility and maintainability.
    • Improved native module command dispatch typing for better code clarity.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

Walkthrough

This update removes document scanning source files from the iOS Xcode project configuration and makes several TypeScript type refinements across the codebase. Adjustments include stricter typing for button props, event handlers, and refs, as well as TypeScript configuration tweaks such as disallowing JavaScript files and updating include paths. A new Node type definition dependency is also added.

Changes

File(s) Change Summary
app/ios/Self.xcodeproj/project.pbxproj Removed references to DocumentScanner-related files from Xcode project configuration.
app/src/components/buttons/AbstractButton.tsx Refined onPress prop type in AbstractButtonProps to disallow null/undefined.
app/src/components/native/RCTFragment.tsx Added ViewManagerConfig interface; typed UIManager.getViewManagerConfig(...) result; removed string conversion of command ID.
app/src/screens/passport/PassportNFCScanScreen.tsx Added NativeEventData type alias; changed native event listener callback parameter from string to Object and cast to NativeEventData.
app/src/screens/prove/ProveScreen.tsx Changed scrollViewRef type annotation to use React.ComponentRef<typeof ScrollView>.
app/tsconfig.json Added "allowJs": false compiler option to disallow JavaScript files in TypeScript compilation.
sdk/core/tsconfig.json Corrected "include" path from "utils/utils.ts" to "src/utils/utils.ts".
common/package.json Added "@types/node": "^20.11.19" to devDependencies.
app/declarations.d.ts Added module declaration for importing JSON files with default export of type any.

Suggested reviewers

  • remicolin

Poem

Out with the scanner, the code is now clean,
Types refined and configs lean.
Arrays re-lined, JS not allowed,
TypeScript stands strong, robust and proud.
With Node types in tow and a scroll ref set free,
A tidy codebase is a joy to see!
🚀✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b90e097 and cb16e5b.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (9)
  • app/declarations.d.ts (1 hunks)
  • app/ios/Self.xcodeproj/project.pbxproj (0 hunks)
  • app/src/components/buttons/AbstractButton.tsx (1 hunks)
  • app/src/components/native/RCTFragment.tsx (2 hunks)
  • app/src/screens/passport/PassportNFCScanScreen.tsx (2 hunks)
  • app/src/screens/prove/ProveScreen.tsx (1 hunks)
  • app/tsconfig.json (1 hunks)
  • common/package.json (1 hunks)
  • sdk/core/tsconfig.json (1 hunks)
✨ 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@transphorm
Copy link
Member Author

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

✅ Actions performed

Full review triggered.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
sdk/core/tsconfig.json (1)

16-22: Fix Prettier formatting issues.

The pipeline indicates formatting issues that need to be addressed.

Run Prettier to fix formatting:

npx prettier --write sdk/core/tsconfig.json
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b90e097 and 6b381b1.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (8)
  • app/ios/Self.xcodeproj/project.pbxproj (0 hunks)
  • app/src/components/buttons/AbstractButton.tsx (1 hunks)
  • app/src/components/native/RCTFragment.tsx (1 hunks)
  • app/src/screens/passport/PassportNFCScanScreen.tsx (1 hunks)
  • app/src/screens/prove/ProveScreen.tsx (1 hunks)
  • app/tsconfig.json (1 hunks)
  • common/package.json (1 hunks)
  • sdk/core/tsconfig.json (1 hunks)
💤 Files with no reviewable changes (1)
  • app/ios/Self.xcodeproj/project.pbxproj
🧰 Additional context used
📓 Path-based instructions (1)
`app/src/**/*.{ts,tsx,js,jsx}`: Review React Native TypeScript code for: - Compo...

app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:

  • Component architecture and reusability
  • State management patterns
  • Performance optimizations
  • TypeScript type safety
  • React hooks usage and dependencies
  • Navigation patterns

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • app/src/screens/prove/ProveScreen.tsx
  • app/src/components/native/RCTFragment.tsx
  • app/src/screens/passport/PassportNFCScanScreen.tsx
  • app/src/components/buttons/AbstractButton.tsx
🪛 GitHub Actions: General Self CI
sdk/core/tsconfig.json

[warning] 1-1: Prettier warning: Code style issues found. Run Prettier with --write to fix.

app/tsconfig.json

[warning] 1-1: Prettier warning: Code style issues found. Run Prettier with --write to fix.

app/src/screens/passport/PassportNFCScanScreen.tsx

[warning] 287-287: Prettier warning: Replace formatting at line 287:50 to conform with prettier/prettier rule.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build
🔇 Additional comments (4)
app/tsconfig.json (2)

4-7: Array formatting improvement approved.

The multi-line array formatting enhances readability and follows common TypeScript configuration patterns.

Also applies to: 10-12


14-14: No .js files detected—allowJs: false is safe

I ran a scan of app/src and found zero .js files, and your exclude patterns already omit node_modules and tests. With no JavaScript sources to compile, setting "allowJs": false won’t break the build. The formatting tweak is purely cosmetic.

common/package.json (1)

81-81: @types/node Version Check Complete

  • Verified that @types/[email protected] has no known security vulnerabilities (Snyk).
  • The latest published version is 24.0.3 (npmjs.com), but since this project targets Node.js v20 LTS, remaining on ^20.11.19 is appropriate.
  • No further action required—this addition is safe to merge.
app/src/components/buttons/AbstractButton.tsx (1)

22-22: Excellent type safety improvement!

Refining the onPress type to remove null | undefined while keeping it optional improves the API contract. This ensures that when onPress is provided, it's guaranteed to be a valid function, while still allowing the prop to be omitted entirely.

The implementation correctly handles the optional nature by checking if (onPress) before invocation on line 55.

@transphorm
Copy link
Member Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@transphorm
Copy link
Member Author

@coderabbitai summary

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

✅ Actions performed

Summary regeneration triggered.

@transphorm
Copy link
Member Author

@coderabbitai title

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 4, 2025

Tip

For best results, initiate chat on the files or code changes.

@transphorm Here's a suggested title for your PR:

Remove unused iOS DocumentScanner files and improve TypeScript configuration

This title captures the two main aspects of your changes:

  1. The removal of stale DocumentScanner source files from the iOS project
  2. The various TypeScript improvements including configuration fixes, type refinements, and dependency updates

The title is clear, specific, and describes the actual work done rather than using generic terms like "clean" or "refs".

@transphorm transphorm changed the title Clean stale ios refs and type config Clean stale ios refs and update / fix typescript config Jul 4, 2025
@transphorm transphorm merged commit 78e8871 into aaronmgdr/rn-up Jul 4, 2025
10 checks passed
@transphorm transphorm deleted the codex/fix-react-native-upgrade-issues branch July 4, 2025 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants