You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: clicking "New Session" does nothing in some workspaces (now fixed)
Symptom: Clicking New Session (the sidebar's global button / wordmark, or the + on a workspace group row) silently does nothing in some workspaces, while working fine in others — no new session, no navigation, no error.
Why it looks intermittent: the failure depends on whether the current session is the workspace's blank session:
Current session == the workspace's blank (e.g. the recent-workspace blank auto-selected at boot, or right after one New Session click) → nothing happens.
Current session is a normal (non-blank) session → works (reuses the workspace's parked blank, or mints a fresh one).
Root cause:WorkspaceRuntime.connectWorkspace's blank-session reuse scan (which exists to avoid piling up hidden blanks on repeated clicks) never excluded the current session. When the current session is exactly that workspace's blank, reuse returns the current id, sessions.open(same id) is a no-op, and the click appears dead.
Fix: the reuse scan now skips the current session (id !== current), so the currently-viewed blank falls through to session.create({ workspaceId }) and the click always creates and opens a fresh blank. Changed in packages/client/runtime/src/client/workspaces/service.ts; regression test added to packages/client/runtime/tests/workspaces-service.client.spec.ts.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
现象
在侧边栏点击「新建会话」(顶部的全局按钮 / 字标,或某个工作区分组行上的
+)时,有的工作区正常,有的工作区完全没反应——不创建新会话、页面不切换、也没有任何报错。为什么"时好时坏"
这是状态相关的,取决于"当前会话"是不是该工作区的空白(blank)会话:
所以同一个工作区:先在空白会话里发一条消息,按钮就"恢复"了;停在空白会话上再点,又"失效"。跨工作区看就是"某些可以、某些不行"。
根因
WorkspaceRuntime.connectWorkspace的空白会话复用扫描会在工作区的成员空白会话中挑一个复用(设计意图:反复点击「新建会话」不要堆积一堆隐藏的空白会话)。但扫描没有排除当前会话本身:sessions.open(同一个 id)是幂等的,选中状态不变;修复前相关代码(
packages/client/runtime/src/client/workspaces/service.ts):修复
复用扫描增加
id !== current条件:用户正在查看的空白会话不参与复用,落到新建分支(session.create({ workspaceId }))。点击「新建会话」现在总是会创建并打开一个全新的空白会话。行为不变的部分:当前会话是普通会话时,仍然先复用工作区里已有的空白会话(不会堆积隐藏空白会话);
startInitialSelection启动选择不受影响(此时尚无当前会话)。测试
packages/client/runtime/tests/workspaces-service.client.spec.ts新增回归用例:当工作区空白会话恰为当前会话时,startSession会创建全新会话并打开它(修复前该用例失败:session.create未被调用,即静默空操作)。English
Bug: clicking "New Session" does nothing in some workspaces (now fixed)
Symptom: Clicking New Session (the sidebar's global button / wordmark, or the
+on a workspace group row) silently does nothing in some workspaces, while working fine in others — no new session, no navigation, no error.Why it looks intermittent: the failure depends on whether the current session is the workspace's blank session:
Root cause:
WorkspaceRuntime.connectWorkspace's blank-session reuse scan (which exists to avoid piling up hidden blanks on repeated clicks) never excluded the current session. When the current session is exactly that workspace's blank, reuse returns the current id,sessions.open(same id)is a no-op, and the click appears dead.Fix: the reuse scan now skips the current session (
id !== current), so the currently-viewed blank falls through tosession.create({ workspaceId })and the click always creates and opens a fresh blank. Changed inpackages/client/runtime/src/client/workspaces/service.ts; regression test added topackages/client/runtime/tests/workspaces-service.client.spec.ts.All reactions