[2.x] feat: Per-channel project cursor for multi-client server mode#8649
Merged
eed3si9n merged 7 commits intosbt:developfrom Jan 30, 2026
Merged
[2.x] feat: Per-channel project cursor for multi-client server mode#8649eed3si9n merged 7 commits intosbt:developfrom
eed3si9n merged 7 commits intosbt:developfrom
Conversation
496d47a to
87303b9
Compare
The per-channel cursor feature has been reverted. This commit removes the remaining unused channelProjectCursors key definition.
Remove all remaining per-channel cursor code including: - channelProjectCursors key from Keys.scala - getChannelCursor, setChannelCursor, effectiveCurrentRef methods - Import statement for channelProjectCursors - Restore original ProjectNavigation implementation
a77759f to
f11b7de
Compare
Contributor
Author
|
@eed3si9n Please review my pr and give me your feedback |
Member
|
Hi @bitloi, thanks for the contribution! Please check out our Contributor's Guildeline and:
|
eed3si9n
requested changes
Jan 29, 2026
…nel cursors - Add effectiveCurrentRef in ProjectNavigation to resolve channel-specific cursor - Modify Project.extract to use effectiveCurrentRef for task resolution - Add syncChannelCursor in MainLoop to auto-update cursors on project change - Add ChannelCursorTest to verify multi-client independent project states
Contributor
Author
|
@eed3si9n Would you please give me your feedback for the change? |
eed3si9n
reviewed
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2799
Problem
When multiple clients connect to the same sbt server, they all share the same "current project" state. When one client switches projects with
project X, all other clients see that change.Solution
Store per-channel project cursors in State attributes. Each client maintains its own cursor that tracks which project it has selected.
Changes
Keys.scala- AddchannelProjectCursorsattributeProjectNavigation.scala- AddeffectiveCurrentRefto resolve channel-specific cursorProjectExtra.scala- UseeffectiveCurrentRefinProject.extractMainLoop.scala- AddsyncChannelCursorto auto-update cursors on project changeTest
ChannelCursorTest- Verifies two clients maintain independent project states