Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ghost Text and CodeLens issue in Jetbrains #6494

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arafatkatze
Copy link
Collaborator

@arafatkatze arafatkatze commented Dec 31, 2024

Linear Issue

Thanks to @pkukielka for debugging this

Problem

Codelens would remain stuck on screen after accepting edits through the chat section's show diff feature.

Solution

Modified the LensesService to properly handle editor invalidation by:

  • Targeting the specific codelens that matches the file being updated instead of the file currently open in the editor
  • Using getAllOpenEditors() to find the correct editor context
  • Ensuring code vision providers are properly invalidated for the matching editor

Testing

Verified that:

  • CodeLens clears properly after accepting edits through show diff
  • The behavior in this video does NOT happen anymore

Test plan

Changelog

@arafatkatze
Copy link
Collaborator Author

NOTE: I don't know in general if we write/should write tests for this kind of stuff but am happy to do it.

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