Skip to content

fix(lsp): advertise codeActionProvider in server capabilities#3358

Open
MFS-code wants to merge 1 commit intoBoundaryML:canaryfrom
MFS-code:canary
Open

fix(lsp): advertise codeActionProvider in server capabilities#3358
MFS-code wants to merge 1 commit intoBoundaryML:canaryfrom
MFS-code:canary

Conversation

@MFS-code
Copy link
Copy Markdown

@MFS-code MFS-code commented Apr 13, 2026

The server implements textDocument/codeAction but did not set code_action_provider in initialize, so spec-compliant clients never requested code actions. Import CodeActionProviderCapability for the capability value.

Summary by CodeRabbit

  • New Features
    • Code actions are now supported and enabled in the language server. This provides in-editor suggestions, quick fixes, and refactor hints for detected issues, improving development productivity and reducing manual edits. Users will see actionable prompts and automated fixes where applicable, streamlining common code edits and diagnostics.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

@MFS-code is attempting to deploy a commit to the Boundary Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3588a4b9-f783-4206-b263-ef6a529c8124

📥 Commits

Reviewing files that changed from the base of the PR and between a34959c and c157ec4.

📒 Files selected for processing (1)
  • baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs

📝 Walkthrough

Walkthrough

The LSP server capability advertisement now advertises code action support by setting code_action_provider to Some(CodeActionProviderCapability::Simple(true)) and adds the corresponding CodeActionProviderCapability import.

Changes

Cohort / File(s) Summary
LSP Server Capabilities
baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs
Enable code actions in the LSP server by changing code_action_provider from None to Some(CodeActionProviderCapability::Simple(true)) and add CodeActionProviderCapability to the imports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hopped through code with glee,

Enabled actions for you and me,
A simple flag, a tiny cheer,
Now editors will help engineers! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enabling codeActionProvider advertisement in LSP server capabilities, which directly matches the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs (1)

18-32: Add a unit test to lock this handshake behavior.

Please add a small unit test asserting server_capabilities().code_action_provider is enabled, so this regression does not reappear.

As per coding guidelines "Prefer writing Rust unit tests over integration tests where possible".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs` around
lines 18 - 32, Add a unit test in the same module (e.g., inside request.rs under
#[cfg(test)] mod tests) that calls server_capabilities() and asserts the
code_action_provider is enabled; specifically verify
server_capabilities().code_action_provider is
Some(CodeActionProviderCapability::Simple(true)) (or use a matches! assertion)
so the expectation is locked in and future regressions are caught. Ensure the
test imports ServerCapabilities/CodeActionProviderCapability as needed and is a
normal #[test] unit test so it runs with cargo test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs`:
- Around line 18-32: Add a unit test in the same module (e.g., inside request.rs
under #[cfg(test)] mod tests) that calls server_capabilities() and asserts the
code_action_provider is enabled; specifically verify
server_capabilities().code_action_provider is
Some(CodeActionProviderCapability::Simple(true)) (or use a matches! assertion)
so the expectation is locked in and future regressions are caught. Ensure the
test imports ServerCapabilities/CodeActionProviderCapability as needed and is a
normal #[test] unit test so it runs with cargo test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4faef7b4-8056-431b-80c4-d7843e293525

📥 Commits

Reviewing files that changed from the base of the PR and between 138a702 and a34959c.

📒 Files selected for processing (1)
  • baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs

@sxlijin sxlijin enabled auto-merge April 13, 2026 21:01
@sxlijin
Copy link
Copy Markdown
Contributor

sxlijin commented Apr 13, 2026

Thanks!

auto-merge was automatically disabled April 14, 2026 16:29

Head branch was pushed to by a user without write access

The server implements textDocument/codeAction but did not set
code_action_provider in initialize, so spec-compliant clients never
requested code actions. Import CodeActionProviderCapability for the
capability value.
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