Show query time and fix context name in recent queries - #12
Open
skimmilk09 wants to merge 1 commit into
Open
Conversation
The context name never showed up because the template used prev.context_name, but get_queries() aliases that column to 'context', so the check was always false. Also add the query timestamp using the existing localtime filter.
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read and hereby sign the CLA. |
Owner
|
Thanks! Looks better. Looking at the design now that the context actually shows up, I think I'd like the context deemphasized a bit like the date is now. So maybe put it in the same line with the date, same formatting, and, if a context is present, separated by a pipe character (see if that looks alright) from the date. So "2026-08-03 | Context: whatever" maybe. And something to look at next if you have time is the consistency between the designs for recent queries in Code Q&A and recent chats in the Tutors component. Doesn't have to be in this PR, necessarily, though could be if you want to fold it in. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The context name never showed up in the recent queries list. The template checked
prev.context_name, butget_queries()incode_queries/data.pyselects that column ast.context_name AS context, so the condition was always false.I also added the query timestamp above the context line, using the existing
localtimefilter (t.query_time AS time).Both changes are in one commit since they touch the same few lines, but I can split them if you'd rather review them separately.
mypypasses (90 files) andpytestpasses (170 tests) locally.I wasn't sure about the placement or styling of the timestamp, so let me know if you want it somewhere else in the entry.