Skip to content

fix(editor): prevent false language mode recommendations - #2621

Merged
bajrangCoder merged 2 commits into
mainfrom
fix/language-recommendation-false-positives
Aug 4, 2026
Merged

fix(editor): prevent false language mode recommendations#2621
bajrangCoder merged 2 commits into
mainfrom
fix/language-recommendation-false-positives

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member
  • recommend only language-mode plugins available in the registry
  • suppress built-in, extensionless, and arbitrary file false positives
  • remove the direct plugin-request issue action
  • add regression tests for unknown extensions

- recommend only language-mode plugins available in the registry
- suppress built-in, extensionless, and arbitrary file false positives
- remove the direct plugin-request issue action
- add regression tests for unknown extensions
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR narrows language-mode recommendations to unknown extensions with matching registry plugins and removes the plugin-request fallback.

  • Filters built-in, extensionless, and arbitrary-file false positives.
  • Evicts failed registry lookups so later recommendations can retry.
  • Adds sanity and unit coverage for eligibility, registry matching, and transient failures.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/lib/languageModeRecommendations.js Restricts recommendation eligibility, requires a registry match, removes plugin-request notifications, and correctly evicts transiently failed availability lookups.
tests/unit/languageModeRecommendations.test.js Adds focused coverage for arbitrary extensions, matching registry plugins, and retries after network or server failures.
src/test/sanity.tests.js Adds lightweight regression checks for extensionless filenames, built-in modes, and unknown recommendation candidates.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Editor file opened] --> B{Unknown extension?}
    B -->|No| C[Do not recommend]
    B -->|Yes| D[Query plugin registry]
    D -->|Matching plugin| E[Show extension recommendation]
    D -->|No match| C
    D -->|Transient failure| F[Evict failed cache entry]
    F --> G[Allow later retry]
Loading

Reviews (2): Last reviewed commit: "fix the stale network cache things" | Re-trigger Greptile

Comment thread src/lib/languageModeRecommendations.js
@bajrangCoder

Copy link
Copy Markdown
Member Author

@greptile

@bajrangCoder
bajrangCoder added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 89a836e Aug 4, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Aug 4, 2026
@bajrangCoder
bajrangCoder deleted the fix/language-recommendation-false-positives branch August 4, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant