Skip to content

feat(web): queue user messages while a session is running#274

Draft
webwww123 wants to merge 1 commit intotiann:mainfrom
webwww123:feat/session-queued-messages
Draft

feat(web): queue user messages while a session is running#274
webwww123 wants to merge 1 commit intotiann:mainfrom
webwww123:feat/session-queued-messages

Conversation

@webwww123
Copy link
Copy Markdown

Summary

  • allow users to queue additional messages in the web UI while a session is still running
  • render queued user messages immediately with a Queued status
  • automatically send the next queued message after the current run is no longer active

Why

Issue #272 asks for Codex / Claude Code style pending sends, where I can type the next instruction before the current run finishes.

Scope

This PR is intentionally web-only:

  • no hub protocol changes
  • no production deployment changes
  • queue state lives in the current web session

Validation

  • docker run --rm -v /root/sandbox/hapi-pr:/workspace -w /workspace oven/bun:1 sh -lc "bun install && cd web && bun run typecheck"

@hqhq1025
Copy link
Copy Markdown
Collaborator

Hey @webwww123 👋 Are you still working on this? We're pretty interested in message queuing support (ref #428) — the backend already handles it via MessageQueue2, so it's really just the web UI that needs the queue state display.

Your approach looks solid — the optimistic queued status + auto-dequeue on idle is exactly what's needed. A couple of thoughts:

  1. The dequeue trigger uses session.thinking — but since the CLI-side MessageQueue2 already batches queued messages, we could also just send immediately and let the backend queue handle ordering. The UI would still show the Queued badge for user feedback.
  2. The PR currently holds messages client-side until the session goes idle. An alternative is to POST them right away (the hub accepts messages at any time) and only use the queued status as a visual indicator.

Let us know if you plan to continue this — happy to help review or pick it up if you're busy. Thanks!

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.

2 participants