Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: cut websocket throughput in half by pruning activity payloads #4622

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/4622/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Prunes unread tool activity fields at HTTP and WebSocket boundaries while preserving client-visible data and stored payloads.

This reduces long-thread startup cost, especially on iOS.

Validated with focused projection tests, server/web/mobile typechecks, targeted lint and formatting, and an integrated web pass.

Note

Prune activity payloads to only include fields read by clients

  • Adds ActivityPayloadProjection.ts which strips bulk/unread fields from activity payloads, retaining only command, files, toolCallId, kind, and a summarized rawOutput.
  • MCP tool call activities are passed through unchanged; all other activity types are projected.
  • File paths are collected recursively from nested structures (bounded to depth 4, up to 12 unique paths); raw text output is truncated to a single meaningful line or a line-count summary.
  • The HTTP thread detail snapshot endpoint and WebSocket streams for orchestration and thread detail now deliver projected payloads.
  • Behavioral Change: clients receiving thread detail snapshots or thread.activity-appended events will no longer see unread bulk fields in activity payloads.
Macroscope summarized cd38945.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 13614d99-939c-4dca-98d4-11536e04fb0b

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `t3code/implement-postplan`

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    3. t3dotgg(GitHub profile, opens in a new tab) changed the title

    4. Approvability

      Verdict: Needs human review

      This PR modifies runtime behavior by filtering activity payloads sent over websockets and HTTP, reducing data transmitted to clients. Changes that alter data transmission to clients warrant human review to ensure no clients depend on the stripped fields.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.