-
Notifications
You must be signed in to change notification settings - Fork 200
Add query history sorting for remote queries #1235
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
Also, fix two smaller issues: - Ensure the `Open Query Directory` command opens inside the specified directory. - Ensure label changes are saved across restarts.
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.
Thanks, this looks good to me! Just a few minor comments 🎉
extensions/ql-vscode/CHANGELOG.md
Outdated
@@ -3,6 +3,8 @@ | |||
## [UNRELEASED] | |||
|
|||
- Fix a bug where the AST viewer was not synchronizing its selected node when the editor selection changes. [#1230](https://github.com/github/vscode-codeql/pull/1230) | |||
- Open the directory in the finder/explorer (instead of just highlighting it) when running the command "Open query directory" command from the query history view. [#1235](https://github.com/github/vscode-codeql/pull/1235) |
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.
Small typo ✍🏽
- Open the directory in the finder/explorer (instead of just highlighting it) when running the command "Open query directory" command from the query history view. [#1235](https://github.com/github/vscode-codeql/pull/1235) | |
- Open the directory in the finder/explorer (instead of just highlighting it) when running the "Open query directory" command from the query history view. [#1235](https://github.com/github/vscode-codeql/pull/1235) |
extensions/ql-vscode/CHANGELOG.md
Outdated
@@ -3,6 +3,8 @@ | |||
## [UNRELEASED] | |||
|
|||
- Fix a bug where the AST viewer was not synchronizing its selected node when the editor selection changes. [#1230](https://github.com/github/vscode-codeql/pull/1230) | |||
- Open the directory in the finder/explorer (instead of just highlighting it) when running the command "Open query directory" command from the query history view. [#1235](https://github.com/github/vscode-codeql/pull/1235) | |||
- Ensure query label changes are persisted across restarts. [#1235](https://github.com/github/vscode-codeql/pull/1235) |
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.
Maybe we can clarify what these labels are 💡 Something like this?
- Ensure query label changes are persisted across restarts. [#1235](https://github.com/github/vscode-codeql/pull/1235) | |
- Ensure query label changes in the query history view are persisted across restarts. [#1235](https://github.com/github/vscode-codeql/pull/1235) |
} | ||
} else if (finalSingleItem.t === 'remote') { | ||
p = path.join(this.queryStorageDir, finalSingleItem.queryId); | ||
externalFilePath = path.join(this.queryStorageDir, finalSingleItem.queryId, 'timestamp'); |
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.
Nice use of the timestamp
file! ⏲️
} | ||
|
||
if (p) { | ||
if (externalFilePath) { |
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.
This is probably a fringe case, but is it worth also throwing a Failed to open
error when this path doesn't exist (e.g. if a user has deleted the timestamp for some reason)?
At the moment it fails silently.
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.
Hmmm...unfortunately, the revealFileInOS
command does not throw an error if the file doesn't exist. I guess I can add a fs.pathExists
check before trying to open.
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.
Done
Also, fix some changelog notes.
@shati-patel can you take another look and see if your comment is addressed? |
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.
Thanks for the changes! LGTM 🙌🏽
Also, fix two smaller issues:
Open Query Directory
command opens inside the specifieddirectory.
Fixes #1204
Checklist
ready-for-doc-review
label there.