Skip to content

feat(chat): add a setting to hold queued messages for Send now - #836

Merged
devswha merged 6 commits into
mainfrom
feat/chat-queue-manual-send
Oct 11, 2026
Merged

devswha merged 6 commits into
mainfrom
feat/chat-queue-manual-send

Conversation

@devswha

@devswha devswha commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a Composer setting, Send queued messages automatically (on by default). When it is off, a chat message sent while the agent works is kept by the bridge as a held pending message. It shows under the message box with Send now and is never sent by the turn's end.

How

  • shared/protocol.ts: submit accepts delivery: "hold", gated by a new pending-hold server feature.
  • server/pending-input.ts: enqueue(..., held) stores the message in the existing held state. Automatic delivery (next) only takes queued, so only an explicit steer (Send now) sends it. The lease, identity and blocked-prompt checks on Send now are unchanged.
  • server/index.ts: treats hold like queue for validation and receipts (now fingerprinted with the delivery). Unlike queue, a hold that arrives after the turn ended is still kept as held, never typed.
  • Client: new autoSendQueued setting. PaneTerminal sends hold instead of queue when it is off. HerdrSocket.submit decides after the capability snapshot: a bridge without pending-hold gets queue, so the user can still send to an older PC (noted in the changelog). A held row without an error reads "Waits for Send now".
  • Demo transport advertises pending-hold and keeps every hold message as held.
  • i18n entries for ko/ja/zh/tr.

Tests

  • server/pending-input.test.ts: a held message is never offered to automatic delivery; an explicit claim takes it.
  • server/pending-input.contract.test.ts: a held message survives the turn's end (nothing typed), then Send now types it; a hold arriving after the turn ended is kept, not typed.
  • src/lib/ws.test.ts: hold goes to pending-hold bridges, queue to older ones, and a Send before the snapshot still holds.
  • bun run typecheck, bun run test:unit and bun run check run bun test ./server/pending-input.contract.test.ts (43 pass) are green locally.

Review

Codex gpt-6.1-sol xhigh adversarial review found two P1s (a hold arriving after the turn was typed at once; a Send before the capability snapshot fell back to queue). Both are fixed in e6a8cf7 with tests.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 04f91c00-8a29-43a4-828a-aaf8f49df1e0

📥 Commits

Reviewing files that changed from the base of the PR and between e6a8cf7 and 871ec44.


📒 Files selected for processing (18)
  • CHANGELOG.md
  • server/index.ts
  • server/pending-input.contract.test.ts
  • server/pending-input.test.ts
  • server/pending-input.ts
  • shared/protocol.ts
  • site/demo/transport.ts
  • src/components/PaneTerminal.tsx
  • src/components/PendingMessages.tsx
  • src/components/SettingsDialog.tsx
  • src/components/pendingStatus.test.ts
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.tr.ts
  • src/lib/i18n.zh.ts
  • src/lib/settings.ts
  • src/lib/ws.test.ts
  • src/lib/ws.ts

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8f07b0a-f938-4ca4-869e-220bfe23874e





📥 Commits

Reviewing files that changed from the base of the PR and between 58a4a9c and e6a8cf7.






📒 Files selected for processing (7)
  • server/index.ts
  • server/pending-input.contract.test.ts
  • shared/protocol.ts
  • site/demo/transport.ts
  • src/components/PaneTerminal.tsx
  • src/lib/ws.test.ts
  • src/lib/ws.ts





Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.







📝 Summary

Summary by CodeRabbit

  • New Features
    • Added a Composer setting to control whether queued messages send automatically when an agent’s turn ends. It’s on by default; turn it off to keep messages waiting until you select Send now.
    • Held messages are labeled Waits for Send now. Older bridges continue sending queued messages when the turn ends.
    • Added translated controls and labels for Japanese, Korean, Turkish, and Simplified Chinese.
📝 Summary
📝 Summary
📝 Summary
📝 Summary

Walkthrough

