Skip to content

Comments

chore(js-ts): migrate AppInformation component to TypeScript#313

Open
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1770658343-migrate-app-information-to-ts
Open

chore(js-ts): migrate AppInformation component to TypeScript#313
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1770658343-migrate-app-information-to-ts

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Feb 9, 2026

chore(js-ts): migrate AppInformation component to TypeScript

Summary

Migrates app/components/Views/Settings/AppInformation/index.js from JavaScript to TypeScript (.tsx), as part of the ongoing JS→TS migration effort.

Key changes:

  • Replaced PropTypes with TypeScript interfaces (AppInformationProps, AppInformationState)
  • Typed navigation prop as NavigationProp<ParamListBase> (matching project convention)
  • Added declare context: Theme for ThemeContext typing
  • Typed createStyles parameter as Colors, and goTo parameters as string
  • Converted require() image import to ES module import
  • Removed two references to styles.links — this key never existed in the stylesheet, so it was always undefined at runtime. The <View> elements now simply have no style prop, which is functionally identical.
  • Added @ts-expect-error in the test file to work around renderScreen accepting React.ComponentType<{}>, which conflicts with the now-typed required navigation prop (navigation is injected at runtime by Stack.Screen).

Review & Testing Checklist for Human

  • Verify styles.links removal is safe: Confirm that the stylesheet truly never defined a links key and that no other mechanism injected this style. The original code had <View style={styles.links}> in two places, but createStyles only defines link (singular). Removal should be a no-op, but worth confirming.
  • Snapshot test: The removal of style={styles.links} (which was undefined) from two <View> elements may or may not change the rendered snapshot. Run yarn jest app/components/Views/Settings/AppInformation/index.test.tsx --updateSnapshot if the snapshot needs regenerating, and verify the diff is trivial.
  • declare context: Theme: The ThemeContext is created as React.createContext<any>(undefined), so context could technically be undefined. The code handles this with this.context.colors || mockTheme.colors, but the declared type doesn't reflect the undefined case. Verify this is acceptable given the existing pattern.

Notes


Open with Devin

Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Co-Authored-By: Joao Esteves <joao.esteves@cognition.ai>
Copy link
Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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.

0 participants