feat: add CKB dependency check and dialog for Visual C++ Redistributable#3498
Open
chenyukang wants to merge 1 commit into
Open
feat: add CKB dependency check and dialog for Visual C++ Redistributable#3498chenyukang wants to merge 1 commit into
chenyukang wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves Windows handling for starting the bundled CKB node when the Microsoft Visual C++ Redistributable (x64) is missing or below the required minimum, by adding version-aware preflight checks and runtime stderr detection that triggers the existing dependency dialog.
Changes:
- Add registry output parsing + numeric version comparison and enforce
MINIMUM_REDIST_VERSIONduring the Windows preflight check. - Introduce a shared “CKB dependency” dialog utility and wire runtime detection (stderr) via a new RxJS subject to show the dialog.
- Add/extend unit tests for version parsing/comparison and for triggering the dependency dialog flows; update i18n copy to mention “missing or too old”.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/neuron-wallet/src/utils/redist-check.ts | Replace “registry key exists” check with version-aware support check and export helper utilities/constants. |
| packages/neuron-wallet/tests/utils/redist-check/index.test.ts | Add unit tests for version parsing/comparison and expand win32/not-win32 behavior coverage. |
| packages/neuron-wallet/src/utils/ckb-dependency-dialog.ts | Extract dependency dialog + URL opening + quit behavior into a shared utility. |
| packages/neuron-wallet/src/services/node.ts | Reuse the extracted dependency dialog utility instead of inlining the Electron dialog logic. |
| packages/neuron-wallet/src/models/subjects/ckb-dependency.ts | Add a new subject to notify the app when CKB reports a dependency problem at runtime. |
| packages/neuron-wallet/src/services/ckb-runner.ts | Detect VC++ redistributable version errors from bundled CKB stderr and notify via the new subject. |
| packages/neuron-wallet/src/controllers/app/subscribe.ts | Subscribe to the new dependency subject to stop monitoring and show the dependency dialog once. |
| packages/neuron-wallet/tests/services/node.test.ts | Add a test ensuring the dependency dialog is shown and node startup is skipped when preflight fails. |
| packages/neuron-wallet/tests/services/ckb-runner.test.ts | Add tests for VC++ error detection and subject notification from stderr. |
| packages/neuron-wallet/src/locales/en.ts | Update dependency dialog copy to mention missing/outdated runtimes. |
| packages/neuron-wallet/src/locales/zh.ts | Update dependency dialog copy to mention missing/outdated runtimes (Chinese). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+21
| const setPlatform = (platform: string) => { | ||
| Object.defineProperty(process, 'platform', { | ||
| value: platform, | ||
| }) | ||
| } |
Comment on lines
+140
to
+145
| try { | ||
| stopMonitor('ckb') | ||
| await showCkbDependencyDialog() | ||
| } finally { | ||
| isShowingCkbDependencyDialog = false | ||
| } |
Comment on lines
+35
to
+37
| export const isVcredistVersionError = (message: string) => { | ||
| return /(?:VC\+\+|Visual C\+\+) Redistributable/i.test(message) && /Version is below|download\/upgrade/i.test(message) | ||
| } |
eval-exec
approved these changes
Jul 7, 2026
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
Fix bundled CKB startup handling when Microsoft Visual C++ Redistributable is missing or outdated on Windows.
Changes
14.44.0.0or newer.