Skip to content

Add durable draft resources with SDK and CLI parity - #3895

Closed
brsbl wants to merge 4 commits into
mainfrom
bb/draft-resources-v2-thr_8j56at3ii2
Closed

brsbl wants to merge 4 commits into
mainfrom
bb/draft-resources-v2-thr_8j56at3ii2

Conversation

@brsbl

@brsbl brsbl commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

New-thread drafts existed only in browser storage, so SDK and CLI clients could not manage them while the app was closed.

What changed

  • Add durable drafts with stable IDs, revision-checked edits, and retry-safe submission that preserves other drafts and newer edits.
  • Expose create, list, show, update, delete, and submit through sdk.drafts and bb thread draft.
  • Preserve saved draft attachments through upload cleanup; publish additive SDK types as version 0.4.102 and update CLI guides.

This is the approved clean-history replacement for #3501, based on 8d35c2776bc7fd33f41a64e4c6dd7ebd2f021887. It preserves the server-storage decision and accepted P1 fixes. The additive migration creates draft tables alongside existing data. The UI import and pane controls ship separately.

How you verified

  • Remote CI is green at 720af27ce81921013712f1b1a3ad870eeaab220d, including migration, submission, attachment-retention, SDK, CLI, and package checks. Infrastructure download failures passed on rerun; no local CI-equivalent checks were run.
  • Exact-head source server, Node 22.19.0: real SDK and CLI clients shared independent drafts with the app closed, rejected a stale revision, preserved model/destination through edits, returned the same scheduled thread on submission retry, and retained the second draft. Temporary runtime fixtures were removed.
  • The sole review was completed on Add durable drafts to the SDK and CLI #3501; its accepted P1 fixes are retained. No additional review was performed.

BB-Thread-ID: thr_8j56at3ii2

AGENT GENERATED

@brsbl
brsbl added this pull request to stack #3898 September 18, 2026 08:15
@brsbl
brsbl marked this pull request as ready for review September 18, 2026 08:28
@brsbl

brsbl commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as superseded at the user's request. The current implementation builds on the shipped Drafts plugin, threads, and queued messages: #3930 (SDK/CLI lifecycle filtering and save actions), #3933 (sidebar filters), #3938 (palette filters), and #3931 (independent New thread split composers). This PR is no longer a merge candidate. Its branch is retained.

@brsbl brsbl closed this Sep 19, 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.

1 participant