API: expose panel/sidebar/auxiliaryBar visibility state to extensions
@benibenj is already working on this.
Since Jun 16, 2026.
Assessment
This issue has not been assessed yet.
Description
Problem
There is no public Extension API to query whether the sidebar, panel (bottom), or auxiliary bar are currently visible. The internal IWorkbenchLayoutService has exactly what's needed — isVisible("workbench.parts.sidebar") and onDidChangePartVisibility — but neither is bridged to the extension host.
As a result, extensions that need to save and restore layout state (e.g. a "maximize editor" toggle) have no reliable way to read the current visibility of these three parts. The only workaround is to parse VS Code's internal SQLite database (state.vscdb) directly, which is fragile and reads stale data mid-session.
The layout buttons in the VS Code title bar already track this state correctly because they run in the renderer process with direct access to the layout service. Extensions cannot do the same.
Proposed API
Add to vscode.window:
/**
* Whether the primary sidebar is currently visible.
*/
readonly isSideBarVisible: boolean;
/**
* Whether the bottom panel is currently visible.
*/
readonly isPanelVisible: boolean;
/**
* Whether the auxiliary bar (secondary sidebar) is currently visible.
*/
readonly isAuxiliaryBarVisible: boolean;
/**
* Fired when the visibility of the sidebar, panel, or auxiliary bar changes.
*/
readonly onDidChangeLayoutVisibility: Event<{
sideBar: boolean;
panel: boolean;
auxiliaryBar: boolean;
}>;
Use Case
A "maximize editor" extension needs to:
- Read current visibility of all three parts before hiding them
- Restore only the parts that were originally visible
Without this API, if the user hides the bottom panel manually before pressing maximize, the extension has no way to know — and incorrectly restores it on unmaximize.
This is a general-purpose API gap: any extension that interacts with workbench layout (focus modes, presentation modes, Zen-like toggles) hits the same wall.
Current Workaround (and why it's bad)
Read ~/.config/Code/User/workspaceStorage/<hash>/state.vscdb directly via a custom SQLite B-tree parser. Problems:
- Only accurate at window open (VS Code flushes the DB on close, not on toggle)
- Relies on undocumented internal key names (
workbench.sideBar.hidden, etc.) - Breaks if VS Code changes its storage format
Prior Art
- Context keys
sideBarVisible,panelVisible,auxiliaryBarVisiblealready exist internally and are kept in sync viaonDidChangePartVisibility - These are used in
whenclauses inpackage.jsonbut cannot be read at runtime by extension code - Exposing them (or wrapping
isVisible()) would be a small bridge with high utility
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·