-
Notifications
You must be signed in to change notification settings - Fork 730
fix(amazonq): edit diff UI doesnt render correctly when the diff contains only space char or empty line #7922
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
Conversation
… space char or empty line
|
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
|
|
✅ I finished the code review, and didn't find any security or code quality issues. |
| originalCodeHighlightRange: [], | ||
| } | ||
|
|
||
| const defaultLineHighlightLength = 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we choose this number? This means 4 spaces are highlighted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we can only do a static rendering afaik, and the number 4 is alignment with product
Problem
The suggestion indicates the empty line (L4) is edited and replaced with suggestion content however there is no diff highlight. Reason behind is because the function
diffWordsWithSpacewill not say the line is removed (since it's be edited). https://github.com/aws/aws-toolkit-vscode/blob/master/packages/amazonq/src/app/inline/EditRendering/svgGenerator.ts#L437-L441Solution
feature/xbranches will not be squash-merged at release time.