Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions extensions/ql-vscode/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-docs",
"@storybook/addon-links",
"@storybook/addon-a11y",
"./vscode-theme-addon/preset.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { dirname, join } from "path";
import { fileURLToPath } from "url";

const __dirname = dirname(fileURLToPath(import.meta.url));

export function previewAnnotations(entry = []) {
return [...entry, require.resolve("./preview.ts")];
return [...entry, join(__dirname, "preview.ts")];
}

export function managerEntries(entry = []) {
return [...entry, require.resolve("./manager.tsx")];
return [...entry, join(__dirname, "manager.tsx")];
}
189 changes: 119 additions & 70 deletions extensions/ql-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,7 @@
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@playwright/test": "^1.50.1",
"@storybook/addon-a11y": "^10.1.11",
"@storybook/addon-docs": "^10.1.11",
"@storybook/addon-links": "^10.1.11",
"@storybook/components": "^8.6.14",
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The @storybook/components package is at version 8.6.14, which is incompatible with Storybook v10.1.11. This package should be upgraded to a version that is compatible with Storybook v10 (e.g., ^10.1.11) to avoid potential runtime issues and compatibility problems.

Suggested change
"@storybook/components": "^8.6.14",
"@storybook/components": "^10.1.11",

Copilot uses AI. Check for mistakes.
"@storybook/csf": "^0.1.13",
Expand Down
2 changes: 1 addition & 1 deletion extensions/ql-vscode/src/stories/Overview.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta, Story } from '@storybook/blocks';
import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks';

import iframeImage from './images/update-css-variables-iframe.png';
import stylesImage from './images/update-css-variables-styles.png';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ChangeEvent, SetStateAction } from "react";
import type { SetStateAction } from "react";
import { useCallback } from "react";
import {
VscodeOption,
Expand All @@ -25,8 +25,8 @@ export const CodeFlowsDropdown = ({
setSelectedCodeFlow,
}: CodeFlowsDropdownProps) => {
const handleChange = useCallback(
(e: ChangeEvent<HTMLSelectElement>) => {
const selectedOption = e.target;
(e: Event) => {
const selectedOption = e.target as HTMLSelectElement;
Comment on lines +28 to +29
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The event handler type has been changed from ChangeEvent<HTMLSelectElement> to Event, which is inconsistent with other similar components in the codebase. The more specific ChangeEvent<HTMLSelectElement> type provides better type safety and is the standard React type for select element change handlers. Consider using the same type as other similar components for consistency.

Copilot uses AI. Check for mistakes.
const selectedIndex = parseInt(selectedOption.value);
setSelectedCodeFlow(codeFlows[selectedIndex]);
},
Expand Down
4 changes: 2 additions & 2 deletions extensions/ql-vscode/src/view/common/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const DataGridRow = forwardRef(
"data-testid": testId,
onClick,
}: DataGridRowProps,
ref?: React.Ref<HTMLElement | undefined>,
ref?: React.Ref<HTMLDivElement>,
) => (
<StyledDataGridRow
$focused={focused}
Expand Down Expand Up @@ -135,7 +135,7 @@ export const DataGridCell = forwardRef(
className,
children,
}: DataGridCellProps,
ref?: React.Ref<HTMLElement | undefined>,
ref?: React.Ref<HTMLDivElement>,
) => {
return (
<StyledDataGridCell
Expand Down
2 changes: 1 addition & 1 deletion extensions/ql-vscode/src/view/common/TextButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { styled } from "styled-components";

type Size = "x-small" | "small" | "medium" | "large" | "x-large";

const StyledButton = styled.button<{ $size: Size }>`
const StyledButton = styled.button<{ $size?: Size }>`
background: none;
color: var(--vscode-textLink-foreground);
border: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Props = {

export const ModelAlertsSort = ({ value, onChange, className }: Props) => {
const handleInput = useCallback(
(e: InputEvent) => {
(e: Event) => {
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The event handler type has been changed from ChangeEvent<HTMLSelectElement> to Event, which is inconsistent with other similar components in the codebase. The more specific ChangeEvent<HTMLSelectElement> type provides better type safety and is the standard React type for select element change handlers. Consider using the same type as other similar components for consistency.

Copilot uses AI. Check for mistakes.
const target = e.target as HTMLSelectElement;

onChange(target.value as SortKey);
Expand Down
Loading
Loading