Skip to content

Conversation

@sushruth
Copy link
Contributor

This PR introduces significant UI improvements including a resizable results pane and a collapsible sidebar, along with a minor grammar adjustment in kql-lezer.

Changes

@fossiq/ui

  • Resizable Layout: Added a drag handle between the editor and results pane, allowing users to adjust the height of the results table.
  • Collapsible Sidebar: The sidebar can now be collapsed to save space, showing only icons when collapsed.
  • Visual Improvements:
    • Updated icons for better visual consistency.
    • Added emoji support for data sources in the sidebar.
    • Enhanced styling for the results table and scrollbars.
    • Refactored Layout component to support new structure.

@fossiq/kql-lezer

  • Optional Query Expression: Modified the Query rule to make QueryExpression optional. This allows for queries that consist only of statements (like let statements) without a final expression.

Checklist

  • UI changes verified visually (implicit in implementation)
  • Grammar changes verified

This PR was created by an AI agent on behalf of @sushruth.

Copilot AI review requested due to automatic review settings January 21, 2026 21:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the UI with a resizable results pane and collapsible sidebar, while making the KQL grammar more flexible by allowing queries with only statements.

Changes:

  • Added drag-to-resize functionality between editor and results panes with visual feedback
  • Implemented collapsible sidebar with smooth animations and icon-only collapsed state
  • Replaced generic icons with emoji representations for data sources
  • Made QueryExpression optional in KQL grammar to support statement-only queries

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/ui/src/utils/emojiGenerator.ts New utility for generating deterministic emojis for data sources
packages/ui/src/styles/theme.css Updated layout structure and added sidebar collapse/resize styling
packages/ui/src/icons/index.ts Converted icons from filled to outline stroke style with new sidebar toggle icons
packages/ui/src/contexts/SchemaContext.tsx Added emoji field to table schema
packages/ui/src/components/Sidebar.tsx Implemented collapsible sidebar with toggle button and emoji support
packages/ui/src/components/ResultsTable.tsx Added custom scrollbar styling and shadow to header
packages/ui/src/components/Layout.tsx Refactored to support resizable panes and collapsible sidebar
packages/ui/src/App.tsx Updated to use new Layout component API with separate editor/results panes
packages/ui/public/manifest.json Updated app icons to match new outline style
packages/ui/public/index.html Removed duplicate HTML file
packages/ui/index.html Updated favicon to match new icon style
packages/kql-lezer/src/grammar/plugins/rules/query.ts Made QueryExpression optional and improved code formatting

<tbody>
{/* Spacer row for virtual scroll offset */}
{virtualItems().length > 0 && (
{virtualItems().length > 0 && (virtualItems()[0]?.start ?? 0) > 0 && (
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition (virtualItems()[0]?.start ?? 0) > 0 is redundant. The spacer row should only render when there's an offset, which is already guaranteed by virtualItems().length > 0 since if there are virtual items and the first one exists, checking its start value is sufficient. The nullish coalescing with 0 means the condition would evaluate to 0 > 0 (false) when start is undefined, making the length check alone sufficient for the intended behavior.

Suggested change
{virtualItems().length > 0 && (virtualItems()[0]?.start ?? 0) > 0 && (
{virtualItems().length > 0 && virtualItems()[0]?.start > 0 && (

Copilot uses AI. Check for mistakes.

const handleMouseMove = (moveEvent: MouseEvent) => {
const deltaY = startY - moveEvent.clientY;
const newHeight = Math.min(Math.max(startHeight + deltaY, 100), 600);
Copy link

Copilot AI Jan 21, 2026

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_HEIGHT and MAX_RESULTS_HEIGHT) to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.
@sushruth sushruth force-pushed the ui/layout-improvements branch from 7c18243 to b4a0ad1 Compare January 22, 2026 01:11
@sushruth sushruth merged commit 4ae2020 into main Jan 22, 2026
6 checks passed
@sushruth sushruth deleted the ui/layout-improvements branch January 22, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant