Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OK-34789: Device management #6667

Merged
merged 20 commits into from
Feb 13, 2025
Merged

OK-34789: Device management #6667

merged 20 commits into from
Feb 13, 2025

Conversation

originalix
Copy link
Contributor

@originalix originalix commented Feb 13, 2025

Summary by CodeRabbit

  • New Features

    • Introduced comprehensive device management modals providing detailed device information, advanced toggles, and QR guidance.
    • Added a dedicated device management button in wallet options and a new list view for managing hardware wallets.
    • Rolled out a device guide modal in onboarding and enhanced address book display with secure modal presentation.
    • Added new translations for backup features and account management.
    • Enhanced sidebar with new navigation options and a download button.
  • Refactor

    • Streamlined sidebar navigation and wallet options for a simpler, more focused user experience.
    • Expanded localization for backup and account management and improved modal routing for smoother navigation.

Copy link

codesandbox bot commented Feb 13, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

coderabbitai bot commented Feb 13, 2025

Walkthrough

This pull request simplifies sidebar functionality and enhances device management features. It removes unnecessary elements from navigation components and introduces new hooks for displaying the address book. Multiple device management components and modal routes are added for showing device details, lists, and guides. Updates to shared routes, translations, and utility functions support this new functionality. Additionally, a new service API method is included to fetch hardware and QR wallets with their devices. Overall, the changes streamline UI components while integrating new device management capabilities.

Changes

File(s) Change Summary
packages/components/src/…/DesktopLeftSideBar.tsx, packages/kit/src/provider/Container/PortalBodyContainer/SideBanner.tsx, packages/kit/src/views/Setting/pages/List/DefaultSection/index.tsx, packages/kit/src/hooks/useShowAddressBook.ts Removed download/settings imports and components from the sidebar; simplified layout by replacing settings logic with a Portal component and new BottomMenu; updated AddressBookItem to use the new useShowAddressBook hook; added the custom hook.
packages/kit-bg/src/services/ServiceAccount/ServiceAccount.ts, packages/shared/types/account.ts Added new method getAllHwQrWalletWithDevice to fetch hardware/QR wallets with devices; introduced new type IHwQrWalletWithDevice.
packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/WalletDetails/WalletOptions/DeviceManagementButton.tsx, packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/WalletDetails/WalletOptions/index.tsx Introduced new DeviceManagementButton and DeviceManagementButtonView; updated WalletOptionsView signature to remove device dependency and include device management action.
packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceAdvanceSection.tsx, DeviceBasicInfoSection.tsx, DeviceQrInfoSection.tsx, DeviceSpecsSection.tsx, packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/index.tsx Added new DeviceDetailsModal and related sub-components for displaying device information, settings toggles, firmware details, and specifications.
packages/kit/src/views/DeviceManagement/pages/DeviceGuideModal/index.tsx, packages/kit/src/views/DeviceManagement/pages/DeviceManagementListModal/index.tsx, packages/kit/src/views/DeviceManagement/router/index.tsx Added new modals for device guidance and device lists; configured updated modal routes using DeviceManagementStacks.
packages/kit/src/views/Onboarding/router/index.ts Updated onboarding router to include DeviceManagementGuideModal for device management guidance.
packages/shared/src/locale/enum/translations.ts, packages/shared/src/routes/deviceManagement.ts, packages/shared/src/routes/index.ts, packages/shared/src/routes/modal.ts, packages/shared/src/routes/onboarding.ts, packages/shared/src/utils/deviceUtils.ts Expanded translation entries; added new enums and types for device management routes; updated modal routes; introduced new getDeviceModelName utility function.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant UI
  participant BackgroundAPI
  participant Navigator

  User->>UI: Click on Address Book button
  UI->>BackgroundAPI: promptPasswordVerify()
  BackgroundAPI-->>UI: Verification successful
  UI->>Navigator: Push appropriate Address Book Modal
  Navigator-->>UI: Render Address Book view
Loading
sequenceDiagram
  participant User
  participant DeviceMgmtBtn
  participant Navigator
  participant DeviceDetails

  User->>DeviceMgmtBtn: Click Device Management
  DeviceMgmtBtn->>Navigator: Navigate to DeviceManagementModal
  Navigator-->>DeviceDetails: Load Device Details Modal
  DeviceDetails->>DeviceDetails: Fetch and display device info
  DeviceDetails-->>User: Show device management details
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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 or 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@originalix originalix enabled auto-merge (squash) February 13, 2025 08:10
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: 16

🔭 Outside diff range comments (4)
packages/components/src/layouts/Navigation/Tab/TabBar/DesktopLeftSideBar.tsx (4)

