GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — fix(desktop): omit undefined fields from renderer IPC payloads by Hona · Pull Request #50599 · anomalyco/opencode Conversation
Member
Closes #50583, closes #50153, closes #50503, closes #50177, closes #50173, closes #50309 The composer's attach button, the folder picker, save dialogs and Why#50112 made the renderer post RPC payloads over the flowchart LR
A["files.ts<br/>{ title: options?.title }<br/>→ title: undefined"] --> B["ipc-client.ts<br/>port.postMessage(raw)"]
B --> C["ipc-transport.ts<br/>codecFor: toCodecJson"]
C -- "Expected string | null<br/>at ["options"]["title"]" --> D["Cause.Die"]
D --> E["toast: Desktop IPC handler failed<br/>(cause never shown)"]
style D fill:#ff5c7a,color:#000
Before #50112, Change
// renderer → main, before { options: { multiple: true, title: undefined, defaultPath: "C:\\proj", extensions: undefined } } // after { options: { multiple: true, defaultPath: "C:\\proj" } } The transport test drives the real Affected requests
Drag & drop and clipboard paste bypass these RPCs, which is why they kept working.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSince anomalyco#50112 the renderer posts RPC payloads over the MessagePort by structured clone, without RpcClient's schema encoding. The main process still decodes with the JSON codec, where an optional field is 'key absent | value | null'. A present key holding undefined, which is what the composer sends for the picker title and extensions, is rejected before the handler runs and surfaces to the user as 'Desktop IPC handler failed'. Drop undefined properties at the renderer request boundary the way JSON.stringify would, leaving Uint8Array payloads untouched. Closes anomalyco#50583, closes anomalyco#50153, closes anomalyco#50503, closes anomalyco#50177, closes anomalyco#50173, closes anomalyco#50309
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
This was referenced
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |