Skip to content

fix(queue): preserve composer drafts during queued sends (#42) - #59

Merged
MarsLuay merged 3 commits into
mainfrom
issue-accept/42-2e6685ff-82e4-4c37-b261-fe3e5cf629f8
Sep 20, 2026
Merged

MarsLuay merged 3 commits into
mainfrom
issue-accept/42-2e6685ff-82e4-4c37-b261-fe3e5cf629f8

Conversation

@MarsLuay

Copy link
Copy Markdown
Owner

Summary

  • Queued sends now preflight the canonical composer via the existing provider compatibility contract and fail closed when it already has a user draft or other pending text.
  • A send-button or submission failure after that preflight restores the captured composer snapshot instead of leaving queued text behind.
  • Enter-to-queue no longer clears the composer if the user edited it before the enqueue ACK.

Testing

  • Ran local tests or lint commands
  • Verified the affected workflow manually

npm test — 131 passed, 0 failed.

Focused coverage:

  • Queued send accepts a clean empty canonical composer
  • Queued send never overwrites a non-empty canonical composer draft
  • Queued send restores the preflight composer after send-button failure
  • Queued send defers on conflicting pending composer state
  • Successful enqueue keeps a composer draft that changed before the queue ACK

Checklist

  • Updated documentation when behavior changed
  • Followed the code of conduct and contributing guidelines

Fixes #42

Queued automation now fails closed on a non-empty canonical composer and restores the preflight draft if submission fails after inject.
Copilot AI lite review requested due to automatic review settings September 20, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Queued empty-composer sends now wait for a matching user turn after
#43, so the send-script mock must expose that snapshot. Also wrap
promise-executor timeouts so ESLint stays clean.
@MarsLuay
MarsLuay merged commit 7c32321 into main Sep 20, 2026
2 checks passed
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.

[Bug] Preserve composer drafts and pending state during queued sends

2 participants