Skip to content

Conversation

@limichange
Copy link
Contributor

@limichange limichange commented Oct 11, 2025

  • Added a comprehensive list of new skip words related to Crypto, Finance, UI, System, and Blockchain to improve spell checking accuracy.
  • Removed unused imports and optimized component imports across various files for better performance and cleaner code.

Summary by CodeRabbit

  • Chores
    • Expanded spell checker skip words list to support additional tokens across crypto, finance, UI, blockchain, and platform categories
    • Removed unused dependencies and simplified internal imports across multiple components

- Added a comprehensive list of new skip words related to Crypto, Finance, UI, System, and Blockchain to improve spell checking accuracy.
- Removed unused imports and optimized component imports across various files for better performance and cleaner code.
@revan-zhang
Copy link
Contributor

revan-zhang commented Oct 11, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 11, 2025

Walkthrough

Broad cleanup pass removing unused imports across 30+ files, including React hooks, UI components, and shared utilities. Added crypto/finance tokens to spell checker skip words. Simplified tab route navigation by removing nested screen parameters.

Changes

Cohort / File(s) Summary
Spell Checker Data
development/spellCheckerSkipWords.js
Expanded skip words array with crypto, finance, UI, blockchain, and Solana-related tokens
React Hook Removals
packages/kit/src/components/Password/container/PasswordVerifyPromptMount.tsx, packages/kit/src/components/TabPageHeader/HeaderLeft.tsx, packages/kit/src/components/AddressInput/plugins/clipboard.tsx, packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceBasicInfoSection.tsx, packages/kit/src/views/Setting/pages/Tab/SearchView.tsx, packages/kit/src/views/Market/MarketDetailV2/components/SwapPanel/SwapPanelWrap.tsx
Removed unused imports: useState, useRef, useMemo, useCallback, act from React
Component Import Cleanups
packages/kit/src/views/Developer/pages/Gallery/Components/stories/Image.tsx, packages/kit/src/views/Discovery/components/ChunkedItem/index.tsx, packages/kit/src/views/Discovery/components/DappInfoPopoverContent/index.tsx, packages/kit/src/views/Discovery/components/MobileTabListItem/MobileTabListPinnedItem.tsx, packages/kit/src/views/Discovery/components/MobileTabListItem/index.tsx, packages/kit/src/views/Market/MarketHomeV2/components/MarketFilterBarSmall/MarketFilterBarSmall.tsx, packages/kit/src/views/Market/components/MarketDetailPools.tsx, packages/kit/src/views/Perp/components/TradingPanel/inputs/TpSlFormInput.tsx, packages/kit/src/composite/SegmentSlider/index.tsx
Removed unused imports: Skeleton, Dialog, Stack, YStack from @onekeyhq/components
Platform & Shared Utilities
packages/kit/src/components/AddressInput/plugins/clipboard.tsx, packages/kit/src/views/Developer/pages/Gallery/Components/stories/NavigatorRoute/Tab/View/DemoRootHomeSearch.tsx
Removed unused platformEnv imports from @onekeyhq/shared/src/platformEnv
SDK & Atom Removals
packages/kit-bg/src/providers/ProviderApiAptos.ts, packages/kit/src/hooks/useVersionCompatible.tsx, packages/kit/src/hooks/useWebDapp/useWalletConnection.tsx, packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/index.tsx, packages/kit/src/views/Perp/components/TradingGuardWrapper.tsx
Removed: MultiAgentTransaction & AccountAddress from @aptos-labs/ts-sdk, SizableText, useOnboardingConnectWalletLoadingAtom, useEffect/useState, lodash/noop & perps hooks
Type Import Adjustments
packages/kit/src/views/Perp/components/OrderInfoPanel/Components/PositionsRow.tsx, packages/kit/src/views/Market/hooks/useMarketBasicConfig/utils.ts, packages/kit/src/views/Perp/components/OrderInfoPanel/AdjustPositionMarginModal.tsx
Narrowed type imports: kept AssetPosition only, replaced multi-type import with IMarketBasicConfigData, removed INumberFormatProps
Route Navigation Simplification
packages/kit/src/routes/Tab/router.ts
Removed ETabMarketRoutes import and nested screen parameter in Market tab navigation; now targets ETabRoutes.Market directly
Browser & Page Imports
packages/kit/src/views/Discovery/pages/Browser/Browser.desktop.tsx, packages/kit/src/views/Onboarding/components/hooks.ts
Removed unused useRef, useAppNavigation, ETabRoutes, and InteractionManager imports
New Imports & Additions
packages/kit/src/views/Home/components/WalletActions/index.tsx, packages/kit/src/views/Perp/components/OrderInfoPanel/PerpOrderInfoPanel.tsx
Added EModalSwapRoutes; added perpsTradesHistoryRefreshHookAtom, EModalRoutes, IModalPerpParamList, EModalPerpRoutes

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

