Skip to content

fix(lsp): resolve authoring and hover quality issues - #4227

Merged
sxlijin merged 1 commit into
canaryfrom
agent/fix-lsp-authoring-hover-issues
Jul 29, 2026
Merged

sxlijin merged 1 commit into
canaryfrom
agent/fix-lsp-authoring-hover-issues

Conversation

@sxlijin

@sxlijin sxlijin commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add exhaustive regression coverage for the 22 concrete LSP issues tracked under B-1022, with 21 reproduced and fixed and B-966 verified already fixed on current backtick-template syntax
  • extend hover resolution across literals, primitives, keywords, config keys, schema attributes, authored declarations, LLM parameters, inferred members, narrowed locals, generics, bounds, type variables, and explicit throws never
  • centralize builtin type aliases, schema attributes, client configuration keys, and language/keyword documentation in shared registries consumed by validation, the CLI, and the LSP
  • expose builtin aliases and intrinsic language topics through baml describe, including baml describe alias
  • specialize member completion details with receiver generic arguments
  • add top-level declaration snippets and preserve snippet format through the LSP conversion boundary
  • classify missing standalone playground configuration as an expected INFO condition while preserving ERROR for real playground failures

Reproduction coverage

The new baml_lsp2_actions_tests fixtures cover B-966 through B-986, including the cross-project B-972 issue. B-982 uses a direct action-level completion assertion because the fixture DSL only asserts completion labels. B-1001 is below the action boundary, so it has server unit coverage plus an exact process-level verification.

No characterization-only assertions remain: every reproduced action issue is committed as a positive regression.

Validation

  • cargo fmt --all --check
  • cargo check -p baml_base -p baml_type -p baml_builtins2 -p baml_compiler2_hir -p baml_lsp2_actions -p baml_cli
  • cargo clippy -p baml_base -p baml_type -p baml_builtins2 -p baml_compiler2_hir -p baml_lsp2_actions --lib -- -D warnings
  • cargo test -p baml_type --lib
  • cargo test -p baml_builtins2 --lib
  • cargo test -p baml_lsp2_actions --lib
  • cargo test -p baml_lsp2_actions_tests --lib lsp_issues_basic_hover
  • cargo test -p baml_cli --lib describe_command_tests
  • targeted baml_tests coverage for duplicate attributes and attribute validation
  • standalone baml-cli lsp reproduction exits 0 and logs absent playground configuration at INFO, with no false ERROR

Tracks Linear B-1022 and its concrete LSP issue inventory.

Summary by CodeRabbit

  • New Features
    • Top-level completion keywords now insert editable snippet templates.
    • Completion items now indicate whether inserted text is plain text or a snippet.
    • Hover/type-info rendering is more precise and cursor-aware, including improved generic field/member detail, symbol/keyword documentation, and consistent throws never signatures.
  • Bug Fixes
    • Playground startup “not configured” is now treated as informational instead of an error.
  • Tests
    • Added/expanded LSP tests covering snippet completion insertion, cursor-sensitive hover behavior, and generic instantiation correctness.

Fixes B-1022

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR centralizes language metadata, adds builtin type resolution, expands hover and completion behavior, adds extensive LSP regression coverage, and distinguishes missing playground configuration from other server failures in logs.

Changes

Shared language metadata and builtin resolution

Layer / File(s) Summary
Language metadata registries
baml_language/crates/baml_base/..., baml_language/crates/baml_builtins2/...
Schema attributes, client configuration keys, keyword topics, and crosswalk topics are defined in shared typed registries backed by embedded YAML.
Builtin type and CLI resolution
baml_language/crates/baml_type/..., baml_language/crates/baml_lsp2_actions/..., baml_language/crates/baml_cli/..., baml_language/crates/baml_compiler2_hir/...
Builtin aliases and targets use centralized type-name resolution; CLI descriptions and schema-attribute validation consume shared metadata.

LSP completion and hover enhancements

