Skip to content

Stream channel drafts as appended text instead of the full body #1808

Closed

Description

@DoodleBears

Problem and context / 问题与背景

ChannelDraftTracker publishes a draft notification with the whole draft body for every model chunk (packages/core/src/channels/draft.ts), and followChannel forwards it as is. A long reply sends roughly n²/2 characters over the device WebSocket, which matters on a phone on a weak network, and every client re-reads the full text.

Research: mobile-research/chat-libraries.md in the project files, item 6.

Smallest useful scope / 最小有用范围

Included:

  • Add an append form to the draft notification (for example offset plus append, with a revision or length check); a client that misses a frame or fails the check asks for or receives the full body.
  • Keep the full-body form readable so older clients and the web client keep working during rollout.
  • Mobile conversation.ts applies appends.

Excluded:

  • Changing when drafts start, settle or are abandoned.

Open question before building: whether the Host should also throttle draft publishes server-side.

How to verify / 如何验收

  • Core tests: a stream of chunks yields appends that rebuild the same body as today's full-body notifications; a gap falls back to the full body.
  • Mobile Vitest against the fake Host for the append path.
  • Bytes sent for a long reply, before and after, recorded in the PR.

Activity

  1. DoodleBears commented on Oct 14, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Claude Code
    • Task: claude/cloud/session_01BXudZdLqFn8GScXHHcK3A3 (not a DSH Session)
    • Issue scope: Host draft-append notification for opted-in Channel followers; mobile conversation.ts applies appends, resyncs on mismatch, falls back on older Hosts
    • Branch: claude/project-thread-7bwqag
    • Started: 2026-10-14 18:13 UTC
    • State: active

    Generated by Claude Code

  2. DoodleBears commented on Oct 14, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions