-
-
Notifications
You must be signed in to change notification settings - Fork 9
Progressive loading for diagnostics view - eliminate 10-30s UI blocking #169
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
59730af
Initial plan
Copilot f942c92
Implement progressive loading for diagnostics view
Copilot 56c600e
Fix session folders update to target correct tab element
Copilot 538ef90
Address code review feedback: fix report text processing and panel vi…
Copilot 561f8d3
Fix report text processing and improve logging
Copilot 8e4ef12
Add comprehensive implementation documentation
Copilot d5142f2
Refactor: extract constants and improve code documentation
Copilot 57ad48b
Extract constants and helper functions to eliminate duplication
Copilot 65e6b9c
Improve testing documentation with session file locations
Copilot e8fa28e
Delete IMPLEMENTATION_SUMMARY.md
rajbos 9b02287
Delete TESTING.md
rajbos 8a013a6
Merge branch 'main' into copilot/update-diagnostics-loading-behavior
rajbos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / CodeQL
Client-side cross-site scripting High
Copilot Autofix
AI 18 days ago
In general, the fix is to ensure that every user-controlled value included in HTML that is passed to
innerHTML,outerHTML,insertAdjacentHTML, or similar is properly escaped for the HTML context, or to avoid building HTML strings in favor of creating DOM nodes and assigning text viatextContent. Since this code already uses anescapeHtmlhelper and string-based templating, the minimal, non-breaking fix is to escape the remaining unescaped value and ensure we only inject escaped data into the HTML string.Concretely, within
src/webview/diagnostics/main.ts, in the message handler wheresessionFilesHtmlis constructed, thesf.countinterpolation on line 940 must be escaped using the existingescapeHtmlhelper. This guarantees that even ifsf.countis tainted or unexpectedly becomes a string, special characters like<,>,", and'are neutralized before being inserted into the table cell. The rest of the fields (sf.dir,display,editorName, and thedata-pathattribute) are already encoded appropriately, so no other functional changes are necessary. No new imports or helper methods are required ifescapeHtmlalready exists elsewhere in this file; if it does not, such a helper would need to be defined, but that is outside the shown snippet, so here we only adjust the existing usage pattern.