Layer / File(s) Summary
Snippet completions and generic member types
baml_language/crates/baml_lsp2_actions/..., baml_language/crates/bex_project/..., baml_language/crates/baml_lsp2_actions_tests/...
Completion items distinguish plain text from snippets, declaration keywords use templates, generic class members show substituted types, and LSP conversion preserves snippet metadata.
Documentation and symbol hover resolution
baml_language/crates/baml_lsp2_actions/src/type_info.rs, baml_language/crates/baml_lsp2_actions/src/describe.rs
Hover resolution covers literals, builtins, keywords, attributes, configuration keys, generic parameters, declarations, inferred members, bounds, and throws never.
Hover regression coverage
baml_language/crates/baml_lsp2_actions_tests/..., baml_language/crates/baml_lsp2_actions/src/type_info_tests.rs
Unit tests and fixtures verify hover output for documentation, declarations, literals, configuration, interpolation, generic members, narrowed bindings, and signatures.

Playground exit classification

Layer / File(s) Summary
Playground configuration exit handling
baml_language/crates/baml_lsp_server/...
Missing playground configuration now uses a typed error and is logged at info severity; unrelated failures remain error-level and the mapping is tested.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested reviewers: codeshaunted

Poem

A rabbit hopped through hover’s glow,
With snippets lined up in a row.
Generic fields now know their type,
While playground logs stay nice and bright.
“Thump-thump!” said Bun, “the tests all grow!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main focus on LSP authoring and hover fixes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fix-lsp-authoring-hover-issues

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.

@vercel

vercel Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview, Comment Jul 29, 2026 4:49am
promptfiddle Ready Ready Preview, Comment Jul 29, 2026 4:49am
promptfiddle2 Ready Ready Preview, Comment Jul 29, 2026 4:49am

Request Review

@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@vercel
vercel Bot temporarily deployed to Preview – beps July 27, 2026 21:14 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 27, 2026 21:21 Inactive
@github-actions

github-actions Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Binary size checks passed

