8000 fix(content-bubble): decode text artifacts as UTF-8 by magiccao · Pull Request #552 · google/adk-web · GitHub
[go: up one dir, main page]

fix(content-bubble): decode text artifacts as UTF-8 - #552

Merged
copybara-service[bot] merged 1 commit into
google:mainfrom
magiccao:fix/content-bubble-utf8-decode
Nov 6, 2026
Merged

copybara-service[bot] merged 1 commit into
google:mainfrom
magiccao:fix/content-bubble-utf8-decode

Conversation

@magiccao
Copy link
Copy Markdown

Summary

Reproduction

Save a text artifact containing multibyte content from a tool:

await tool_context.save_artifact(
    "report.md", types.Part.from_text(text="# 报告\n\n0.1.1 版本回归测试通过。\n"))

In adk web, the inline preview under the tool call shows # æå ... while the Artifacts tab shows the same artifact correctly.

Test plan

  • npm ci && npx ng test --watch=false --browsers=ChromeHeadless — full suite: 830 passing (incl. the 5 new content-bubble.component.spec.ts tests), 37 skipped, 0 failures
  • Verified end to end against the shipped google-adk 2.10.0 bundle with a locally patched build: the inline preview renders # 报告 / 0.1.1 版本回归测试通过。 correctly
  • CI lint + test workflows green on this PR

🤖 Generated with Claude Code

@google-cla
google-cla Bot commented Oct 22, 2026
Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

getTextContent() in ContentBubbleComponent returned atob(base64)
directly, rendering the UTF-8 bytes of multibyte text artifacts as
Latin-1 characters in the inline chat preview (e.g. CJK text shows as
mojibake). The same bug was fixed for the Artifacts tab in google#478;
this applies the identical TextDecoder-based decode to content-bubble
and adds unit tests mirroring the artifact-tab spec.

Fixes google#551
@magiccao
magiccao force-pushed the fix/content-bubble-utf8-decode branch from f5d3213 to 26c1a9e Compare October 22, 2026 02:23
@copybara-service
copybara-service Bot merged commit 07a0702 into google:main Nov 6, 2026
6 checks passed
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.

Inline artifact preview (content-bubble) still renders garbled characters for multibyte UTF-8 content

1 participant

0