-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ui): Layout improvements and KQL grammar tweak #45
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
15 commits
Select commit
Hold shift + click to select a range
3121b2b
feat(kql-lezer): make QueryExpression optional in Query rule
sushruth c655d91
feat(ui): implement resizable layout and collapsible sidebar
sushruth 8337111
docs: update agent instructions to prefer MCP servers
sushruth de9b52e
feat(ui): persist sidebar collapse state
sushruth ad646ef
feat(ui): implement pagination for results table
sushruth 16ed7e7
feat(ui): implement advanced pagination controls
sushruth ec77c38
feat(ui): replace pagination with visible range status
sushruth 4c0f41b
feat(ui): update showing text to include total count
sushruth 33ecf52
feat(ui): add row numbers to results table
sushruth c4436ad
style(ui): update scrollbars to match macOS native look
sushruth 19c8726
style(ui): improve row numbering and remove status text
sushruth 3d0c682
fix(ui): remove custom scrollbars and stabilize column widths
sushruth 4b23cd4
style(ui): update favicon to dark stroke with white outline
sushruth b4a0ad1
chore: lint fixes
sushruth 77eb8a2
fix(build): correct turbo output paths for kql-lezer parser artifacts
sushruth 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,82 @@ | ||
| import { seq, many, ref, choice, optional, type RuleDef, kw } from "@fossiq/lezer-grammar-generator"; | ||
| import { | ||
| seq, | ||
| many, | ||
| ref, | ||
| choice, | ||
| optional, | ||
| type RuleDef, | ||
| kw, | ||
| } from "@fossiq/lezer-grammar-generator"; | ||
|
|
||
| /** | ||
| * Top-level query rules. | ||
| */ | ||
| export const queryRules: Record<string, RuleDef> = { | ||
| Query: { | ||
| expression: seq( | ||
| many(choice(ref("LetStatement"), ref("SetStatement"), ref("DeclareQueryParametersStatement"))), | ||
| ref("QueryExpression") | ||
| ), | ||
| }, | ||
|
|
||
| QueryExpression: { | ||
| expression: choice( | ||
| ref("PipelineExpression"), | ||
| ref("UnionExpression"), | ||
| ref("SearchExpression"), | ||
| ref("FindExpression") | ||
| Query: { | ||
| expression: seq( | ||
| many( | ||
| choice( | ||
| ref("LetStatement"), | ||
| ref("SetStatement"), | ||
| ref("DeclareQueryParametersStatement") | ||
| ) | ||
| }, | ||
| ), | ||
| optional(ref("QueryExpression")) | ||
| ), | ||
| }, | ||
|
|
||
| UnionExpression: { | ||
| expression: seq( | ||
| kw("union"), | ||
| optional(ref("UnionParameters")), | ||
| ref("TableList") | ||
| ) | ||
| }, | ||
| QueryExpression: { | ||
| expression: choice( | ||
| ref("PipelineExpression"), | ||
| ref("UnionExpression"), | ||
| ref("SearchExpression"), | ||
| ref("FindExpression") | ||
| ), | ||
| }, | ||
|
|
||
| UnionExpression: { | ||
| expression: seq( | ||
| kw("union"), | ||
| optional(ref("UnionParameters")), | ||
| ref("TableList") | ||
| ), | ||
| }, | ||
|
|
||
| SearchExpression: { | ||
| expression: seq( | ||
| kw("search"), | ||
| many(choice(ref("Identifier"), ref("String"), ref("Pipe"), ref("OpenParen"), ref("CloseParen"), kw("in"), kw("kind"), ref("Equals"))) | ||
| // TODO: Improve search grammar | ||
| SearchExpression: { | ||
| expression: seq( | ||
| kw("search"), | ||
| many( | ||
| choice( | ||
| ref("Identifier"), | ||
| ref("String"), | ||
| ref("Pipe"), | ||
| ref("OpenParen"), | ||
| ref("CloseParen"), | ||
| kw("in"), | ||
| kw("kind"), | ||
| ref("Equals") | ||
| ) | ||
| }, | ||
| ) | ||
| // TODO: Improve search grammar | ||
| ), | ||
| }, | ||
|
|
||
| FindExpression: { | ||
| expression: seq( | ||
| kw("find"), | ||
| many(choice(ref("Identifier"), ref("String"), ref("Pipe"), ref("OpenParen"), ref("CloseParen"), kw("in"), kw("kind"), ref("Equals"))) | ||
| // TODO: Improve find grammar | ||
| FindExpression: { | ||
| expression: seq( | ||
| kw("find"), | ||
| many( | ||
| choice( | ||
| ref("Identifier"), | ||
| ref("String"), | ||
| ref("Pipe"), | ||
| ref("OpenParen"), | ||
| ref("CloseParen"), | ||
| kw("in"), | ||
| kw("kind"), | ||
| ref("Equals") | ||
| ) | ||
| } | ||
| }; | ||
| ) | ||
| // TODO: Improve find grammar | ||
| ), | ||
| }, | ||
| }; |
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 was deleted.
Oops, something went wrong.
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
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.
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.
The minimum (100) and maximum (600) height constraints are magic numbers. Consider extracting these as named constants (e.g.,
MIN_RESULTS_HEIGHTandMAX_RESULTS_HEIGHT) to improve code readability and maintainability.