Skip to content

fix: resolve type errors from NativeWindUI 2.0.0 upgrade#1984

Open
andrew-bierman wants to merge 1 commit intodevelopmentfrom
fix/nativewindui-type-errors
Open

fix: resolve type errors from NativeWindUI 2.0.0 upgrade#1984
andrew-bierman wants to merge 1 commit intodevelopmentfrom
fix/nativewindui-type-errors

Conversation

@andrew-bierman
Copy link
Collaborator

Summary

  • Fix 47 type errors introduced by the @packrat-ai/nativewindui 2.0.0 upgrade (PR fix: upgrade nativewindui dep #1982)
  • AlertRefAlertMethods (18 files)
  • LargeTitleSearchBarRefLargeTitleSearchBarMethods (4 files)
  • ContextMenuRefContextMenuMethods (1 file)
  • Removed colors.green/colors.yellow theme properties → hardcoded RGB values
  • Fixed SF Symbol icon names for iOS compatibility
  • Removed deprecated rootStyle and namingScheme props
  • Added missing Share import from react-native
  • Fixed SearchInputRef type mismatch

Test plan

  • bun check-types passes clean (0 errors)
  • Verify Biome check passes in CI
  • Verify E2E tests are not affected

🤖 Generated with Claude Code

- AlertRef -> AlertMethods (18 files)
- LargeTitleSearchBarRef -> LargeTitleSearchBarMethods (4 files)
- ContextMenuRef -> ContextMenuMethods (chat.tsx)
- Replace colors.green/colors.yellow with hardcoded RGB values
- Fix icon names to use valid SfSymbols (arrowshape.left, plus.app, clipboard, bell, trash, house.fill, square.and.pencil)
- Fix person-outline -> account-outline for MaterialCommunityIcons
- Fix backpack -> bag-personal for MaterialCommunityIcons
- Remove deprecated namingScheme prop from dropdown items
- Replace rootStyle with style on List component
- Add missing Share import from react-native (TripDetailScreen)
- Fix SearchInputRef type to use TextInput directly (LocationSearchScreen)
Copilot AI review requested due to automatic review settings March 19, 2026 14:05
Copy link
Contributor

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 addresses TypeScript breakages introduced by the @packrat-ai/nativewindui 2.0.0 upgrade across the Expo app by updating renamed ref types/method interfaces, removing deprecated props, and aligning a handful of UI usages (icons/colors/Share import) with the new library surface area.

Changes:

  • Renamed NativeWindUI ref types (AlertRef/LargeTitleSearchBarRef/ContextMenuRef*Methods) and updated useRef usages accordingly.
  • Removed/updated deprecated NativeWindUI props (rootStyle, rootClassName, namingScheme) and adjusted several icon names.
  • Replaced some theme color usages (colors.green/colors.yellow) with RGB literals and added a missing Share import where needed.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
apps/expo/features/weather/screens/LocationSearchScreen.tsx Updates SearchInput ref typing to match new component/ref expectations.
apps/expo/features/weather/components/WeatherAlertsTile.tsx Renames alert ref type to AlertMethods.
apps/expo/features/trips/screens/TripListScreen.tsx Renames large title search bar ref type to LargeTitleSearchBarMethods.
apps/expo/features/trips/screens/TripDetailScreen.tsx Renames alert ref type and adds Share import for share action.
apps/expo/features/trips/components/UpcomingTripsTile.tsx Renames alert ref type to AlertMethods.
apps/expo/features/trips/components/TripCard.tsx Renames alert ref type to AlertMethods.
apps/expo/features/trips/components/TrailConditionsTile.tsx Renames alert ref type to AlertMethods.
apps/expo/features/packs/screens/PackListScreen.tsx Renames large title search bar ref type to LargeTitleSearchBarMethods.
apps/expo/features/packs/components/WeightAnalysisTile.tsx Renames alert ref type to AlertMethods.
apps/expo/features/packs/components/PackStatsTile.tsx Renames alert ref type to AlertMethods.
apps/expo/features/packs/components/PackCategoriesTile.tsx Renames alert ref type to AlertMethods.
apps/expo/features/packs/components/HorizontalCatalogItemCard.tsx Replaces removed theme color usage for rating star with RGB literal.
apps/expo/features/packs/components/GearInventoryTile.tsx Renames alert ref type to AlertMethods.
apps/expo/features/packs/components/GapSuggestion.tsx Replaces removed theme color usage for priority color with RGB literal.
apps/expo/features/pack-templates/screens/PackTemplateListScreen.tsx Renames large title search bar ref type to LargeTitleSearchBarMethods.
apps/expo/features/catalog/screens/CatalogItemDetailScreen.tsx Replaces removed theme color usage for rating star with RGB literal.
apps/expo/features/catalog/components/ItemReviews.tsx Replaces removed theme color usage for verified/star indicators with RGB literals.
apps/expo/features/catalog/components/CatalogItemSelectCard.tsx Replaces removed theme color usage for rating star with RGB literal.
apps/expo/features/catalog/components/CatalogItemCard.tsx Replaces removed theme color usage for rating star with RGB literal.
apps/expo/features/auth/components/DeleteAccountButton.tsx Renames alert ref type to AlertMethods.
apps/expo/features/ai/components/WebSearchGenerativeUI.tsx Replaces removed theme color usage for link/source indicator with RGB literal.
apps/expo/features/ai-packs/screens/AIPacksScreen.tsx Renames alert ref type and updates alert icon + color usage.
apps/expo/app/auth/one-time-password.tsx Renames alert ref type to AlertMethods.
apps/expo/app/auth/index.tsx Renames alert ref type to AlertMethods.
apps/expo/app/auth/(login)/reset-password.tsx Renames alert ref type to AlertMethods.
apps/expo/app/auth/(login)/forgot-password.tsx Renames alert ref type to AlertMethods.
apps/expo/app/auth/(create-account)/credentials.tsx Renames alert ref type to AlertMethods.
apps/expo/app/_layout.tsx Renames global app alert ref type to AlertMethods.
apps/expo/app/(app)/shopping-list.tsx Replaces removed theme color usage for “purchased” indicator with RGB literal.
apps/expo/app/(app)/settings/index.android.tsx Replaces deprecated rootStyle/rootClassName with style/className on List.
apps/expo/app/(app)/messages/conversations.tsx Updates dropdown/context menu icon names and removes deprecated icon props.
apps/expo/app/(app)/messages/conversations.android.tsx Updates dropdown icon names and removes deprecated icon props.
apps/expo/app/(app)/messages/chat.tsx Renames context menu ref type and updates context menu icon names.
apps/expo/app/(app)/messages/chat.android.tsx Updates dropdown icon names to match new icon prop surface.
apps/expo/app/(app)/(tabs)/profile/name.tsx Updates FormSection icon name for compatibility.
apps/expo/app/(app)/(tabs)/profile/index.tsx Renames alert ref type and replaces success icon color with RGB literal.
apps/expo/app/(app)/(tabs)/(home)/index.tsx Renames large title search bar ref type to LargeTitleSearchBarMethods.

You can also share your feedback on Copilot code review. Take the survey.

title: t('ai.packsGenerated'),
message: t('ai.successfullyGenerated', { count: packs.length }),
materialIcon: { name: 'backpack', color: colors.green },
materialIcon: { name: 'bag-personal', color: 'rgb(48, 164, 108)' },
{item.ratingValue && (
<View className="flex-row items-center">
<Icon name="star" size={16} color={colors.yellow} />
<Icon name="star" size={16} color={'rgb(255, 204, 0)'} />
{review.verified && (
<View className="mr-2 flex-row items-center">
<Icon name="check-circle-outline" size={14} color={colors.green} />
<Icon name="check-circle-outline" size={14} color={'rgb(48, 164, 108)'} />
{item.ratingValue && (
<View className="flex-row items-center gap-1">
<Icon name="star" size={12} color={colors.yellow} />
<Icon name="star" size={12} color={'rgb(255, 204, 0)'} />
<View className="mb-6">
<View className="flex-row items-center mb-3">
<Icon name="link" size={16} color={colors.green} />
<Icon name="link" size={16} color={'rgb(48, 164, 108)'} />
{item.ratingValue && (
<View className="flex-row items-center">
<Icon name="star" size={14} color={colors.yellow} />
<Icon name="star" size={14} color={'rgb(255, 204, 0)'} />
Comment on lines 56 to 60
{item.ratingValue && (
<View className="flex-row items-center">
<Icon name="star" size={14} color={colors.yellow} />
<Icon name="star" size={14} color={'rgb(255, 204, 0)'} />
<Text className="ml-1 text-xs text-muted-foreground">
{item.ratingValue.toFixed(1)}
Comment on lines 79 to 86
{[1, 2, 3, 4, 5].map((star) => (
<Icon
key={star}
name={star <= review.rating ? 'star' : 'star-outline'}
size={14}
color={colors.yellow}
color={'rgb(255, 204, 0)'}
/>
))}
return isDarkColorScheme ? '#ef4444' : colors.destructive;
case 'nice-to-have':
return colors.yellow;
return 'rgb(255, 204, 0)';
Comment on lines 145 to 149
{item.purchased && (
<View className="mt-3 flex-row items-center gap-1">
<Icon name="check-circle" size={16} color={colors.green} />
<Icon name="check-circle" size={16} color={'rgb(48, 164, 108)'} />
<Text variant="footnote" className="text-green-500">
{t('shopping.purchased')}
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.

2 participants