Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

TypeScript compilation was failing due to type mismatches between React synthetic events and native DOM events expected by @vscode-elements/react-elements@0.9.0.

Changes

Event handler type corrections (7 files):

  • Changed React ChangeEvent<T> and InputEvent to native Event type in:
    • CodeFlowsDropdown.tsx, ModelTypeTextbox.tsx (also fixed HTMLSelectElement → HTMLInputElement cast)
    • RepoRow.tsx, ModelAlertsSort.tsx, RepositoriesFilter.tsx, RepositoriesResultFormat.tsx, RepositoriesSort.tsx

Ref type corrections (3 files):

  • Changed React.Ref<HTMLElement | undefined>React.Ref<HTMLDivElement> in:
    • DataGrid.tsx (DataGridRow and DataGridCell components)
    • MethodRow.tsx (ModelableMethodRow, UnmodelableMethodRow, and parent useRef)

Component prop fixes (2 files):

  • Made $size prop optional in TextButton.tsx styled component
  • Removed unsupported appearance prop from VscodeButton in VariantAnalysisActions.tsx
// Before
const handleChange = useCallback((e: ChangeEvent<HTMLSelectElement>) => {
  const selectedOption = e.target;
  setSelectedCodeFlow(codeFlows[parseInt(selectedOption.value)]);
}, [setSelectedCodeFlow, codeFlows]);

// After
const handleChange = useCallback((e: Event) => {
  const selectedOption = e.target as HTMLSelectElement;
  setSelectedCodeFlow(codeFlows[parseInt(selectedOption.value)]);
}, [setSelectedCodeFlow, codeFlows]);

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/github/vscode-codeql/actions/runs/21145906696/jobs
    • Triggering command: /usr/bin/curl curl -s -H Authorization: Bearer REDACTED tsc --noEmit (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Fix the failing GitHub Actions workflow Lint
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 60805148691
Job URL: https://github.com/github/vscode-codeql/actions/runs/21143693219/job/60805148691


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow lint Fix TypeScript type errors in VSCode Elements event handlers Jan 19, 2026
Copilot AI requested a review from d10c January 19, 2026 16:18
Copilot AI and others added 2 commits January 19, 2026 17:04
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Copilot AI changed the title Fix TypeScript type errors in VSCode Elements event handlers Fix TypeScript type errors in VSCode Elements event handlers and refs Jan 19, 2026
})}
</Button>
<Button
appearance="primary"
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot Why was this line deleted? Is there another attribute that would be equivalent, such as <Button primary .../>?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The appearance attribute is not supported by VscodeButton in @vscode-elements v0.9.0. The button has primary appearance by default. To make it secondary, you add the secondary boolean attribute. Since this button doesn't have secondary, it already has the primary appearance. No changes needed - the fix in commit 42b1cb7 is correct.

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.

2 participants