Skip to content

Fix Quick Query without an open workspace - #4508

Draft
hugosmoreira wants to merge 3 commits into
github:mainfrom
hugosmoreira:agent/quick-query-without-workspace
Draft

hugosmoreira wants to merge 3 commits into
github:mainfrom
hugosmoreira:agent/quick-query-without-workspace

Conversation

@hugosmoreira

@hugosmoreira hugosmoreira commented Aug 10, 2026 •

Copy link
Copy Markdown

What

  • Use workspace storage for Quick Query when available, falling back to extension-global storage when no workspace is open.
  • Preserve existing query files and propagate filesystem errors.
  • Cover both directory selection and the existing warning flow in an empty VS Code window.
  • Document the user-facing fix in the changelog.

Why

Without an open workspace, ExtensionContext.storageUri is undefined. Quick Query currently throws Workspace storage path is undefined before reaching its intended guidance. This fallback lets that guidance appear; it does not remove the existing multi-root-workspace reload requirement or change query execution.

Fixes #1415.

Validation

Merged current main at 9b5f712 into the draft branch. The five Quick Query files remain the complete diff against that base. Local checks used Windows, Node 22.23.5, and the locked dependencies.

  • The empty-window regression reproduced Workspace storage path is undefined on unchanged main with only the regression test copied in. The same test passed on the merged branch in VS Code 1.147.0 and verified the existing warning and both choices.
  • All four Quick Query unit tests and all 11 related no-workspace tests passed. The Windows full unit run had 667 passes and one FOLDER~1 fixture failure. Unchanged main had 663 passes and the same failure under the same runtime and lockfile.
  • The view suite had 364 passes and two skips. The extension and webview type checks, full build, VSIX packaging, ESLint, and Prettier on all five changed files passed.
  • The broader no-workspace run was stopped after 19 suites passed and the test host stopped reporting results. The dedicated Quick Query and related local-query runs completed separately.

The warning test cancels the prompt. The post-reload path, CLI integration suites, Linux, and macOS were outside this local verification.

AI assistance: Codex assisted with implementation, test development and verification.

@hugosmoreira

Copy link
Copy Markdown
Author

Hi, could a maintainer approve the workflows for this PR when convenient? The updated head is 2fdf8a3, and all four workflow runs are currently marked action_required.

I've updated the PR description with the local verification: four focused unit tests and eleven related VS Code integration tests pass, as do build, packaging and lint. The one Windows full-unit failure also reproduces on unchanged upstream. I've left the PR in draft pending CI. Thanks!

This branch has not been deployed

No deployments
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.

Bad error when opening quick query without a workspace folder.

1 participant