This change adds held delivery for queued messages. A default-on composer setting controls automatic sending. When disabled, supported bridges hold messages until the owner sends them. Older bridges retain turn-end delivery.

Changes

Held queued-message delivery

Layer / File(s) Summary
Delivery contract and client transport
shared/protocol.ts, src/lib/ws.ts, src/lib/ws.test.ts
The submit protocol adds hold delivery and the pending-hold feature. The WebSocket client checks bridge support, submits held messages, and tracks their receipts. Tests cover supported and unsupported bridges and capability snapshots.
Held pending-message state
server/pending-input.ts, server/index.ts, site/demo/transport.ts, server/pending-input*.test.ts
The server and demo transport store held submissions separately from queued submissions. Automatic selection excludes held messages, while explicit claims can send them. Validation and receipt handling accept both deferred delivery modes.
Composer setting and delivery selection
src/lib/settings.ts, src/components/PaneTerminal.tsx, src/components/SettingsDialog.tsx, src/components/PendingMessages.tsx, src/lib/i18n.*.ts, CHANGELOG.md
The composer setting defaults to automatic sending. When it is disabled, the composer submits held messages. The settings UI, pending-message status, translations, and changelog describe this behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: wouldu-pres












Merge Risk: ⚪ Minimal · up to e6a8c

This adds an opt-out setting that holds queued messages until Send now is used, and older bridges keep the previous queue behavior. No merge-blocking risk is evident from the supplied changes.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 16 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: adding a chat setting that holds queued messages until the user selects Send now.
Description check Passed The description explains the problem, resulting behavior, implementation details, compatibility behavior, tests, and validation results. It uses Summary, How, and Tests headings instead of the templat…





✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR










🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR







🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR



  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

devswha and others added 4 commits October 12, 2026 05:58
Review finding (Codex, pre-merge): a message held with automatic sending
off is restored in a second tab from storage as a held copy and offered
Send now, which sends it as a new submission while the first tab's
server-owned record stays and can be sent again. The bridge's pending
input is connection-owned, so the second tab cannot act on or see the
first tab's record; rather than a protocol change, the copy's row now
says "Held message — review and send" (as a refused hold does) instead of
"Waits for Send now", which is kept for a hold this connection owns.
The status wording moves into pendingStatus() with a unit test.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@devswha
devswha merged commit 862d08a into main Oct 11, 2026
17 checks passed
@devswha
devswha deleted the feat/chat-queue-manual-send branch October 11, 2026 22:06
devswha added a commit that referenced this pull request Oct 12, 2026
## Change

Release 0.4.8, from main at ca6db6e (20 PRs since v0.4.7: the 0.4.7
mobile walk-through fixes, two contributor PRs and the revived #793).

- `package.json` and `herdr-plugin.toml`: 0.4.8.
- CHANGELOG: `[Unreleased]` becomes `[0.4.8] - 2026-10-12`, with the
compare links. Twelve entries that had no PR link get theirs (#835 #837
#838 #840 #842 #843 #844+#848 #845 #847 #849 #851 #852). A Maintenance
line says the remote-PC runtime is now version 27.
- `release-summaries.json`: 0.4.8 in en/ko/ja/zh/tr (3 new, 6 improved,
8 fixed). The Turkish lines are not checked by a native speaker.
- `REMOTE_BUNDLE_VERSION` 26 -> 27: #836 adds the `pending-hold` server
feature and #787 serves precompressed assets, so `remote-v27` is
published before the app release.

Every PR merged since v0.4.7 is linked in the section: #787 #788 #793
#835 #836 #837 #838 #839 #840 #841 #842 #843 #844 #845 #846 #847 #848
#849 #851 #852.

## Validation

- `bun scripts/release-notes.ts 0.4.8` renders the summaries and the
full changelog (116 lines).
- `bun run check fast`: generated types, typecheck, build and 2800+ unit
tests pass.

## Release

After this merges and its CI on `main` passes: push `remote-v27`, wait
for its release, then run the Release workflow with `0.4.8`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5.1 <[email protected]>
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