Skip to content

fix: isolate desktop sessions by workspace#3029

Open
GTC2080 wants to merge 1 commit into
esengine:main-v2from
GTC2080:GTC/issue-2813-workspace-sessions
Open

fix: isolate desktop sessions by workspace#3029
GTC2080 wants to merge 1 commit into
esengine:main-v2from
GTC2080:GTC/issue-2813-workspace-sessions

Conversation

@GTC2080
Copy link
Copy Markdown
Contributor

@GTC2080 GTC2080 commented Jun 4, 2026

Summary

  • Store desktop session history under per-workspace project state instead of the shared global session directory.
  • Pass the desktop session directory through startup, workspace switches, model switches, and settings rebuilds so new sessions, history actions, and display sidecars stay scoped.
  • Reject resume paths outside the active workspace session directory.

Fixes #2813

Validation

  • D:\Go\go\bin\go.exe test ./...
  • D:\Go\go\bin\go.exe test ./... from desktop/
  • D:\Go\go\bin\go.exe vet ./...
  • D:\Go\go\bin\go.exe vet ./... from desktop/
  • D:\Go\go\bin\go.exe test . -run ^$ -bench "BenchmarkDesktop(SessionDir|ListSessionsScoped)$" -benchmem -benchtime=2s -count=3 from desktop/

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.

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: 会话记录异常复制+不同工作区会话重叠+每次点开程序都要输入api密钥

1 participant