The bulk of changes are homogeneous import removals following a consistent pattern across multiple files. While the volume spans 30+ files, each change is straightforward to verify. The route simplification and new imports are minimal. High repetition lowers review complexity despite file count.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat: enhance spell checker with additional skip words" directly reflects the primary change in the pull request: expanding the spell checker skip words list with new tokens across Crypto & Finance, UI & React, System & Platform, and other categories in development/spellCheckerSkipWords.js. The title is concise, clear, and specific enough to convey the main purpose when reviewing git history. While the PR also includes cleanup work removing unused imports across multiple files, these are secondary to the core objective of enhancing spell checker coverage. The title appropriately prioritizes the primary change without unnecessary details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch daily-clean-25

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/kit/src/routes/Tab/router.ts (1)

136-147: Restore the nested Market route navigation.

We lost the nested ETabMarketRoutes.TabMarket target. When the Market tab is already focused, this dispatch now does nothing, so the stack stays on the last detail screen instead of returning home. Bring back the nested route param so repeated presses still reset the Market stack.

Apply this diff:

-import { ETabRoutes } from '@onekeyhq/shared/src/routes';
+import { ETabRoutes, ETabMarketRoutes } from '@onekeyhq/shared/src/routes';
@@
         navigation.dispatch(
           CommonActions.navigate({
             name: ETabRoutes.Market,
+            params: { screen: ETabMarketRoutes.TabMarket },
           }),
         );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 19b702a and b781fa6.

