fix: isolate desktop sessions by workspace#3029
Conversation
a562658 to
2a66774
Compare
2a66774 to
c2cd5d4
Compare
|
Thanks for this — isolating desktop sessions by workspace is a good improvement. Rebasing against the latest main-v2 hits conflicts in desktop/app.go (3 hunks) and a large ~68-line one in internal/boot/boot_test.go, since session path handling and its tests have changed since this was opened (e.g. legacy session import landed via #3247). Could you rebase onto the latest main-v2 and reconcile the session path logic? Thank you! |
c2cd5d4 to
cc0fe3b
Compare
cc0fe3b to
50d9710
Compare
|
Rebased onto the latest main-v2 and reconciled the session path changes with the legacy session import path from #3247. Summary:
Validation:
|
|
Thanks for this — workspace-scoped session isolation is a solid improvement. main-v2 has moved on quite a bit and this now conflicts in a few files, including core boot wiring, so it needs a rebase before we can take it: Could you rebase onto the latest |
|
Sorry for the churn — main-v2 moved again after your rebase (a few session-display and bash-process changes landed), so this conflicts once more. Most of it is mechanical (struct fields in boot.go, the sessions.go import block), but two spots overlap with a recent refactor and are worth your eyes since they touch your feature:
Could you rebase onto the latest main-v2 once more and resolve those two? Everything else is just keep-both. CI was green on your last push, so it should be quick. Thanks for sticking with it. |
50d9710 to
8dead11
Compare
|
Rebased onto the latest main-v2 ( I reconciled the two overlapping spots you called out:
Validation:
PR checks are green now, including desktop, windows-latest, and race. |
esengine
left a comment
There was a problem hiding this comment.
Nice — sessions are now scoped per workspace (own history + trash per project) via a boot SessionDir override, and the Host gains a closed-guard (beginDeferredSpawn) so a lazy/background MCP spawn can't race a controller Close during a workspace switch. Good tests, including the close-cancels-kick race. Merging.
Summary
Fixes #2813
Validation
D:\Go\go\bin\go.exe test ./...D:\Go\go\bin\go.exe test ./...fromdesktop/D:\Go\go\bin\go.exe vet ./...D:\Go\go\bin\go.exe vet ./...fromdesktop/D:\Go\go\bin\go.exe test . -run ^$ -bench "BenchmarkDesktop(SessionDir|ListSessionsScoped)$" -benchmem -benchtime=2s -count=3fromdesktop/Performance benchmark on Windows 10-class desktop path:
BenchmarkDesktopListSessionsScoped: 7.53-8.54 ms/op for 120 current-workspace sessions while another workspace also had 120 sessions.BenchmarkDesktopSessionDir: 1.86-2.09 us/op.No screenshots: this changes desktop session storage and backend path validation only; no UI surface changed.