Skip to content

fix(json-format): render large JSON after result state is ready - #671

Closed
Souvenirser wants to merge 2 commits into
zxlie:masterfrom
Souvenirser:lili02/fix-large-json-render
Closed

Souvenirser wants to merge 2 commits into
zxlie:masterfrom
Souvenirser:lili02/fix-large-json-render

Conversation

@Souvenirser

Copy link
Copy Markdown

Large valid JSON could leave the result pane blank because the page called Formatter before enabling result actions. The large JSON text view renders synchronously and was rejected by the existing rendering guard. Initialize the successful result state before formatting, and clear and hide the previous text view when showing a placeholder or error.

Validation:

  • 270 tests pass, including seven page-rendering regression cases.
  • Chrome extension build succeeds.
  • The original 1.55 MB sample displays all 2,796,387 formatted characters in the built page; parsed values and the final data match the original. Clearing the input and returning to small JSON work.
  • ESLint diagnostics match the existing baseline: 10 errors and 21 warnings, with none added.
  • Installed Chrome extension behavior and clipboard/download completeness still need verification; browser control and in-app browser interfaces prevented those checks.

No dependency changes or original sample data are included.

Exercise the real page and Formatter with long text, node-budget input, small JSON, view transitions, invalid input and auto-decode. Preserve the synchronous boolean return contract.
@Souvenirser
Souvenirser marked this pull request as draft October 15, 2026 03:20
@Souvenirser
Souvenirser deleted the lili02/fix-large-json-render branch October 15, 2026 06:15
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