Skip to content

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
stablefrom
backport/pr-5517-to-stable
Closed

github-actions[bot] wants to merge 1 commit into
stablefrom
backport/pr-5517-to-stable

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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, and serializeForClipboard on stable has the same bug because it calls JSON.stringify with no replacer. On stable, the helper isn't exported and test/copyable-data-block.test.ts doesn'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.

… 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>
@github-actions
github-actions Bot requested review from a team and ijjk as code owners November 18, 2026 00:24
@changeset-bot

changeset-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d385e43

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/web-shared Patch
@workflow/web Patch
@workflow/cli Patch
@workflow/nitro Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/vitest Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch

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

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
example-nextjs-workflow-turbopack Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
example-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-astro-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-express-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-fastify-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-hono-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-nitro-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-python-workflow Error Error v0 Nov 18, 2026 12:28am UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workbench-vite-workflow Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workflow-docs Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workflow-swc-playground Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workflow-tarballs Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC
workflow-web Ready Ready Preview, v0 Nov 18, 2026 12:28am UTC

This branch was successfully deployed

1 active deployment
Preview – workflow-docs — d385e43c Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant