Skip to content

Fix multi-slot prompt queue#147

Merged
dannon merged 5 commits into
galaxyproject:mainfrom
qchiujunhao:issue-60-multi-slot-queue
Jun 2, 2026
Merged

Fix multi-slot prompt queue#147
dannon merged 5 commits into
galaxyproject:mainfrom
qchiujunhao:issue-60-multi-slot-queue

Conversation

@qchiujunhao
Copy link
Copy Markdown
Member

@qchiujunhao qchiujunhao commented May 31, 2026

Summary

  • Fixed issue Orbit: multi-slot prompt queue (stack thoughts while agent works) #60
  • replace the single pending prompt slot with a FIFO queue for prompts submitted while the agent is streaming
  • add queued-message UI with collapse, remove, and clear controls
  • preserve immediate handling for local slash commands while queuing agent-backed slash commands until the current turn ends

Verification

  • git diff --check
  • npm run typecheck
  • cd app && npm exec tsc -- --noEmit
  • manual fake-agent browser review for multi-message queue, row removal, clear, error, and FIFO flush behavior
  • manual fake-agent browser review for /help immediate handling plus queued /plan and /summarize behavior

@dannon
Copy link
Copy Markdown
Member

dannon commented Jun 1, 2026

Nice, this is a solid upgrade from the single-slot version -- the FIFO refactor reads well and the local-vs-agent slash split is a nice touch.

Two things before merge:

  • Stop doesn't actually stop. abort/Escape dropped the old clearPendingMessage(), so now hitting Stop aborts the turn -> agent_end fires -> flushNextQueuedMessage() runs -> the next queued prompt immediately kicks off. So with a queue, Stop just skips to the next one. Probably want clearQueue() back on abort + Escape.

  • /cost is missing from LOCAL_SLASH_COMMANDS. It's purely local, so right now it gets queued mid-stream instead of running right away. One-line add. (Side note: that set is a hand-kept duplicate of the no-prompt branches in handleSlashCommand and it's already drifted -- might be worth driving it off a flag instead so it can't.)

Rest is minor: no tests on the queue helpers, and the aria-live panel re-announces the whole queue on every change. Not blockers.

Mostly just want the Stop behavior sorted before this goes in.

@qchiujunhao
Copy link
Copy Markdown
Member Author

Nice, this is a solid upgrade from the single-slot version -- the FIFO refactor reads well and the local-vs-agent slash split is a nice touch.

Two things before merge:

  • Stop doesn't actually stop. abort/Escape dropped the old clearPendingMessage(), so now hitting Stop aborts the turn -> agent_end fires -> flushNextQueuedMessage() runs -> the next queued prompt immediately kicks off. So with a queue, Stop just skips to the next one. Probably want clearQueue() back on abort + Escape.
  • /cost is missing from LOCAL_SLASH_COMMANDS. It's purely local, so right now it gets queued mid-stream instead of running right away. One-line add. (Side note: that set is a hand-kept duplicate of the no-prompt branches in handleSlashCommand and it's already drifted -- might be worth driving it off a flag instead so it can't.)

Rest is minor: no tests on the queue helpers, and the aria-live panel re-announces the whole queue on every change. Not blockers.

Mostly just want the Stop behavior sorted before this goes in.

Thank you @dannon ! changes made.

Copy link
Copy Markdown
Member

@dannon dannon left a comment

Choose a reason for hiding this comment

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

Looks great -- both blockers handled (Stop clears the queue now, /cost no longer waits), and the queue-helper tests are a nice add. Routing /cost through a followUp instead of a local append is the right call too; keeps the agent as the single writer of notebook.md and avoids a write race. Pulled it down and confirmed the new tests and app typecheck both pass. Thanks for the quick turnaround!

@dannon dannon merged commit 72e13de into galaxyproject:main Jun 2, 2026
3 checks passed
@qchiujunhao qchiujunhao deleted the issue-60-multi-slot-queue branch June 2, 2026 02:20
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