fix(kimi-code): bump native clipboard dependency to fix Linux startup crash - #1075
Merged
Conversation
🦋 Changeset detectedLatest commit: df9c1c7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
❌ Nix build failed Hash mismatch in
Please update |
commit: |
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.
Related Issue
N/A — reported internally by a user.
Problem
On Linux X11, opening Kimi Code and typing a character before the UI is fully initialized aborts the whole process. The native clipboard binding (
@mariozechner/clipboard@0.3.2) uses.unwrap()on X11 clipboard operations; when the X11 display is not ready yet,available_formats()panics across the napi-rs FFI boundary, which aborts the Node process. JStry/catchcannot catch a Rust panic, so the existing guard insafeAvailableFormatswas ineffective.The crash fires through the clipboard image hint controller: a focus-in event during startup triggers
clipboardHasImage(), which falls back to the native binding on X11 whenxclipis unavailable, hitting the panic.What changed
Bump
@mariozechner/clipboardfrom0.3.2to0.3.9. Starting with0.3.3, the binding returnsnapi::Resultfrom every function instead of unwrapping, so clipboard errors surface as catchable JS exceptions rather than aborting the process.0.3.9also vendors the clipboard implementation and upgrades napi-rs to 3.x; the public JS API and platform package names are unchanged, so no other code needs to change.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.