46-53: 🧹 Nitpick (assertive)

Optimize icon prefetching.

The icon prefetching logic runs on every render. Move it to a useEffect hook to run only when options change.

-  useMemo(() => {
+  useEffect(() => {
     // @ts-expect-error
     const activeIcon = options?.tabBarIcon?.(true) as IKeyOfIcons;
     // @ts-expect-error
     const inActiveIcon = options?.tabBarIcon?.(false) as IKeyOfIcons;
     // Avoid icon jitter during lazy loading by prefetching icons.
     void Icon.prefetch(activeIcon, inActiveIcon);
-  }, [options]);
+  }, [options?.tabBarIcon]);

56-67: 🧹 Nitpick (assertive)

Add missing ARIA labels for better accessibility.

The tab items need proper ARIA labels for screen readers.

 <DesktopTabItem
   onPress={onPress}
   aria-current={isActive ? 'page' : undefined}
+  aria-label={`${options.tabBarLabel ?? route.name} tab`}
   selected={isActive}
   shortcutKey={options.shortcutKey}
   tabBarStyle={options.tabBarStyle}
   // @ts-expect-error
   icon={options?.tabBarIcon?.(isActive) as IKeyOfIcons}
   label={(options.tabBarLabel ?? route.name) as string}
   actionList={options.actionList}
   testID={route.name.toLowerCase()}
 />

31-73: 🧹 Nitpick (assertive)

Fix TypeScript type assertions.

Replace @ts-expect-error with proper type definitions for the tabBarIcon option.

-    // @ts-expect-error
-    const activeIcon = options?.tabBarIcon?.(true) as IKeyOfIcons;
-    // @ts-expect-error
-    const inActiveIcon = options?.tabBarIcon?.(false) as IKeyOfIcons;
+    const activeIcon = options?.tabBarIcon?.({ focused: true, color: '', size: 0 }) as IKeyOfIcons;
+    const inActiveIcon = options?.tabBarIcon?.({ focused: false, color: '', size: 0 }) as IKeyOfIcons;

104-157: 🧹 Nitpick (assertive)

Optimize tab rendering performance.

Move the tab press handler outside the map function to prevent unnecessary recreations.

