Skip to content

fix: map Jules session transcript from Activity union fields - #139

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-d186
Draft

fix: map Jules session transcript from Activity union fields#139
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-d186

Conversation

@cursor

@cursor cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bug and impact

Opening a Jules session (CLI getOutput or web drawer) showed an empty conversation against the live Jules API, even when activities existed.

Root cause

realJulesPort.listActivities treated activities as flat {role,content,message} objects. The Jules v1alpha Activity resource uses originator plus typed unions (agentMessaged.agentMessage, userMessaged.userMessage, progressUpdated, planGenerated, sessionFailed). Mapping always produced empty content.

Fix

  • Map the real Activity union fields into agent/human messages
  • Paginate activities.list (pageSize=100 + nextPageToken) so long sessions are not silently truncated at the default 50
  • Keep a small legacy flat-field fallback for older fixtures
  • Sync vendored web/_core Jules port artifacts

Validation

  • npx vitest run test/jules-port-activities.test.ts test/jules.test.ts test/jules-port.test.ts (14 passed)
Open in Web View Automation 

listActivities expected flat role/content fields that the Jules v1alpha
Activity resource does not have, so session drawers and getOutput always
showed empty conversation text against the live API. Map agentMessaged /
userMessaged / progress / plan / failure unions, and paginate activities.

Co-authored-by: Parvez Kose <koseparvez@gmail.com>
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
polyagent Ready Ready Preview Aug 17, 2026 11:05am

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