Skip to content

fix(vscode): disclose first-folder chat scope in multi-root workspaces - #14925

Merged
WebReflection merged 4 commits into
Kilo-Org:mainfrom
abdulhusainahk:fix/14882-workspace-scope-hint
Oct 16, 2026
Merged

WebReflection merged 4 commits into
Kilo-Org:mainfrom
abdulhusainahk:fix/14882-workspace-scope-hint

Conversation

@abdulhusainahk

@abdulhusainahk abdulhusainahk commented Oct 8, 2026 •

Copy link
Copy Markdown

Issue

Fixes #14882.

Context

A multi-root window can look as though every Explorer folder belongs to the chat project, although the sidebar uses only the first workspace folder. Show that scope in the normal and onboarding empty states, name the folder using its VS Code display name, and explain the separate-window and Agent Manager alternatives without interrupting chat.

Implementation

The hint requests the current workspace scope when mounted and follows workspace-folder changes. Dismissal survives webview reloads without replacing unrelated saved webview state; a different first-folder path can show the hint again. Explicit project hosts, including Agent Manager, do not show the sidebar fallback notice.

This is disclosure only: session routing, permissions, @ discovery, and editor context are unchanged.

Screenshots / Video

Actual components rendered in Chromium through Storybook; these are not native VS Code screenshots. The images linked here live on a separate evidence-only branch. Four Linux-generated story baselines from CI are included in the feature diff.

Single folder — no notice Multiple folders — notice
Single-folder empty state Multi-root scope notice

Light theme · 200px sidebar / long folder name · Onboarding

How to Test

Manual/local verification

All verification below was agent-executed on macOS with Bun 1.4.2.

  • Chromium exercised the actual empty-state components and VS Code message subscription: no hint for single-folder scope, correct multi-folder name and alternatives, live first-folder changes/removal, mouse dismissal, onboarding, and dark/light rendering. Keyboard dismissal also worked with the high-contrast theme. At 200px, the long-name hint had no horizontal overflow and its dismiss button remained inside the card.
  • A reload smoke supplied the VS Code webview-state API boundary and confirmed dismissal persisted while an unrelated saved-state field remained intact.
  • A disposable host smoke used the real KiloProvider and connection service with the repository's VS Code API harness. It exercised scope requests while disconnected, zero/one/multiple folders, reorder/removal events, explicit project/root overrides, reattachment, and disposal. All 11 assertions passed; the throwaway smoke was removed.
  • bun test tests/unit/kilo-provider-acknowledgement.test.ts tests/unit/kilo-provider-worktree-context.test.ts tests/unit/kilo-provider-route-integration.test.ts tests/unit/kilo-provider-load-messages.test.ts tests/unit/kilo-provider-session-refresh.test.ts tests/unit/kilo-provider-open-session.test.ts: 173 passed, zero failed.
  • bun run compile passed, including host/webview typechecks, lint, bundling, CLI version/models/sandbox-worker smoke checks, and SDK preparation. bun run knip, bun run check-kilocode-change, and focused Prettier passed.
  • Required pre-push typechecks passed, including JetBrains, using isolated Bun 1.4.2 and Java 21 runtimes. No hooks were bypassed.
  • CI follow-up: translated all three hint strings in the 20 non-English sidebar dictionaries and supplied the real VSCodeProvider in the existing recent-sessions fixture. The two affected test files now pass locally: 14 tests, zero failures. Host/webview typechecks, lint, and focused formatting passed.
  • Full local bun run test:unit: 6,874 passed, 2 skipped, 19 failed. All failures were in BrowserStream Chromium, beginning with a 10-second timeout and followed by closed-browser errors. No full local-suite pass is claimed, and no unrelated browser-stream code was changed.
  • A disposable Storybook smoke rendered the real notice and language provider in all 20 translated locales at 200px. Folder interpolation, localized dismiss labels, both alternatives, and dismissal worked without horizontal overflow; Arabic and Persian used right-to-left layout. This was not an independent native-speaker translation review.
  • Imported the four missing Linux Chromium baselines unchanged from visual-regression run 37757724293, artifact visual-regression-vscode-results (11540942845). No macOS screenshots were substituted.

Remote CI

For follow-up commit c95d9311b2da07c33bdabdcc98aaf9278ab6c11e, the extension unit job and webview visual-regression job both passed. Typechecks, Linux tests, docs build, links, and repository guards also passed. This is CI evidence, not personal or maintainer review.

Reviewer test steps

  1. Launch the development extension in a workspace with two folders, with a recognizable display name for the first one. Open an empty chat, including onboarding if applicable.
  2. Confirm the hint names only the first folder and explains both ways to work with another folder.
  3. Dismiss it, then reopen the empty state or reload the webview; it should remain dismissed for that folder.
  4. Change which folder is first, or remove folders until only one remains. Confirm the notice updates or disappears. Check a single-folder and an empty window also have no notice.
  5. Confirm an Agent Manager project does not show this sidebar-only scope notice, and that chat behavior and permissions are unchanged.

Verification limits

Native VS Code interaction was not exercised. Substitute verification used the actual Storybook-rendered webview plus the real provider's request/event path in the VS Code API harness. The full local unit run had the BrowserStream failures disclosed above; follow-up remote unit and visual jobs passed. Independent native-speaker translation review was not performed.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

Please reply here or mention @abdulhusainahk. AI-assisted implementation and verification. The contributor's personal-review checklist is marked complete; maintainer approval remains pending.

@github-actions github-actions Bot added area:docs Documentation area:vscode VS Code extension community Opened by someone outside the Kilo team labels Oct 9, 2026
@abdulhusainahk
abdulhusainahk marked this pull request as ready for review October 9, 2026 10:19
@abdulhusainahk
abdulhusainahk force-pushed the fix/14882-workspace-scope-hint branch from c95d931 to 6a199f2 Compare October 9, 2026 10:19
@kilo-code-bot

kilo-code-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (34 files)
  • packages/kilo-vscode/src/KiloProvider.ts
  • packages/kilo-vscode/webview-ui/src/components/chat/WorkspaceScopeHint.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/SidebarEmptyState.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/WelcomeEmptyState.tsx
  • packages/kilo-vscode/webview-ui/src/stories/workspace-scope.stories.tsx
  • packages/kilo-vscode/webview-ui/src/styles/welcome.css
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/webview-messages.ts
  • packages/kilo-vscode/tests/setup/vscode-mock.ts
  • packages/kilo-vscode/tests/fixtures/welcome-recent-sessions.tsx
  • packages/kilo-vscode/webview-ui/src/i18n/*.ts (en + 20 locales)
  • .changeset/workspace-scope-hint.md
  • 4 Linux visual-regression baselines (PNG, LFS)

Reviewed by deepseek-v4.1-flash · Input: 115K · Output: 23.4K · Cached: 2.2M

Review guidance: REVIEW.md from base branch main

@abdulhusainahk

Copy link
Copy Markdown
Author

@WebReflection This first-folder workspace-scope notice is ready for maintainer review. The latest automated review reports No Issues Found, the unit/typecheck/visual jobs pass, and the contributor personal-review checklist is marked complete. The stale draft wording in the description is corrected; no code changed in this follow-up.

Please review when you have capacity. The notice only explains existing sidebar scope and does not change session routing, permissions, or editor context.

@github-actions github-actions Bot added the needs-triage Waiting for a maintainer to look label Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentation area:vscode VS Code extension community Opened by someone outside the Kilo team needs-triage Waiting for a maintainer to look

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show that Kilo chat uses only the first folder in a multi-root VS Code workspace

3 participants