Parser drift.
Design model
Platform spec article
Design model
Spec standingStandard
-
LSP graph
Context
Decision
Graph via LSP executeCommand.
Consequences
Thin wrappers.
Verification anchors
beskid_lsp handlers.
-
Focus without restart
Context
UX on focus.
Decision
didChangeConfiguration for focus; no LSP restart.
Consequences
Fast focus switch.
Verification anchors
Session invalidation.
- Contracts and edge cases focusedProjectUri, LSP executeCommand JSON schemas, and explorer edge-case rules.
- Decisions record (legacy index) Migration index for workspace and project explorer ADRs.
- Design model Tree item model, focus state, icons, and multi-root labeling for workspace and project explorers.
- Examples Corelib workspace and single-application explorer scenarios.
- Flow and algorithm Activation, LSP init, tree refresh, auto-select, and reveal flows for workspace and project explorers.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose and scope
Section titled “Purpose and scope”This article defines the data and UI model for Workspaces (beskidWorkspaceView) and Project (beskidProjectView) tree views, FocusedProjectState, and how they connect to LSP payloads.
Focused project state
Section titled “Focused project state”| Field | Type | Meaning |
|---|---|---|
focusedProjectUri | string (file URI) | Canonical Project.proj URI driving outline, packages “This project”, and LSP ordering |
workspaceUri | string | null | Parent Workspace.proj URI when the focused project is a workspace member |
memberId | string | null | Workspace member id from Workspace.proj when applicable |
The extension must persist focusedProjectUri in ExtensionContext.workspaceState under key beskid.focusedProjectUri and must push the same value to the LSP on change (see contracts).
Workspaces tree shape
Section titled “Workspaces tree shape”flowchart TB subgraph workspacesView [beskidWorkspaceView] W1[Workspace root] W1 --> M1[Member: Project.proj] W1 --> M2[Member: ...] W1 --> WP[workspace.package.json hint] end| Node kind | Children source | Default action on click |
|---|---|---|
| Workspace root | beskid.listWorkspaces → one entry per Workspace.proj | Expand/collapse |
| Member | members[] on workspace entry | Set focus to member uri; refresh project/outline/packages views |
| Registry hint | Static label when workspace.package.json exists beside Workspace.proj | Open file in editor |
Icons: workspace root root-folder; member folder-library; registry hint package.
Project tree shape
Section titled “Project tree shape”Root must be the focused Project.proj node. Children must be built from beskid.getProjectGraph and must include:
| Child section | Source | Notes |
|---|---|---|
| Targets | nodes[] where kind === "target" | One node per declared target |
| Dependencies | nodes[] / edges[] with kind === "dependency" | Tooltip shows materialized path when present in graph metadata |
| Source folders | nodes[] where kind === "sourceRoot" | Opens folder or first .bd on click |
| Unresolved | unresolved[] | Warning icon; label includes dependency name and descriptor |
Multi-root labeling
Section titled “Multi-root labeling”When vscode.workspace.workspaceFolders.length > 1, any label that could collide across folders must use the format:
{workspaceFolderName} / {localLabel}
where workspaceFolderName is the VS Code folder name, not the on-disk path.
Auto-select from editor
Section titled “Auto-select from editor”When setting beskid.project.autoSelectFromEditor is true (default true), the extension must on onDidChangeActiveTextEditor:
- Map the editor file path to a containing directory.
- Walk upward to find
Project.proj(same discovery rules as CLI/LSPdiscover_project_file). - If the project is a workspace member, set
workspaceUriandmemberIdfrombeskid.getWorkspaceSummarywhen needed. - Update
focusedProjectUriwithout user confirmation unless the new project differs from focus andbeskid.project.confirmAutoFocusis true (optional setting; default false).
File watchers
Section titled “File watchers”The extension must register watchers (debounced, ≥300ms) for:
**/*.{bd,proj}**/Project.lock**/workspace.package.json
On fire: debounced beskid.refreshWorkspace, then refresh both tree providers.
Canonical references
Section titled “Canonical references”- Parent hub: Workspace and project explorer
- LSP JSON contracts: Contracts and edge cases
- Manifest semantics: Workspace and lock contracts