-
Notifications
You must be signed in to change notification settings - Fork 439
feat: enhance spell checker with additional skip words #8656
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
base: x
Are you sure you want to change the base?
Conversation
- 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.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
WalkthroughBroad 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
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)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this 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.TabMarkettarget. 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.
📒 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. Removingactis safe here. Hooks cover every usage. Clean cut.packages/kit/src/views/Discovery/components/MobileTabListItem/MobileTabListPinnedItem.tsx (1)
1-1: Import list looks tidy. DroppingSkeletonmatches actual usage. Nice polish.packages/components/src/composite/SegmentSlider/index.tsx (1)
1-1: Unused hook removed.useStateisn’t referenced, so this cleanup keeps the bundle lean.packages/kit/src/views/DeviceManagement/pages/DeviceDetailsModal/DeviceBasicInfoSection.tsx (1)
1-1: Good import pruning.useMemois 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.useMemowasn’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. DroppingSkeletonaligns with the component usage. Looks neat.packages/kit/src/views/Perp/components/OrderInfoPanel/Components/PositionsRow.tsx (1)
47-47: Incorrect review comment
This file importsAssetPosition—there’s noFrontendOrderhere 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 touseCallbackornoopremain in this file.
22-22: Direct atom usage is valid.Switching to
perpsTradesHistoryRefreshHookAtom.set()correctly triggers updates in subscribers usingusePerpsTradesHistoryRefreshHookAtom().
packages/kit/src/views/Perp/components/OrderInfoPanel/Components/PositionsRow.tsx
Show resolved
Hide resolved
There was a problem hiding this 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.
📒 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.
831576c
There was a problem hiding this 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.
📒 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
ETabMarketRoutesimport.
packages/kit/src/views/Perp/components/OrderInfoPanel/PerpOrderInfoPanel.tsx
Show resolved
Hide resolved
|
有冲突哦 |
There was a problem hiding this 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.
📒 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
useStateimport 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.
Summary by CodeRabbit