+ const createTabPressHandler = useCallback((route: NavigationState['routes'][0], focus: boolean) => () => {
+   const event = navigation.emit({
+     type: 'tabPress',
+     target: route.key,
+     canPreventDefault: true,
+   });
+
+   if (!focus && !event.defaultPrevented) {
+     navigation.dispatch({
+       ...CommonActions.navigate({
+         name: route.name,
+         merge: true,
+       }),
+       target: state.key,
+     });
+   }
+ }, [navigation, state.key]);

  const tabs = useMemo(
    () =>
      routes.map((route, index) => {
        const focus = index === state.index;
        const { options } = descriptors[route.key];
-       const onPress = () => {
-         const event = navigation.emit({
-           type: 'tabPress',
-           target: route.key,
-           canPreventDefault: true,
-         });
-
-         if (!focus && !event.defaultPrevented) {
-           navigation.dispatch({
-             ...CommonActions.navigate({
-               name: route.name,
-               merge: true,
-             }),
-             target: state.key,
-           });
-         }
-       };
+       const onPress = createTabPressHandler(route, focus);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d56305a and e12c966.

⛔ Files ignored due to path filters (20)
  • packages/kit/assets/device-management-guide.png is excluded by !**/*.png
  • packages/shared/src/locale/json/bn.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/de.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/en_US.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/es.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/fr_FR.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/hi_IN.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/id.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/it_IT.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/ja_JP.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/ko_KR.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/pt.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/pt_BR.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/ru.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/th_TH.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/uk_UA.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/vi.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/zh_CN.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/zh_HK.json is excluded by !packages/shared/src/locale/json/*.json
  • packages/shared/src/locale/json/zh_TW.json is excluded by !packages/shared/src/locale/json/*.json
📒 Files selected for processing (24)
  • packages/components/src/layouts/Navigation/Tab/TabBar/DesktopLeftSideBar.tsx (3 hunks)
  • packages/kit-bg/src/services/ServiceAccount/ServiceAccount.ts (2 hunks)
  • packages/kit/src/hooks/useShowAddressBook.ts (1 hunks)
  • packages/kit/src/provider/Container/PortalBodyContainer/SideBanner.tsx (3 hunks)
  • packages/kit/src/routes/Modal/router.tsx (2 hunks)
  • packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/WalletDetails/WalletOptions/DeviceManagementButton.tsx (1 hunks)
  • packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/WalletDetails/WalletOptions/index.tsx (3 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceAdvanceSection.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceBasicInfoSection.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceQrInfoSection.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceSpecsSection.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/index.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceGuideModal/index.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceManagementListModal/index.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/router/index.tsx (1 hunks)
  • packages/kit/src/views/Onboarding/router/index.ts (2 hunks)
  • packages/kit/src/views/Setting/pages/List/DefaultSection/index.tsx (2 hunks)
  • packages/shared/src/locale/enum/translations.ts (2 hunks)
  • packages/shared/src/routes/deviceManagement.ts (1 hunks)
  • packages/shared/src/routes/index.ts (1 hunks)
  • packages/shared/src/routes/modal.ts (3 hunks)
  • packages/shared/src/routes/onboarding.ts (2 hunks)
  • packages/shared/src/utils/deviceUtils.ts (2 hunks)
  • packages/shared/types/account.ts (2 hunks)
🔇 Additional comments (30)
packages/kit/src/provider/Container/PortalBodyContainer/SideBanner.tsx (3)

4-34: Imports look fine.

All added imports appear correct. No obvious issues or redundancies.


103-124: Hide the download button on non-web platforms.

This logic is clear and concise. It matches the environment check. No issues here.


195-199: Structural change to SidebarBanner.

SidebarBanner now renders BottomMenu. The approach is clean and modular.

packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/index.tsx (7)

1-34: Imports and route props.

All imports look correct. The route prop typing is good. No issues.


82-91: Safe usage of navigation.

These callback functions are well-structured. No major concerns.


93-105: Firmware verify flow.

This is a good approach. The try/catch blocks are handled in onPressAuthRequest.


107-113: Firmware update triggers.

Clear call to open the changelog modal. Looks good.


150-180: Conditional rendering.

renderContent checks isLoading and isQrWallet. Good clarity. No issues.


182-203: Page layout and body.

The structure is straightforward. Keep an eye on test coverage for these sections.


206-207: Default export.

Clean export. No problems here.

packages/shared/src/routes/deviceManagement.ts (2)

1-5: New enum for device management routes.

Enums are clear. The naming is good.


7-13: Param list typed well.

Defines route parameters succinctly. No improvements needed.

packages/kit/src/views/DeviceManagement/router/index.tsx (1)

1-34: Well-structured router configuration!

Great use of lazy loading to optimize performance. The code is clean and properly typed.

packages/shared/src/routes/index.ts (1)

39-39: Clean export addition!

The new export maintains alphabetical order and follows the existing pattern.

packages/shared/types/account.ts (1)

50-53: Clean type definition!

The IHwQrWalletWithDevice type is clear and properly handles optional device field.

packages/kit/src/hooks/useShowAddressBook.ts (1)

26-37: LGTM! Good security practice with password verification.

The implementation properly verifies the password before showing sensitive address book data.

packages/shared/src/routes/modal.ts (1)

62-62: LGTM!

The new device management modal route is well-integrated and follows the established patterns.

Also applies to: 96-96

packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceBasicInfoSection.tsx (1)

74-111: LGTM! Well-structured layout

The layout structure using YStack and XStack is clean and maintainable.

packages/kit/src/views/Onboarding/router/index.ts (1)

79-81: LGTM! Clean route integration

The DeviceManagementGuideModal is properly integrated into the routing system, following the established patterns.

Also applies to: 187-190

packages/kit/src/views/DeviceManagement/pages/DeviceManagementListModal/index.tsx (1)

45-53: LGTM! Proper event cleanup

The event listener cleanup in useEffect is well-implemented, preventing memory leaks.

packages/kit/src/views/Setting/pages/List/DefaultSection/index.tsx (1)

44-58: LGTM! Clean hook implementation

The refactoring to use useShowAddressBook simplifies the component and improves maintainability.

packages/components/src/layouts/Navigation/Tab/TabBar/DesktopLeftSideBar.tsx (4)

75-84: LGTM! Good platform-specific rendering.

The OneKeyLogo component correctly handles platform-specific rendering with a clean conditional return.


1-30: LGTM! Clean and focused imports.

The imports are well-organized and include only what's needed.


75-84: LGTM! Clean and focused component.

The OneKeyLogo component is simple and follows best practices.


159-212: LGTM! Clean sidebar implementation.

The simplified sidebar with animation support looks good. The removal of download and settings buttons aligns with the PR objectives.

packages/kit/src/routes/Modal/router.tsx (1)

167-170: LGTM! Clean route integration.

The DeviceManagementModal route is properly integrated following the established pattern.

packages/shared/src/locale/enum/translations.ts (4)

125-126: LGTM! Clear and consistent backup enable keys.

The keys follow the established naming pattern and are properly placed in alphabetical order.


131-132: LGTM! Well-structured Google backup sunsetting keys.

The keys clearly indicate their purpose and include both the main message and its description.


138-139: LGTM! Well-organized iCloud backup sunsetting keys.

The keys maintain consistency with the Google backup keys and follow the same pattern.


1610-1610: LGTM! Clear OneKey ID logout description key.

The key follows the naming convention and is properly placed in the prime section.

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: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e12c966 and 4e1e8f6.

📒 Files selected for processing (7)
  • packages/kit-bg/src/services/ServiceAccount/ServiceAccount.ts (2 hunks)
  • packages/kit/src/views/DeviceManagement/hooks/useBuyOneKeyHeaderRightButton.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceGuideModal/index.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceManagementListModal/index.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/router/index.tsx (1 hunks)
  • packages/kit/src/views/Onboarding/pages/ConnectHardwareWallet/ConnectYourDevice.tsx (2 hunks)
  • packages/shared/src/routes/deviceManagement.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: unittest (20.x)
  • GitHub Check: lint (20.x)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
packages/shared/src/routes/deviceManagement.ts (1)

1-15: Well-structured route definitions!

The route definitions are type-safe and clearly organized. The parameter list properly maps undefined types for modals without params and includes the required walletId for DeviceDetailModal.

packages/kit/src/views/DeviceManagement/router/index.tsx (1)

6-23: Great use of lazy loading!

The lazy loading implementation will improve initial load time and bundle size.

packages/kit/src/views/DeviceManagement/pages/DeviceGuideModal/index.tsx (2)

31-38: Add alt text translation for accessibility.

The image alt text should be translated for international users.

 <Image
   source={require('@onekeyhq/kit/assets/device-management-guide.png')}
-  alt="OneKey devices"
+  alt={intl.formatMessage({
+    id: ETranslations.device_management_guide_alt,
+  })}
   w="100%"
   h={200}
   resizeMode="contain"
 />

58-62: Add loading state to connection button.

The connection process might take time. Show loading state during navigation.

+const [isConnecting, setIsConnecting] = useState(false);
 <Button
   variant="primary"
   size="medium"
-  onPress={handleStartConnect}
+  onPress={async () => {
+    setIsConnecting(true);
+    await handleStartConnect();
+    setIsConnecting(false);
+  }}
+  loading={isConnecting}
 >
   {intl.formatMessage({
     id: ETranslations.global_start_connection,
   })}
 </Button>
packages/kit/src/views/DeviceManagement/pages/DeviceManagementListModal/index.tsx (2)

1-33: Clean and well-organized imports!

The imports are logically grouped and the hooks are properly used.


163-164: Move hardcoded URL to constants.

The URL "https://bit.ly/3YsKilK" should be moved to a constants file.

packages/kit-bg/src/services/ServiceAccount/ServiceAccount.ts (1)

275-303: Add error handling and type safety.

The method needs error handling and stronger type checking.

packages/kit/src/views/Onboarding/pages/ConnectHardwareWallet/ConnectYourDevice.tsx (1)

1185-1186: Clean hook implementation!

The hook destructuring is well-organized and follows React best practices.

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: 3

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e1e8f6 and 2e96487.

⛔ Files ignored due to path filters (1)
  • packages/kit/assets/device-management-guide.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceSpecsSection.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/index.tsx (1 hunks)
  • packages/shared/src/utils/deviceUtils.ts (1 hunks)
🔇 Additional comments (5)
packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/index.tsx (4)

1-33: Overall implementation looks solid.
The structure follows good React patterns. No big issues in the setup and imports.


110-114: Expand the supported device types.
You only check 'classic', 'mini', 'classic1s'. What about touch or pro? This might cause missed logic.


98-98: Remove debug logging in production.
That console.log(checked); may clutter real logs.


1-203: No major blockers found.
Everything else looks clean and follows consistent patterns.

packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceSpecsSection.tsx (1)

1-76: Good data handling.
Graceful fallback to defaults prevents crashes if features are missing.

@originalix originalix merged commit d24e44e into x Feb 13, 2025
8 checks passed
@originalix originalix deleted the feat/device-management branch February 13, 2025 10:22
Copy link

sentry-io bot commented Feb 18, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: y.A[e] is not a function /earn View Issue

Did you find this useful? React with a 👍 or 👎

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.

3 participants