Skip to content

fix(cli): fix list command not showing sessions when workspaceDir is undefined - #40039

Merged
Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-list-workspace-dir-hash
Apr 3, 2026
Merged

fix(cli): fix list command not showing sessions when workspaceDir is undefined#40039
Yury Semikhatsky (yury-s) merged 2 commits into
microsoft:mainfrom
yury-s:fix-list-workspace-dir-hash

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • When the cwd has no .playwright directory, workspaceDir is undefined and the registry stores sessions under workspaceDirHash as the key
  • The list command was comparing workspace keys against clientInfo.workspaceDir only, so workspaceDirHash !== undefined was always true and all sessions were skipped
  • Fix uses clientInfo.workspaceDir || clientInfo.workspaceDirHash (same pattern as Registry.entries()) for the comparison

…undefined

When the cwd has no .playwright directory, workspaceDir is undefined and the
registry key is workspaceDirHash. The list command was comparing workspace keys
against workspaceDir only, so sessions were never shown in this case.
…undefined

When the cwd has no .playwright directory, workspaceDir is undefined and the
registry stores sessions under workspaceDirHash as the key. The list command
was comparing workspace keys against workspaceDir only, so sessions were never
shown in this case.

Extract clientKey() helper to deduplicate the workspaceDir || workspaceDirHash
fallback pattern used across registry.ts and program.ts.
@yury-s
Yury Semikhatsky (yury-s) merged commit c1764b8 into microsoft:main Apr 3, 2026
9 of 10 checks passed
@yury-s
Yury Semikhatsky (yury-s) deleted the fix-list-workspace-dir-hash branch April 3, 2026 01:38
@github-actions

github-actions Bot commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [msedge] › mcp/files.spec.ts:106 › clicking on download link emits download @mcp-windows-latest

6382 passed, 377 skipped


Merge workflow run.

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.

2 participants