fix: correct astro language server default version to 2.16.2#5
fix: correct astro language server default version to 2.16.2#5
Conversation
…ll_symbol_tree
When querying a single file via request_full_symbol_tree(), the method was
returning the root symbols directly without wrapping them in a File symbol.
This broke find_referencing_symbols() for file-as-module patterns like Astro
components, where the file itself IS the symbol (e.g., Layout.astro = Layout).
The directory query path (lines 1188-1213) correctly creates a File symbol
wrapper with kind=SymbolKind.File, but the single file path did not.
This fix applies the same File symbol wrapper pattern to single file queries:
- Uses _open_file_context to get file data
- Creates UnifiedSymbolInformation with kind=File
- Sets proper range, location, and parent-child relationships
This enables find_referencing_symbols("Layout", "src/layouts/Layout.astro")
to correctly find the Layout symbol in Astro components.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
📝 WalkthroughWalkthroughUpdated Astro language server default version (2.16.8 → 2.16.2) and changed symbol-tree behavior: file inputs now produce a file-level UnifiedSymbolInformation wrapper with children parented to it; AL language server delegates single-file symbol handling to the parent implementation. Changes
Sequence Diagram(s)(no sequence diagrams generated) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/solidlsp/language_servers/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/solidlsp/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-12-28T13:07:44.082ZApplied to files:
📚 Learning: 2025-12-28T13:07:44.082ZApplied to files:
🧬 Code graph analysis (1)src/solidlsp/language_servers/al_language_server.py (1)
🔇 Additional comments (1)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/solidlsp/language_servers/astro_language_server.pysrc/solidlsp/ls.py
🧰 Additional context used
📓 Path-based instructions (4)
**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.py: Useuv run poe formatcommand for code formatting with BLACK + RUFF - this is the ONLY allowed formatting command
Useuv run poe type-checkcommand for type checking with mypy - this is the ONLY allowed type checking command
Useuv run poe lintto check code style without fixing
Use strict typing with mypy for type checking
Format code with black + ruff
Files:
src/solidlsp/ls.pysrc/solidlsp/language_servers/astro_language_server.py
src/solidlsp/ls.py
📄 CodeRabbit inference engine (CLAUDE.md)
src/solidlsp/ls.py: SolidLanguageServer (src/solidlsp/ls.py) should provide a unified wrapper around Language Server Protocol (LSP) implementations with language-agnostic interface for symbol operations, caching, error recovery, and multiple language server lifecycle handling
When adding new languages, update factory method insrc/solidlsp/ls.py
Files:
src/solidlsp/ls.py
src/solidlsp/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
src/solidlsp/**/*.py: Implement caching strategy to reduce language server overhead
Implement automatic language server restart on crashes for error recovery
Use async operation for non-blocking language server interactions
Files:
src/solidlsp/ls.pysrc/solidlsp/language_servers/astro_language_server.py
src/solidlsp/language_servers/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
When adding new languages, create language server implementation in
src/solidlsp/language_servers/
Files:
src/solidlsp/language_servers/astro_language_server.py
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: dansasser/serena PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T13:07:44.082Z
Learning: Use symbol-based editing with LSP for precise code manipulation
📚 Learning: 2025-12-28T13:07:44.082Z
Learnt from: CR
Repo: dansasser/serena PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T13:07:44.082Z
Learning: Applies to src/solidlsp/ls.py : SolidLanguageServer (`src/solidlsp/ls.py`) should provide a unified wrapper around Language Server Protocol (LSP) implementations with language-agnostic interface for symbol operations, caching, error recovery, and multiple language server lifecycle handling
Applied to files:
src/solidlsp/ls.pysrc/solidlsp/language_servers/astro_language_server.py
📚 Learning: 2025-12-28T13:07:44.082Z
Learnt from: CR
Repo: dansasser/serena PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-28T13:07:44.082Z
Learning: Applies to src/solidlsp/**/*.py : Use async operation for non-blocking language server interactions
Applied to files:
src/solidlsp/language_servers/astro_language_server.py
🧬 Code graph analysis (1)
src/solidlsp/ls.py (1)
src/solidlsp/ls_types.py (3)
UnifiedSymbolInformation(189-256)SymbolKind(146-176)Location(85-93)
🔇 Additional comments (2)
src/solidlsp/language_servers/astro_language_server.py (2)
233-233: LGTM! Default version corrected to fix npm installation failures.The default value now points to version 2.16.2, which resolves the "No matching version found" error mentioned in the PR objectives.
117-117: LGTM! Docstring updated to reflect the correct npm package version.The version 2.16.2 has been verified as the latest stable release on npm with no direct security vulnerabilities reported for the @astrojs/language-server package.

Summary
Fixes Astro Language Server initialization failure caused by referencing a non-existent npm package version.
Problem
The Astro Language Server was failing to initialize with the error:
This occurred because:
2.16.8hardcoded as the default version2.16.8does not exist on npm - the latest available is2.16.2Fix
Changed the default
astro_language_server_versionfrom"2.16.8"to"2.16.2"in two places:Testing
After this fix:
get_symbols_overviewreturns symbols correctly for.astrofilesNotes
The
.installed_versionfile was already tracking2.16.2_5.9.3_5.1.3, indicating the working version was 2.16.2. The code simply needed to match this reality.Summary by CodeRabbit
Chores
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.