I3eka opened a new pull request, #44486: URL: https://github.com/apache/superset/pull/44486
### SUMMARY Render Native AI tool results as readable, indented JSON instead of escaped Unicode. Russian dashboard/chart names currently appear as `\u0434...` in the assistant's expandable tool log. **Review scope: one focused commit, eight files.** [Fix, regression tests and documentation](https://github.com/I3eka/superset/commit/2e99224cf2fe3f866c7e32a9786db756e2f1f780). **Dependency: #42805; do not merge before it.** This draft is based on its head `0e4a15cca1c5be2b7e68d609a9062f5e51193024`. GitHub's full diff against master includes the unmerged parent AI implementation. Those inherited files are not additional changes in this fix. @rusackas @villebro the linked commit isolates the requested review scope; the parent dependency and SIP hold remain respected. - Serialize shared tool payloads with readable Unicode, preserving UTF-8 byte limits and safely escaping lone surrogates. - Pretty-print complete recorded JSON with the existing `json-bigint` dependency so large identifiers are not rounded. - If a persisted result was clipped mid-JSON, display its existing bounded structured summary. Keep plain non-JSON output unchanged. - Render as React text in the existing preformatted block; keep the output cap and model-facing untrusted-content framing. No new dependency, API, migration, feedback handling, unrelated lifecycle fix, or deployment configuration is included. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Synthetic example (no private dashboard data): Before: `{"title": "\u041e\u0442\u0447\u0451\u0442"}` After: ```json { "title": "Отчёт" } ``` For a legacy clipped result, the readable structured summary is shown instead of attempting to parse incomplete JSON. The rendered-component regression also checks that HTML-like strings remain text. ### TESTING INSTRUCTIONS - Backend AI unit suite against the parent branch's pinned dependencies and isolated SQLite: **698 passed**. - Frontend `AiAssistantPanel.test.tsx` and `hooks/chatRequest.test.ts`: **48 passed**. Tests cover complete and clipped results, Russian, emoji, nesting, large integer precision, literal non-JSON text, and the actual expanded tool-result component. - Regression failures reproduced before the fix for escaped Russian in the formatter and rendered component. UTF-8 surrogate and large-integer edge cases were also reproduced before their safeguards. - Changed-file mypy, Ruff, pylint, oxlint, custom rules, stylelint and formatting pass. Frontend typechecking reports the same five errors outside the changed files on both the patched and unpatched parent with the same local dependencies. - The broader AI frontend suite has an independently reproduced parent-branch failure in `ChatTabsMenu`'s Escape-renaming test. That separate fix is not included here. - Required full-repository pre-commit was run in a disposable worktree; unrelated baseline formatting/lint/type failures and unavailable docs yarn/helm-docs prevent a full green result. No unrelated auto-fixes are included. The local frontend harness uses an isolated `ts-jest` preset and a transform allowlist for the installed ESM `content-disposition`; the product test configuration is unchanged. These are unit/component checks, not a claim of passing upstream CI. Manual check with `AI_ASSISTANT` enabled: ask for a dashboard whose title or chart names contain non-ASCII text, expand its completed tool call, and verify readable indented text. Reopen a saved conversation with an older escaped/clipped result and verify its available summary is readable too. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Required feature flags: `AI_ASSISTANT` - [x] Changes UI - [ ] Includes DB Migration (follow approval process in SIP-59) - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
