Skip to content

preserve large numeric job args - #594

Merged
bgentry merged 1 commit into
masterfrom
bg/fix-job-args-precision
Aug 1, 2026
Merged

preserve large numeric job args#594
bgentry merged 1 commit into
masterfrom
bg/fix-job-args-precision

Conversation

@bgentry

@bgentry bgentry commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Job args can contain database identifiers larger than JavaScript's safe integer range. Returning args as nested JSON lets browser parsing round those literals before the list and detail pages render or copy them.

This changes job-shaped API responses to return args as JSON text and maps the value to argsRaw in the frontend. A bounded lossless parser preserves numeric tokens while recursively sorting object keys for display and copied output.

Job and workflow details retain the existing collapsible structured viewer, list formatting is skipped when args are hidden, and malformed or pathologically nested payloads fall back to literal text.

Closes #593.

@bgentry bgentry changed the title [codex] preserve large numeric job args preserve large numeric job args Jun 12, 2026
@brandur

brandur commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

@bgentry Hey do you know if this one's still necessary/desirable?

@bgentry
bgentry force-pushed the bg/fix-job-args-precision branch 2 times, most recently from a2ae51b to d8226e6 Compare August 1, 2026 00:21
Job args can contain database identifiers that exceed JavaScript's safe
integer range. Returning args as nested JSON lets `response.json()` round
numeric literals before River UI renders or copies them.

Return args as JSON text from the standard and Pro serializers and map the
field to `argsRaw` in the frontend. Parse the text into a lossless view model
that preserves numeric tokens, sorts object keys, keeps collapsible detail
views, and bounds work for pathological payloads. Skip formatting list args
when they are hidden.

Cover the wire contract, browser fetch mapping, JSON grammar and safety
limits, sorted display and copy behavior, and list/detail rendering.

Closes #593
@bgentry
bgentry force-pushed the bg/fix-job-args-precision branch from d8226e6 to 7058dc5 Compare August 1, 2026 00:36
@bgentry
bgentry marked this pull request as ready for review August 1, 2026 02:16
@bgentry

bgentry commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Yes still relevant, should be about ready for review.

@bgentry
bgentry requested a review from brandur August 1, 2026 03:21

@brandur brandur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, WFM!

@bgentry
bgentry merged commit cc95f7f into master Aug 1, 2026
21 checks passed
@bgentry
bgentry deleted the bg/fix-job-args-precision branch August 1, 2026 15:09
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.

Bug: Frontend changing values before displaying to the user

2 participants