📒 Files selected for processing (35)
  • development/spellCheckerSkipWords.js (1 hunks)
  • packages/components/src/composite/SegmentSlider/index.tsx (1 hunks)
  • packages/kit-bg/src/providers/ProviderApiAptos.ts (0 hunks)
  • packages/kit/src/components/AddressInput/plugins/clipboard.tsx (0 hunks)
  • packages/kit/src/components/NetworksFilterItem/index.tsx (1 hunks)
  • packages/kit/src/components/Password/container/PasswordVerifyPromptMount.tsx (1 hunks)
  • packages/kit/src/components/TabPageHeader/HeaderLeft.tsx (0 hunks)
  • packages/kit/src/hooks/useVersionCompatible.tsx (1 hunks)
  • packages/kit/src/hooks/useWebDapp/useWalletConnection.tsx (0 hunks)
  • packages/kit/src/provider/Bootstrap.tsx (0 hunks)
  • packages/kit/src/provider/index.tsx (0 hunks)
  • packages/kit/src/routes/Tab/router.ts (1 hunks)
  • packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/WalletDetails/hooks/useAddAccount.ts (0 hunks)
  • packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/index.tsx (0 hunks)
  • packages/kit/src/views/Developer/pages/Gallery/Components/stories/Image.tsx (1 hunks)
  • packages/kit/src/views/Developer/pages/Gallery/Components/stories/NavigatorRoute/Tab/View/DemoRootHomeSearch.tsx (0 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceBasicInfoSection.tsx (1 hunks)
  • packages/kit/src/views/Discovery/components/ChunkedItem/index.tsx (0 hunks)
  • packages/kit/src/views/Discovery/components/DappInfoPopoverContent/index.tsx (0 hunks)
  • packages/kit/src/views/Discovery/components/MobileTabListItem/MobileTabListPinnedItem.tsx (1 hunks)
  • packages/kit/src/views/Discovery/components/MobileTabListItem/index.tsx (0 hunks)
  • packages/kit/src/views/Discovery/pages/Browser/Browser.desktop.tsx (1 hunks)
  • packages/kit/src/views/Home/components/WalletActions/index.tsx (0 hunks)
  • packages/kit/src/views/Market/MarketDetailV2/components/SwapPanel/SwapPanelWrap.tsx (1 hunks)
  • packages/kit/src/views/Market/MarketHomeV2/components/MarketFilterBarSmall/MarketFilterBarSmall.tsx (0 hunks)
  • packages/kit/src/views/Market/components/MarketDetailPools.tsx (0 hunks)
  • packages/kit/src/views/Market/hooks/useMarketBasicConfig/utils.ts (1 hunks)
  • packages/kit/src/views/Onboarding/components/hooks.ts (0 hunks)
  • packages/kit/src/views/Perp/components/OrderInfoPanel/AdjustPositionMarginModal.tsx (0 hunks)
  • packages/kit/src/views/Perp/components/OrderInfoPanel/Components/PositionsRow.tsx (1 hunks)
  • packages/kit/src/views/Perp/components/OrderInfoPanel/PerpOrderInfoPanel.tsx (2 hunks)
  • packages/kit/src/views/Perp/components/TokenSelector/PerpTokenSelector.tsx (0 hunks)
  • packages/kit/src/views/Perp/components/TradingGuardWrapper.tsx (0 hunks)
  • packages/kit/src/views/Perp/components/TradingPanel/inputs/TpSlFormInput.tsx (0 hunks)
  • packages/kit/src/views/Setting/pages/Tab/SearchView.tsx (1 hunks)
💤 Files with no reviewable changes (20)
  • packages/kit-bg/src/providers/ProviderApiAptos.ts
  • packages/kit/src/provider/index.tsx
  • packages/kit/src/views/Onboarding/components/hooks.ts
  • packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/index.tsx
  • packages/kit/src/views/Discovery/components/ChunkedItem/index.tsx
  • packages/kit/src/components/AddressInput/plugins/clipboard.tsx
  • packages/kit/src/views/Home/components/WalletActions/index.tsx
  • packages/kit/src/views/Perp/components/TradingGuardWrapper.tsx
  • packages/kit/src/views/Perp/components/TradingPanel/inputs/TpSlFormInput.tsx
  • packages/kit/src/views/Market/MarketHomeV2/components/MarketFilterBarSmall/MarketFilterBarSmall.tsx
  • packages/kit/src/provider/Bootstrap.tsx
  • packages/kit/src/components/TabPageHeader/HeaderLeft.tsx
  • packages/kit/src/views/Perp/components/OrderInfoPanel/AdjustPositionMarginModal.tsx
  • packages/kit/src/views/Perp/components/TokenSelector/PerpTokenSelector.tsx
  • packages/kit/src/views/Discovery/components/DappInfoPopoverContent/index.tsx
  • packages/kit/src/views/Discovery/components/MobileTabListItem/index.tsx
  • packages/kit/src/views/Developer/pages/Gallery/Components/stories/NavigatorRoute/Tab/View/DemoRootHomeSearch.tsx
  • packages/kit/src/hooks/useWebDapp/useWalletConnection.tsx
  • packages/kit/src/views/Market/components/MarketDetailPools.tsx
  • packages/kit/src/views/AccountManagerStacks/pages/AccountSelectorStack/WalletDetails/hooks/useAddAccount.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: lint (20.x)
  • GitHub Check: unittest (20.x)
  • GitHub Check: Analyze (java-kotlin)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (9)
packages/kit/src/views/Market/MarketDetailV2/components/SwapPanel/SwapPanelWrap.tsx (1)

1-1: Imports trimmed correctly. Removing act is safe here. Hooks cover every usage. Clean cut.

packages/kit/src/views/Discovery/components/MobileTabListItem/MobileTabListPinnedItem.tsx (1)

1-1: Import list looks tidy. Dropping Skeleton matches actual usage. Nice polish.

packages/components/src/composite/SegmentSlider/index.tsx (1)

1-1: Unused hook removed. useState isn’t referenced, so this cleanup keeps the bundle lean.

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

1-1: Good import pruning. useMemo is the only hook in play, so the slimmer import is spot on.

packages/kit/src/views/Setting/pages/Tab/SearchView.tsx (1)

1-1: Correct import cleanup. useMemo wasn’t used, so this keeps things sharp.

packages/kit/src/views/Developer/pages/Gallery/Components/stories/Image.tsx (1)

4-4: Barrel import trimmed nicely. Dropping Skeleton aligns with the component usage. Looks neat.

packages/kit/src/views/Perp/components/OrderInfoPanel/Components/PositionsRow.tsx (1)

47-47: Incorrect review comment
This file imports AssetPosition—there’s no FrontendOrder here or removal of that type. No action needed.

Likely an incorrect or invalid review comment.

packages/kit/src/views/Perp/components/OrderInfoPanel/PerpOrderInfoPanel.tsx (2)

1-1: Approve removal of unused imports No references to useCallback or noop remain in this file.


22-22: Direct atom usage is valid.

Switching to perpsTradesHistoryRefreshHookAtom.set() correctly triggers updates in subscribers using usePerpsTradesHistoryRefreshHookAtom().

@limichange limichange added the ai Changes made by AI assistants label Oct 13, 2025
originalix
originalix previously approved these changes Oct 13, 2025
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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b781fa6 and 8ebb807.

📒 Files selected for processing (1)
  • development/spellCheckerSkipWords.js (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: unittest (20.x)
  • GitHub Check: lint (20.x)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
development/spellCheckerSkipWords.js (6)

1008-1017: LGTM!

All UI & React terms are valid and commonly used.


1018-1027: LGTM!

System & platform terms are appropriate and correctly spelled.


1028-1029: LGTM!

OneKey identifier is valid.


1030-1031: LGTM!

Blockchain chain ID is correctly formatted.


1032-1033: LGTM!

Solana term is valid.


1034-1037: LGTM!

Miscellaneous terms are valid and commonly used.

sidmorizon
sidmorizon previously approved these changes Oct 16, 2025
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: 4

♻️ Duplicate comments (1)
development/spellCheckerSkipWords.js (1)

994-995: Remove duplicate entry.

'Bech32' at line 995 duplicates the existing entry at line 124.

Apply this diff:

  // Crypto & Finance
- 'Bech32',
  'cryptocurrency',
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 8ebb807 and 831576c.

📒 Files selected for processing (6)
  • development/spellCheckerSkipWords.js (1 hunks)
  • packages/kit/src/routes/Tab/router.ts (1 hunks)
  • packages/kit/src/views/Home/components/WalletActions/index.tsx (1 hunks)
  • packages/kit/src/views/Perp/components/OrderInfoPanel/AdjustPositionMarginModal.tsx (0 hunks)
  • packages/kit/src/views/Perp/components/OrderInfoPanel/PerpOrderInfoPanel.tsx (1 hunks)
  • packages/kit/src/views/Perp/components/TokenSelector/PerpTokenSelector.tsx (0 hunks)
💤 Files with no reviewable changes (2)
  • packages/kit/src/views/Perp/components/OrderInfoPanel/AdjustPositionMarginModal.tsx
  • packages/kit/src/views/Perp/components/TokenSelector/PerpTokenSelector.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: unittest (20.x)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: lint (20.x)
🔇 Additional comments (1)
packages/kit/src/routes/Tab/router.ts (1)

146-149: LGTM!

The navigation simplification removes the nested screen parameter and navigates directly to the Market tab. This improves readability and aligns with the cleanup of the unused ETabMarketRoutes import.

huhuanming
huhuanming previously approved these changes Oct 16, 2025
@originalix
Copy link
Collaborator

有冲突哦

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

♻️ Duplicate comments (1)
development/spellCheckerSkipWords.js (1)

996-996: Remove duplicates flagged in previous reviews.

'Bech32' at line 996 duplicates line 125. 'minmov' at line 1004 duplicates line 27. These were already flagged in earlier review rounds.

Also applies to: 1004-1004

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1204211 and c38ff1d.

📒 Files selected for processing (3)
  • development/spellCheckerSkipWords.js (1 hunks)
  • packages/kit/src/components/TabPageHeader/HeaderLeft.tsx (1 hunks)
  • packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceBasicInfoSection.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: unittest (20.x)
  • GitHub Check: lint (20.x)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (2)
packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceBasicInfoSection.tsx (1)

1-14: Import cleanup looks good—all imports are actively used.

The removal of the unused useState import aligns with the PR's cleanup objectives. Verified that all remaining imports (useMemo, useIntl, component types, utilities, and hooks) are used throughout the file. No dead imports remain.

development/spellCheckerSkipWords.js (1)

995-1040: Good categorization, clean additions.

The new skip words are well-organized and relevant for crypto/blockchain/UI domains. Once you resolve the duplicates, this looks solid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Changes made by AI assistants

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants