Skip to content

[2.x] feat: Notify sbtn client when command is queued#8568

Merged
eed3si9n merged 4 commits intosbt:developfrom
bitloi:feat/queued-notification-8356
Jan 16, 2026
Merged

[2.x] feat: Notify sbtn client when command is queued#8568
eed3si9n merged 4 commits intosbt:developfrom
bitloi:feat/queued-notification-8356

Conversation

@bitloi
Copy link
Copy Markdown
Contributor

@bitloi bitloi commented Jan 16, 2026

feat: Notify sbtn client when command is queued

Fixes #8356

Problem

When sbtn sends a command while another long-running task (like console) is already executing, the client silently blocks with no indication that the command is waiting in a queue.

Solution

When a new command arrives via the network channel and another command is currently running, the server now sends an ExecStatusEvent notification with status "Queued" to the client. The client displays a message like:

[info] waiting for: console

Changes

  • NetworkChannel.scala: Added notifyIfQueued() method that checks StandardMain.exchange.currentExec and sends a notification if a command is running
  • NetworkClient.scala: Added handler for "sbt/exec" notifications with "Queued" status to print the waiting message to stderr

Testing

  • Added QueuedNotificationTest with test project in server-test/src/server-test/queued/

Checklist

  • Compiles successfully
  • scalafmtCheck passes
  • mimaReportBinaryIssues passes (binary compatible)
  • Tests added

Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=89318445

Copy link
Copy Markdown
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

This looks awesome.

@eed3si9n eed3si9n changed the title feat: Notify sbtn client when command is queued [2.x] feat: Notify sbtn client when command is queued Jan 16, 2026
@eed3si9n
Copy link
Copy Markdown
Member

@bitloi Please sign the CLA, and let me know, and I'll rerun the checker.

@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Jan 16, 2026

@bitloi Please sign the CLA, and let me know, and I'll rerun the checker.

Can you share the link?

@bitloi
Copy link
Copy Markdown
Contributor Author

bitloi commented Jan 16, 2026

@eed3si9n eed3si9n merged commit c832fad into sbt:develop Jan 16, 2026
14 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.

Your call is important to us

3 participants