fix: backport device capability tiers for v6.5.0#12475
Merged
originalix merged 8 commits intoJul 17, 2026
Merged
Conversation
huhuanming
requested review from
ezailWang,
originalix,
revan-zhang and
sidmorizon
as code owners
July 13, 2026 16:43
originalix
reviewed
Jul 13, 2026
huhuanming
enabled auto-merge (squash)
July 14, 2026 14:33
originalix
reviewed
Jul 16, 2026
originalix
approved these changes
Jul 16, 2026
originalix
disabled auto-merge
July 17, 2026 02:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release/v6.5.0.navigator.hardwareConcurrencyandnavigator.deviceMemorywhen available.Intent & Context
PR #12454 targets
xand includes changes underapps/desktop/app/libs, which cannot be delivered through therelease/v6.5.0hot-update path. This PR carries the JS capability classification and preload policy to the release branch without requiring a new Desktop binary.Root Cause
The exact Desktop capability implementation in PR #12454 depends on Electron main/preload bridge changes. Those source changes are outside the hot-update bundle, so merging them into the release hot-update PR would create a native/binary dependency that the installed v6.5.0 Desktop application does not have.
Design Decisions
apps/desktop/**change, Desktop-specific capability override, and Desktop API type change from the backport..desktop→.web→ generic) so the generic browser implementation is selected when no capability.desktop.tsfile exists.mainandbghave separate JS heaps and initialize independently; the Tab preload policy is consumed bymainonly.Changes Detail
Risk Assessment
Test plan
yarn jest packages/kit/src/routes/Tab/preloadPolicy.native.test.ts packages/kit/src/routes/Tab/preloadPolicy.test.ts packages/kit/src/routes/Tab/preloadPolicyResolver.test.ts packages/shared/src/performance/deviceCpuTierData.test.ts packages/shared/src/performance/deviceCpuTierUtils.test.ts packages/shared/src/performance/devicePerformanceTier.native.test.ts packages/shared/src/performance/devicePerformanceTier.test.ts packages/shared/src/performance/devicePerformanceTierResolver.test.ts --runInBand(8 suites, 49 tests)yarn app:web:buildyarn app:ext:buildyarn workspace @onekeyhq/desktop build:rendereryarn agent:check --profile commitapps/desktop/**, capability.desktop.ts, or Desktop API contract changes