Skip to content

fix(cli): display browser action results nicely instead of raw base64 data - #4829

Merged
marius-kilocode merged 2 commits into
mainfrom
fix/cli-browser-action-result-display
Jan 7, 2026
Merged

fix(cli): display browser action results nicely instead of raw base64 data#4829
marius-kilocode merged 2 commits into
mainfrom
fix/cli-browser-action-result-display

Conversation

@marius-kilocode

@marius-kilocode marius-kilocode commented Jan 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix browser action results displaying raw base64 screenshot data as hexadecimal garbage in the CLI
  • Parse the JSON browser action result and display meaningful information (screenshot indicator, URL, viewport, cursor position, console logs)
  • Add comprehensive tests for the browser action result component

Changes

  • Updated SayBrowserActionResultMessage.tsx to parse and render browser results properly
  • Added SayBrowserActionResultMessage.test.tsx with 10 test cases

Before

🌐 Browser Action Result
{"screenshot":"data:image/webp;base64,UklGRn44AABXRUJQVlA4...","logs":"","currentUrl":"https://example.com"...}

After

🌐 Browser Action Result
   📷 Screenshot captured
   URL: https://example.com
   Viewport: 1280x800
image

@changeset-bot

changeset-bot Bot commented Jan 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 34c390b

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

This PR includes changesets to release 2 packages
Name Type
@kilocode/cli Patch
kilo-code 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

@kilo-code-bot

kilo-code-bot Bot commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR improves the browser action result display in the CLI by:

  • Parsing JSON data instead of displaying raw text
  • Showing a "Screenshot captured" indicator instead of base64 data
  • Displaying meaningful metadata (URL, viewport, cursor position, console logs)
  • Gracefully handling edge cases (invalid JSON, missing data, empty logs)

The implementation is clean, well-typed, and includes comprehensive test coverage.

Files Reviewed (3 files)
  • .changeset/fix-browser-action-result-display.md - Proper changeset format
  • cli/src/ui/messages/extension/say/SayBrowserActionResultMessage.tsx - Clean refactor with proper TypeScript types
  • cli/src/ui/messages/extension/say/__tests__/SayBrowserActionResultMessage.test.tsx - Comprehensive test coverage

@marius-kilocode
marius-kilocode enabled auto-merge (squash) January 7, 2026 11:40
@marius-kilocode
marius-kilocode merged commit 4e09e36 into main Jan 7, 2026
12 checks passed
@marius-kilocode
marius-kilocode deleted the fix/cli-browser-action-result-display branch January 7, 2026 19:05
@github-actions github-actions Bot mentioned this pull request Jan 7, 2026
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.

2 participants