Skip to content

fix(vscode): preserve Explorer after window reload - #10951

Merged
lambertjosh merged 2 commits into
mainfrom
fix/vscode-preserve-sidebar-on-reload
Jun 5, 2026
Merged

fix(vscode): preserve Explorer after window reload#10951
lambertjosh merged 2 commits into
mainfrom
fix/vscode-preserve-sidebar-on-reload

Conversation

@lambertjosh

@lambertjosh lambertjosh commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stop treating hidden Kilo view state as closed primary-sidebar state
  • let VS Code restore Explorer and other primary sidebar views without Kilo closing them after activation
  • add a regression guard while preserving Kilo's live visibility context and stream handling

Kilo previously persisted WebviewView.visible as sidebar state, then ran the global workbench.action.closeSidebar command during startup when Kilo itself was hidden. This closed Explorer shortly after a window reload even though the primary sidebar was meant to remain open.

Before

f7f7bbf.mp4

After

Screen.Recording.2026-06-05.at.10.29.14.AM.mov

@lambertjosh
lambertjosh marked this pull request as ready for review June 5, 2026 14:30
@lambertjosh

Copy link
Copy Markdown
Contributor Author

@kilo-code-bot

kilo-code-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/tests/unit/extension-arch.test.ts Regression guard mentioned in PR description is absent from final state
Other Observations (not in diff)

Missing regression test (PR description vs. actual state):

The PR description says "add a regression guard while preserving Kilo's live visibility context and stream handling". Commit 54534bd adds the guard (an "Extension — sidebar visibility" describe block in extension-arch.test.ts), but commit ca5c4d9 then removes it, leaving the final PR with no regression test at all. The test file is net-unchanged from main.

The guard is meaningful — it enforces workbench.action.closeSidebar and onSidebarVisibilityChange don't reappear in the codebase, which is exactly the kind of regression that originally caused this bug. Consider re-adding the test from 54534bd (or keeping a stripped version without the KILO_PROVIDER_OPTIONS_FILE reference if that was the only issue).

Stale workspaceState key (benign):

Existing users who had { sidebar: false } written to workspaceState under RESTORE_KEY by the old code will retain that stale key. The new RestoreState type simply ignores unknown keys so this is harmless, but a one-time cleanup (context.workspaceState.update(RESTORE_KEY, { agentManager: restore.agentManager })) would be hygienic. Not blocking.

Files Reviewed (4 files)
  • .changeset/steady-sidebar-reload.md — changeset looks correct, user-facing description is clear
  • packages/kilo-vscode/src/KiloProvider.tsonSidebarVisibilityChange call removed cleanly; setStreamVisibility and sidebarVisible context key are preserved
  • packages/kilo-vscode/src/extension.tscloseSidebar logic and sidebar field removed cleanly from RestoreState; agentManager restore path is unaffected
  • packages/kilo-vscode/src/kilo-provider/options.tsonSidebarVisibilityChange option removed

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 913,417 tokens

Review guidance: REVIEW.md from base branch main

@lambertjosh
lambertjosh merged commit 6ba7c84 into main Jun 5, 2026
21 checks passed
@lambertjosh
lambertjosh deleted the fix/vscode-preserve-sidebar-on-reload branch June 5, 2026 17:21
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…idebar-on-reload

fix(vscode): preserve Explorer after window reload
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.

3 participants