Parser drift.
Flow and algorithm
Platform spec article
Flow and algorithm
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”End-to-end sequences from extension activation through tree population and focus synchronization.
Activation and LSP start
Section titled “Activation and LSP start”sequenceDiagram participant VS as VS Code participant Ext as Extension participant LSP as beskid_lsp VS->>Ext: activate Ext->>Ext: read workspaceState.focusedProjectUri Ext->>LSP: start LanguageClient (initializationOptions.focusedProjectUri) LSP-->>Ext: initialized Ext->>LSP: executeCommand beskid.listWorkspaces LSP-->>Ext: workspaces[] Ext->>Ext: populate WorkspaceTreeProvider alt focusedProjectUri set Ext->>LSP: executeCommand beskid.getProjectGraph LSP-->>Ext: graph JSON Ext->>Ext: populate ProjectTreeProvider end- Extension must start the language client before populating trees (commands are server-backed).
- If no focus is stored, extension may defer Project view population until auto-select or user picks a member.
Member selection flow
Section titled “Member selection flow”- User activates a member node in
beskidWorkspaceView. - Extension sets
focusedProjectUri = member.uri. - Extension persists workspace state and sends configuration notification to LSP (no restart).
- Extension refreshes
beskidProjectView, outline, and package panel local section (parallelgetProjectGraph+getProjectDependencies). - Status bar may show project name briefly (non-blocking).
Auto-select from editor
Section titled “Auto-select from editor”onDidChangeActiveTextEditorfires with document URI.- If
beskid.project.autoSelectFromEditoris false, stop. - Resolve
Project.projfor editor path; if none, stop. - If resolved URI equals current focus, stop.
- Set focus and run member selection steps 3–4.
Debounced workspace refresh
Section titled “Debounced workspace refresh”- File watcher fires (manifest, lock,
.bd, orworkspace.package.json). - Extension debounces (≥300ms coalescing).
executeCommand('beskid.refreshWorkspace').- Re-fetch
beskid.listWorkspaces; if focus still valid, re-fetch graph and dependencies. - Fire
onDidChangeTreeDataon both providers.
Reveal in tree
Section titled “Reveal in tree”| Command | Behavior |
|---|---|
beskid.revealInWorkspaceTree | Expand workspace containing focus; reveal member or workspace root |
beskid.revealInProjectTree | Reveal focused Project.proj root and scroll to dependency/target node when arg node id provided |
Both must be available from editor title/context when a Beskid file is active.
Verification notes
Section titled “Verification notes”- Flow tests should mock LSP executeCommand and assert ordering:
listWorkspacesbeforegetProjectGraphon cold start. - Changing
focusedProjectUrimust not appear in logs as a full language-client restart.