Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Workspace and project explorer

Platform spec feature

Workspace and project explorer

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

What this feature specifies

Tree views and focus coordination for Beskid workspaces and the active Project.proj, backed by LSP executeCommands.

Implementation anchors

  • beskid_vscode/src/workspace/WorkspaceTreeProvider.ts, ProjectTreeProvider.ts, FocusCoordinator.ts
  • beskid_vscode/src/workspace/lspProjectApi.ts
  • compiler/crates/beskid_lsp/src/project_explorer_api.rs

Contract statement

The workspace and project explorer exposes two Beskid activity-bar tree views. Workspaces lists every Workspace.proj under open VS Code folders and their declared members. Project shows the focused Project.proj (targets, dependencies, source folders) using LSP graph data—never duplicate manifest parsing in TypeScript.

Inputs and outputs

InputSource
VS Code workspace foldersEditor
Focused project URIbeskid.project.autoSelectFromEditor, tree selection, or beskid.selectProject
LSP executeCommandsbeskid.listWorkspaces, beskid.getWorkspaceSummary, beskid.getProjectGraph, beskid.getProjectDependencies
OutputConsumer
Focus changeLSP focusedProjectUri via init options + workspace/didChangeConfiguration
Tree labels / commandsVS Code UI

State model

  • Focused project — canonical file:// URI of a Project.proj; persisted in workspace state as beskid.focusedProjectUri (legacy beskid.selectedProjectUri alias for one release).
  • Workspace cache — refreshed on beskid.refreshWorkspace and file watchers for *.proj, Project.lock, workspace.package.json.

Algorithms and flow

  1. Extension activates → start LSP with initializationOptions.focusedProjectUri.
  2. Workspaces view calls beskid.listWorkspaces → render members; member click runs beskid.focusProject.
  3. Project view reads focused URI → beskid.getProjectDependencies / beskid.getProjectGraph for children.
  4. Optional auto-select: active editor path → nearest Project.proj when beskid.project.autoSelectFromEditor is true.
  5. Focus change updates configuration without full LSP restart unless server binary settings change.

Decisions

No open decisions. D-TOOL-VSC-0001 (LSP-backed graph), 0002 (focus without LSP restart)—see adr/ and the ADRs tab.

Articles