Repository navigation
Backport #5517: [web-shared] Copy BigInt values as decimal strings instead of [object Object] - #5571
Closed
github-actions[bot] wants to merge 1 commit into
Closed
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
… Object] (#5517) Copying a step input/output/event payload that contains a BigInt below the top level put `[object Object]` (or `1,2` for arrays) on the clipboard. `serializeForClipboard` called `JSON.stringify(value, null, 2)` with no replacer, so any nested BigInt threw and the catch fell back to `String(value)`. I added a replacer that writes BigInt as a decimal string, the same as the CLI's `stringifyJSON`. A top-level BigInt still copies as the bare number (`10`), as before. Circular objects keep the existing `[object Object]` fallback. I left `formatMetadataValue` in `attributes-block.tsx` alone to keep this small. Fixes #5511 Thanks @abhiramshaji-cyber for the clear report and repro. Signed-off-by: debojyoti10CC <debojyotidm4@gmail.com> Co-authored-by: Peter Wielander <mittgfu@gmail.com> Signed-off-by: Debojyoti De Majumder <debojyotidm4@gmail.com>
🦋 Changeset detectedLatest commit: d385e43 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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
2 of 3 tasks
This branch was successfully deployed
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.
Automated backport of #5517 to
stable(backport job run).AI recommendation: This is a small bug fix. The copy button puts
[object Object]on the clipboard when a payload contains a nested BigInt, andserializeForClipboardonstablehas the same bug because it callsJSON.stringifywith no replacer. Onstable, the helper isn't exported andtest/copyable-data-block.test.tsdoesn't exist, so the backport needs the fix applied by hand, either with the test adapted or without it.Merge conflicts were resolved by AI (opencode with
anthropic/claude-opus-5.5). Please review the conflict resolution carefully before merging.