✅ 7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
✅ baml-cli Linux 🔒 27.4 MB 11.7 MB file 27.3 MB +111.0 KB (+0.4%) OK
✅ packed-program Linux 🔒 17.8 MB 7.3 MB file 17.7 MB +30.6 KB (+0.2%) OK
✅ baml-cli macOS 🔒 21.3 MB 10.2 MB file 21.2 MB +82.8 KB (+0.4%) OK
✅ packed-program macOS 🔒 13.9 MB 6.4 MB file 13.9 MB +48 B (+0.0%) OK
✅ baml-cli Windows 🔒 23.0 MB 10.4 MB file 22.9 MB +110.6 KB (+0.5%) OK
✅ packed-program Windows 🔒 14.8 MB 6.5 MB file 14.8 MB +15.2 KB (+0.1%) OK
✅ bridge_wasm WASM 16.8 MB 🔒 4.6 MB gzip 4.5 MB +46.8 KB (+1.0%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 27, 2026 21:35 Inactive
@sxlijin
sxlijin marked this pull request as ready for review July 28, 2026 19:15
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch 2 times, most recently from 6f0baa0 to b0e2133 Compare July 28, 2026 19:18
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 19:19 Inactive

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31a6007b34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +264 to +265
if let Some(info) = primitive_type_info(&token) {
return Some(info);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve primitive-named symbols before showing primitive docs

When an ordinary declaration or member is named string, int, bool, etc., this unconditional early return reports the built-in primitive documentation instead of the symbol's actual type. For example, hovering either the declaration or use of class Row { string int } / row.string now displays “A UTF-8 encoded string” rather than string: int; primitive documentation needs to be restricted to type/static-primitive contexts or attempted after symbol/member resolution.

Useful? React with 👍 / 👎.

Comment on lines +972 to +974
let in_llm_body = item_data::function_llm_meta(db, loc).is_some()
&& range_contains(source_map.span, offset);
on_declaration || in_llm_body

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Verify LLM parameter references before applying the fallback

Inside a declarative LLM function, in_llm_body accepts every token whose text matches any parameter, without checking whether that occurrence resolves to the parameter. Thus, if parameter subject coexists with an expression such as email.subject, hovering the field returns the parameter's type instead of the inferred field type because this fallback runs before member_type_info_at; limit the fallback to bare parameter references or consult the token's inferred resolution.

Useful? React with 👍 / 👎.

@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from b0e2133 to d793ae2 Compare July 28, 2026 19:25
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 19:26 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
baml_language/crates/baml_lsp2_actions/src/completions.rs (1)

1157-1172: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider extracting the generic-specialization logic shared with resolve_field_type.

Lines 1158-1166 duplicate the class_generic_params → bind_type_vars → resolve_class_fields → substitute_ty pipeline from resolve_field_type (Lines 1043-1051). A small helper (e.g. specialized_class_fields(db, class_loc, type_args) -> Vec<(Name, Ty)>) would keep both paths from drifting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_lsp2_actions/src/completions.rs` around lines 1157
- 1172, The generic specialization pipeline is duplicated between the completion
field loop and resolve_field_type. Extract it into a shared helper, such as
specialized_class_fields, that binds class_generic_params, resolves class
fields, substitutes each field type, and returns the specialized field name/type
pairs; update both callers to use this helper while preserving existing field
attributes and completion behavior.
baml_language/crates/baml_lsp2_actions/src/type_info.rs (1)

672-673: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

sort_by_key then taking the first element can be min_by_key.

Same for function_parameter_type_info_at (Lines 977-991) — only the minimum candidate is used, so a full sort isn't needed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_lsp2_actions/src/type_info.rs` around lines 672 -
673, Replace the full candidate sorting in the visible type-info selection logic
with min_by_key, selecting the candidate with the smallest span length directly.
Apply the same change in function_parameter_type_info_at, preserving the
existing tuple destructuring and optional return behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@baml_language/crates/baml_lsp2_actions/src/type_info.rs`:
- Around line 443-444: The primitive_type_info and literal_type_info helpers
currently classify tokens by text alone, shadowing identifiers before type
resolution. Update both match paths to require the appropriate primitive or
literal SyntaxKind (or an equivalent type-reference context), including the arms
around the true/false/null cases, while preserving documentation for genuine
keyword literals and allowing WORD tokens to reach name resolution in type_at.
- Around line 935-938: Update the throws-clause construction in the interface
method signature renderer to default to " throws never", matching
render_function_data_signature. Preserve the existing formatted clause when
method.throws contains a type reference.

In `@baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs`:
- Around line 895-900: Track the client’s completion-item snippetSupport
capability during initialize, then update completion conversion around
item.insert_text_format to avoid emitting InsertTextFormat::SNIPPET when
unsupported. For clients without support, downgrade the snippet by removing or
sanitizing tabstops and ensure the resulting completion does not expose raw
snippet syntax.

---

Nitpick comments:
In `@baml_language/crates/baml_lsp2_actions/src/completions.rs`:
- Around line 1157-1172: The generic specialization pipeline is duplicated
between the completion field loop and resolve_field_type. Extract it into a
shared helper, such as specialized_class_fields, that binds
class_generic_params, resolves class fields, substitutes each field type, and
returns the specialized field name/type pairs; update both callers to use this
helper while preserving existing field attributes and completion behavior.

In `@baml_language/crates/baml_lsp2_actions/src/type_info.rs`:
- Around line 672-673: Replace the full candidate sorting in the visible
type-info selection logic with min_by_key, selecting the candidate with the
smallest span length directly. Apply the same change in
function_parameter_type_info_at, preserving the existing tuple destructuring and
optional return behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6340bb9e-63ff-4dc2-8f5e-0582cd7ec92f

📥 Commits

Reviewing files that changed from the base of the PR and between d0dbf79 and d793ae2.

⛔ Files ignored due to path filters (2)
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__describe_tests__describe_function.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__describe_tests__describe_function_with_enum_param.snap is excluded by !**/*.snap
📒 Files selected for processing (31)
  • baml_language/crates/baml_lsp2_actions/src/completions.rs
  • baml_language/crates/baml_lsp2_actions/src/describe.rs
  • baml_language/crates/baml_lsp2_actions/src/lib.rs
  • baml_language/crates/baml_lsp2_actions/src/type_info.rs
  • baml_language/crates/baml_lsp2_actions/src/type_info_tests.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lib.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_authoring.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_generic_hover.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b966_template_interpolation_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b967_config_block_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b974_top_level_snippet_completion.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b976_type_attribute_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_968_builtin_function.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_969_enum_variant.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_970_primitive_types.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_971_class_member_references.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_972_literal_values.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_973_llm_function_arguments.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_975_keywords.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_977_method_and_field_declarations.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_978_interface_method_parameters.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b979_interface_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b980_generic_bounds.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b981_typevar_hover.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b983_item_access_shadowing.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b984_parameter_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b985_narrowed_binding.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b986_implicit_throws_never.baml
  • baml_language/crates/baml_lsp_server/src/lib.rs
  • baml_language/crates/baml_lsp_server/src/playground_server.rs
  • baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 19:34 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
baml_language/crates/baml_lsp2_actions/src/type_info.rs (1)

757-775: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Duplicate enum-variant declaration rendering. The "{Enum}.{Variant}: {Enum}" format is built here and again in member_type_info_at (Lines 1113-1121). Extracting a small helper (e.g. render_enum_variant_declaration(enum_data, variant_name)) keeps the two hover paths from drifting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@baml_language/crates/baml_lsp2_actions/src/type_info.rs` around lines 757 -
775, Extract the duplicated enum-variant declaration formatting from the shown
enum lookup and member_type_info_at into a shared helper such as
render_enum_variant_declaration. Update both hover paths to call the helper
while preserving the existing "{Enum}.{Variant}: {Enum}" output.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@baml_language/crates/baml_lsp2_actions/src/type_info.rs`:
- Around line 1500-1508: Update the parameter hover rendering in the
DefinitionSite::Parameter handling to look up the type from the PIR signature
list aligned with param_idx, rather than data.params from function_data.
Preserve arena-backed type rendering so generic arguments remain visible, and
keep the existing unknown fallback when no matching signature or type reference
exists.

---

Nitpick comments:
In `@baml_language/crates/baml_lsp2_actions/src/type_info.rs`:
- Around line 757-775: Extract the duplicated enum-variant declaration
formatting from the shown enum lookup and member_type_info_at into a shared
helper such as render_enum_variant_declaration. Update both hover paths to call
the helper while preserving the existing "{Enum}.{Variant}: {Enum}" output.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: db3a7dba-531b-40f4-8dd2-69c9d25e40ff

📥 Commits

Reviewing files that changed from the base of the PR and between d0dbf79 and d793ae2.

⛔ Files ignored due to path filters (2)
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__describe_tests__describe_function.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__describe_tests__describe_function_with_enum_param.snap is excluded by !**/*.snap
📒 Files selected for processing (31)
  • baml_language/crates/baml_lsp2_actions/src/completions.rs
  • baml_language/crates/baml_lsp2_actions/src/describe.rs
  • baml_language/crates/baml_lsp2_actions/src/lib.rs
  • baml_language/crates/baml_lsp2_actions/src/type_info.rs
  • baml_language/crates/baml_lsp2_actions/src/type_info_tests.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lib.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_authoring.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_generic_hover.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b966_template_interpolation_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b967_config_block_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b974_top_level_snippet_completion.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b976_type_attribute_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_968_builtin_function.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_969_enum_variant.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_970_primitive_types.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_971_class_member_references.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_972_literal_values.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_973_llm_function_arguments.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_975_keywords.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_977_method_and_field_declarations.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_978_interface_method_parameters.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b979_interface_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b980_generic_bounds.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b981_typevar_hover.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b983_item_access_shadowing.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b984_parameter_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b985_narrowed_binding.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b986_implicit_throws_never.baml
  • baml_language/crates/baml_lsp_server/src/lib.rs
  • baml_language/crates/baml_lsp_server/src/playground_server.rs
  • baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs
🚧 Files skipped from review as they are similar to previous changes (25)
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b983_item_access_shadowing.baml
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_authoring.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_972_literal_values.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_978_interface_method_parameters.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b979_interface_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b984_parameter_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_975_keywords.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_968_builtin_function.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b974_top_level_snippet_completion.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b985_narrowed_binding.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b976_type_attribute_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b981_typevar_hover.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_970_primitive_types.baml
  • baml_language/crates/baml_lsp_server/src/lib.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b986_implicit_throws_never.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_969_enum_variant.baml
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_generic_hover.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_971_class_member_references.baml
  • baml_language/crates/baml_lsp2_actions/src/type_info_tests.rs
  • baml_language/crates/baml_lsp2_actions/src/describe.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_973_llm_function_arguments.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_977_method_and_field_declarations.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b966_template_interpolation_hover_highlight.baml
  • baml_language/crates/baml_lsp_server/src/playground_server.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lib.rs

@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 28, 2026 19:48 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from d793ae2 to f50d022 Compare July 28, 2026 23:00
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 23:01 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 23:08 Inactive

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@baml_language/crates/baml_lsp2_actions/src/listing.rs`:
- Around line 139-149: Reject names containing empty path segments before the
split-and-resolve logic in the builtin target resolver, including trailing dots
such as "string."; preserve valid alias and member-path resolution. Add a Rust
regression unit test covering the rejected empty-segment input.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0fd15a33-bf13-4bc8-a548-555ae6403ead

📥 Commits

Reviewing files that changed from the base of the PR and between d793ae2 and f50d022.

⛔ Files ignored due to path filters (3)
  • baml_language/Cargo.lock is excluded by !**/*.lock
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__describe_tests__describe_function.snap is excluded by !**/*.snap
  • baml_language/crates/baml_lsp2_actions/src/snapshots/baml_lsp2_actions__describe_tests__describe_function_with_enum_param.snap is excluded by !**/*.snap
📒 Files selected for processing (46)
  • baml_language/crates/baml_base/src/language.rs
  • baml_language/crates/baml_base/src/lib.rs
  • baml_language/crates/baml_builtins2/Cargo.toml
  • baml_language/crates/baml_builtins2/keyword_docs/baml_keywords.yaml
  • baml_language/crates/baml_builtins2/src/language_docs.rs
  • baml_language/crates/baml_builtins2/src/lib.rs
  • baml_language/crates/baml_cli/Cargo.toml
  • baml_language/crates/baml_cli/src/describe_command.rs
  • baml_language/crates/baml_cli/src/describe_command_tests.rs
  • baml_language/crates/baml_compiler2_hir/src/builder.rs
  • baml_language/crates/baml_compiler2_tir/src/ty.rs
  • baml_language/crates/baml_lsp2_actions/Cargo.toml
  • baml_language/crates/baml_lsp2_actions/src/completions.rs
  • baml_language/crates/baml_lsp2_actions/src/describe.rs
  • baml_language/crates/baml_lsp2_actions/src/lib.rs
  • baml_language/crates/baml_lsp2_actions/src/listing.rs
  • baml_language/crates/baml_lsp2_actions/src/type_info.rs
  • baml_language/crates/baml_lsp2_actions/src/type_info_tests.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lib.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_authoring.rs
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_generic_hover.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b966_template_interpolation_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b967_config_block_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b974_top_level_snippet_completion.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b976_type_attribute_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_968_builtin_function.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_969_enum_variant.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_970_primitive_types.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_971_class_member_references.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_972_literal_values.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_973_llm_function_arguments.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_975_keywords.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_977_method_and_field_declarations.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_978_interface_method_parameters.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b979_interface_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b980_generic_bounds.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b981_typevar_hover.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b983_item_access_shadowing.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b984_parameter_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b985_narrowed_binding.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b986_implicit_throws_never.baml
  • baml_language/crates/baml_lsp_server/src/lib.rs
  • baml_language/crates/baml_lsp_server/src/playground_server.rs
  • baml_language/crates/baml_type/src/names.rs
  • baml_language/crates/baml_type/src/primitive.rs
  • baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs
💤 Files with no reviewable changes (1)
  • baml_language/crates/baml_cli/Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (28)
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b976_type_attribute_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b974_top_level_snippet_completion.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b986_implicit_throws_never.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_970_primitive_types.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_975_keywords.baml
  • baml_language/crates/baml_lsp2_actions/src/lib.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_969_enum_variant.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b981_typevar_hover.baml
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_authoring.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b984_parameter_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b967_config_block_hover_highlight.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_968_builtin_function.baml
  • baml_language/crates/baml_lsp2_actions_tests/src/lsp_issues_generic_hover.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_977_method_and_field_declarations.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b980_generic_bounds.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b979_interface_generics.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_972_literal_values.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_978_interface_method_parameters.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_973_llm_function_arguments.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_basic_hover/b_971_class_member_references.baml
  • baml_language/crates/baml_lsp_server/src/playground_server.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b985_narrowed_binding.baml
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_generic_hover/b983_item_access_shadowing.baml
  • baml_language/crates/baml_lsp2_actions_tests/src/lib.rs
  • baml_language/crates/baml_lsp2_actions_tests/test_files/lsp_issues_authoring/b966_template_interpolation_hover_highlight.baml
  • baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs
  • baml_language/crates/baml_lsp2_actions/src/completions.rs
  • baml_language/crates/baml_lsp2_actions/src/type_info.rs

@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from f50d022 to 6c3fe75 Compare July 28, 2026 23:19
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 23:21 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from 6c3fe75 to b7cf351 Compare July 28, 2026 23:25
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 23:26 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 28, 2026 23:34 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 28, 2026 23:47 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from b7cf351 to e54cf6b Compare July 28, 2026 23:53
@vercel
vercel Bot temporarily deployed to Preview – beps July 28, 2026 23:55 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 29, 2026 00:02 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 29, 2026 00:15 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from e54cf6b to 4980dad Compare July 29, 2026 01:10
@vercel
vercel Bot temporarily deployed to Preview – beps July 29, 2026 01:11 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 29, 2026 01:18 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 29, 2026 01:31 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from 4980dad to c5eab17 Compare July 29, 2026 03:58
@vercel
vercel Bot temporarily deployed to Preview – beps July 29, 2026 03:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 29, 2026 04:07 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from c5eab17 to b14f976 Compare July 29, 2026 04:17
@vercel
vercel Bot temporarily deployed to Preview – beps July 29, 2026 04:18 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from b14f976 to 9cd5697 Compare July 29, 2026 04:22
@vercel
vercel Bot temporarily deployed to Preview – beps July 29, 2026 04:23 Inactive
@sxlijin
sxlijin force-pushed the agent/fix-lsp-authoring-hover-issues branch from 9cd5697 to 670b3c0 Compare July 29, 2026 04:27
@vercel
vercel Bot temporarily deployed to Preview – beps July 29, 2026 04:28 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle2 July 29, 2026 04:35 Inactive
@vercel
vercel Bot temporarily deployed to Preview – promptfiddle July 29, 2026 04:49 Inactive
@sxlijin
sxlijin added this pull request to the merge queue Jul 29, 2026
@linear

linear Bot commented Jul 29, 2026

Copy link
Copy Markdown

B-1022

Merged via the queue into canary with commit 78421d9 Jul 29, 2026
82 checks passed
@sxlijin
sxlijin deleted the agent/fix-lsp-authoring-hover-issues branch July 29, 2026 06:15

This branch was previously deployed

3 inactive deployments
Preview – promptfiddle — 670b3c01 Deployed Jul 29, 2026 by vercel[bot]
Preview – promptfiddle2 — 670b3c01 Deployed Jul 29, 2026 by vercel[bot]
Preview – beps — 670b3c01 Deployed Jul 29, 2026 by vercel[bot]
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.

1 participant