Skip to content

IDE: tree views, view containers, menus and when clauses for VS Code extensions (#261, part 1) - #294

Merged
aMonteSl merged 2 commits into
idefrom
claude/project-thread-keii8k
Nov 27, 2026
Merged

aMonteSl merged 2 commits into
idefrom
claude/project-thread-keii8k

Conversation

@aMonteSl

@aMonteSl aMonteSl commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Adrián · project thread

Part 1 of #261 (epic #251). Webviews come in part 2.

What it adds

  • View containers (viewsContainers.activitybar / .panel) as activity bar items with the extension's icon; views in their own container or as sections under Explorer, Source Control and Run and Debug.
  • Tree views: window.createTreeView and registerTreeDataProvider with lazy children, labels with highlights, descriptions, tooltips, codicons (Monaco's font) and image icons, resourceUri file icons, checkboxes, multi-select, reveal, onDidChangeTreeData, selection/visibility/expand events, title, description, message, badge and resolveTreeItem. Elements stay in the host behind opaque handles.
  • viewsWelcome with command buttons and links.
  • Menus: view/title, view/item/context (inline buttons and right click), editor/title, editor/title/context, editor/context (Monaco) and explorer/context; enablement and commandPalette when.
  • when clauses with VS Code's grammar over setContext keys and the workbench's own (view, viewItem, resource*, editorLangId, isWorkspaceTrusted, config.*...).
  • Docs: docs/ide/extensions.md.

Security

  • Icon files are inlined by the main process as data URLs only from an enabled extension's folder or the workspace (max 256 KB); the renderer never loads a file URL.
  • Requests from the renderer are validated field by field (parseViewRequest); tree resources go through the workspace path rules.

Testing

  • npm test in apps/ide: 846 tests, typecheck and lint clean; test/extensionViews.test.ts covers the when-clause parser, protocol helpers, contributions, icon inlining, menus, context keys and a real host with a tree provider.
  • Checked in the built IDE under Electron with a sample extension (two views, a setContext-gated view in the explorer, welcome content, every supported menu, inline action that edits the file and refreshes the tree).

… Code extensions (#261)

- Extensions' view containers in the activity bar, views in their own
  containers or under Explorer, Source Control and Run and Debug
- window.createTreeView / registerTreeDataProvider with lazy children,
  icons, checkboxes, reveal, title, message and badge; elements stay in
  the host behind opaque handles
- viewsWelcome, view/title, view/item/context, editor/title,
  editor/title/context, editor/context and explorer/context menus
- VS Code's when-clause grammar over setContext and workbench keys;
  enablement and commandPalette when
- Codicons from Monaco's font; icon files inlined by the main process
  only from an enabled extension or the workspace
@aMonteSl aMonteSl self-assigned this Nov 27, 2026
@aMonteSl
aMonteSl merged commit d2c0291 into ide Nov 27, 2026
11 checks passed
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