Handle workspace-local TypeScript LSP & repair#58
Merged
Conversation
Add workspace-local detection and selection for typescript-language-server and surface an actionable repair flow in the UI. Introduces a custom_binary_config on LspServerConfig and implements resolution order (user-configured, workspace-local, managed, then PATH) via resolve_lsp_binary_config; includes helper types and tests. The TypeScript candidate now looks for workspace wrappers (node_modules/.bin) and package entrypoints, verifying them with node before selecting them. UI changes show an "Install/repair" button and custom status text when the TypeScript LSP fails with a repairable error, and ensure reinstall removal is triggered when installing. Also improve macOS run script to wait for and tail the correct log file per channel.
Replace the old "Endpoints used" section with a comprehensive concept model and API contract for cast_agent. Adds definitions for Session, Conversation, Run, Message, and Substrate; documents existing endpoints (health, messages, sessions, WS streaming), proposes a Runs surface (start/list/get/events/cancel/artifacts), and outlines Substrate wire format and producer responsibilities. Includes error/degraded-mode behavior, implemented vs proposed status table, API gaps and a prioritized minimal rollout, and small updates to Comux/feature-gating notes.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds workspace-aware TypeScript LSP binary resolution and a repair-oriented settings UI, plus updates macOS launch logging and Cast Agent documentation.
Changes:
- Adds LSP binary source resolution with workspace-local TypeScript detection before managed/PATH fallback.
- Adds TypeScript LSP install/repair UI behavior for repairable startup failures.
- Updates macOS run log tailing and expands Cast Agent gateway/API documentation.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
script/macos/run |
Selects channel-specific log paths and waits before tailing logs. |
crates/lsp/src/supported_servers.rs |
Adds binary source resolution types, actionable missing-binary messages, and tests. |
crates/lsp/src/servers/typescript_language_server.rs |
Detects workspace-local TypeScript LSP wrappers and package entrypoints. |
crates/lsp/src/config.rs |
Applies new binary resolution order when building LSP commands. |
crates/cast_agent/src/gateway.rs |
Updates gateway module docs around substrate handling. |
CAST-AGENT.md |
Expands Cast Agent concept/API documentation and proposed run/substrate contracts. |
app/src/settings_view/code_page.rs |
Adds TypeScript LSP repair status text and install/repair action. |
Comments suppressed due to low confidence (1)
app/src/settings_view/code_page.rs:2103
- The repair button visibility is determined by matching a duplicated display string in the error. That makes the action disappear if the LSP error wording changes; use a shared constant or typed repairable-error signal instead of parsing UI-facing text.
matches!(
model.as_ref(app).state(),
LspState::Failed { error } if error.contains(TYPESCRIPT_LSP_REPAIR_LABEL)
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot stopped work on behalf of
BunsDev due to an error
May 18, 2026 10:19
Member
Author
|
@copilot apply changes based on the comments in this thread |
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
Copilot stopped work on behalf of
BunsDev due to an error
May 18, 2026 11:03
Copilot stopped work on behalf of
BunsDev due to an error
May 18, 2026 11:04
# Conflicts: # app/src/settings_view/code_page.rs # crates/lsp/src/config.rs # crates/lsp/src/supported_servers.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add workspace-local detection and selection for typescript-language-server and surface an actionable repair flow in the UI. Introduces a custom_binary_config on LspServerConfig and implements resolution order (user-configured, workspace-local, managed, then PATH) via resolve_lsp_binary_config; includes helper types and tests. The TypeScript candidate now looks for workspace wrappers (node_modules/.bin) and package entrypoints, verifying them with node before selecting them. UI changes show an "Install/repair" button and custom status text when the TypeScript LSP fails with a repairable error, and ensure reinstall removal is triggered when installing. Also improve macOS run script to wait for and tail the correct log file per channel.