fix(cli): fix codeAction/resolve not considering assist actions#9812
fix(cli): fix codeAction/resolve not considering assist actions#9812ematipico merged 5 commits intobiomejs:mainfrom
Conversation
|
The change made in biomejs#9627 improved how code actions were handled, but omitted handling of code actions for assit rule groups and was only handling the code actions for the linter rule group. This just adds the assist rule group back in.
d09b5fa to
b576f08
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe pull request updates Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.changeset/short-rings-help.md:
- Around line 2-5: The changeset uses "minor" and a plain description; change
the release type to "patch" and rewrite the description to the bug-fix issue
format (start with "Fixed [`#ISSUE_NUMBER`](issue link): ...") so the entry in
.changeset/short-rings-help.md follows the project's guidance for bug fixes on
main; update the first line token from "@biomejs/biome: minor" to
"@biomejs/biome: patch" and replace "Fix codeAction/resolve not considering
assist actions" with a description prefixed by "Fixed [`#NUMBER`](URL):"
referencing the appropriate issue.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8265ee4e-2d19-4324-85bc-79f09c43d71e
📒 Files selected for processing (2)
.changeset/short-rings-help.mdcrates/biome_configuration/src/analyzer/mod.rs
Merging this PR will not alter performance
Comparing Footnotes
|
|
Are you saying that the bug wasn't completely fixed in #9745? |
@dyc3 I believe so yes but I might be misunderstanding the code here.
Basically my understanding is that the from_lsp_filter gives back the full list of rules, but from_group_and_rules only including linting ones will cause ones like the organize imports to return None instead. But with the way its doing it it would still serialize none and then when the rule is resolved here: biome/crates/biome_lsp/src/handlers/analysis.rs Lines 427 to 428 in 1d09f0f Hopefully this makes sense and I'm not chasing nothing |
|
@elliotcourant it would beneficial to also provide a LSP test, so that we can prove the fix. The tests in the current pr aren't enough |
There was a problem hiding this comment.
The original issue is already closed. Since you're fixing code that hasn't been shipped yet, I believe the changeset isn't needed
|
I'll work on those tests, thank you! |
This test is just based on the one that came before it for biomejs#9741
|
Added a test based on the other related tests, and removed the change set. Thank you! |
This PR was made using the guidance of AI to help understand the code and recent changes made to the code that introduced the bug.
Summary
The change made in #9627 improved how code actions were handled, but omitted handling of code actions for assit rule groups and was only handling the code actions for the linter rule group. This just adds the assist rule group back in.
#9741 I believe this will resolve part of this issue, but the other part of this issue was already resolved in #9745
Test Plan
I've added tests here to make sure that the specific code action that was misbehaving (manifesting as an
-32603: The rule doesn't existerror in my editor) is now present as a rule for the code action to resolve.If there is more I can do here please let me know.
Docs
N/A