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.

@d10c
Copy link
Contributor

d10c commented Jan 20, 2026

@copilot There appear to be test failures and console.errors reported during npm run test:view && npm run test:vscode-integration. Can you see if you can fix any of them?

Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

@copilot There appear to be test failures and console.errors reported during npm run test:view && npm run test:vscode-integration. Can you see if you can fix any of them?

I've investigated the test results:

View tests: All 39 test suites pass (364 tests passed, 2 skipped). ✅

Console errors: The warnings are pre-existing issues unrelated to my changes:

  • Nested buttons in LibraryRow/ModelEditor
  • Nested anchors in ModelEvaluation
  • Key prop spreading in SuggestBox
  • Invalid DOM nesting ( in
    )

I verified these same console.error warnings exist on the base commit (ad70ecd) before my changes. None of the files with warnings were modified by my TypeScript type fixes.

Vscode-integration tests: Fail due to network connectivity issues (ENOTFOUND update.code.visualstudio.com) in the test environment, not related to code changes.

My changes only fixed TypeScript event handler and ref types, which don't affect the runtime behavior that causes these pre-existing HTML validation warnings.

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:

  • update.code.visualstudio.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/vscode-codeql/vscode-codeql/extensions/ql-vscode/node_modules/.bin/jest --projects test/vscode-tests/activated-extension .bin/jest (dns block)

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

@d10c d10c marked this pull request as ready for review January 20, 2026 13:32
@d10c d10c requested review from a team as code owners January 20, 2026 13:32
Copilot AI review requested due to automatic review settings January 20, 2026 13:32
@d10c d10c merged commit e01f33c into copilot/fix-github-actions-workflow-again Jan 20, 2026
26 of 27 checks passed
@d10c d10c deleted the copilot/fix-github-actions-workflow-lint-again branch January 20, 2026 13:32
Copy link
Contributor

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 fixes TypeScript compilation errors caused by type mismatches between React synthetic events and native DOM events expected by @vscode-elements/react-elements@0.9.0.

Changes:

  • Updated event handler types from React synthetic events (ChangeEvent, InputEvent) to native DOM Event type with appropriate type assertions
  • Corrected ref types from React.Ref<HTMLElement | undefined> to React.Ref<HTMLDivElement> to match the actual DOM element types
  • Fixed component prop issues: made $size optional in TextButton styled component and removed unsupported appearance prop from VscodeButton

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CodeFlowsDropdown.tsx Changed event handler from ChangeEvent<HTMLSelectElement> to Event with type assertion
ModelTypeTextbox.tsx Changed event handler from ChangeEvent<HTMLSelectElement> to Event and corrected type assertion to HTMLInputElement
RepoRow.tsx Changed event handler from ChangeEvent<HTMLInputElement> to Event with type assertion
ModelAlertsSort.tsx Changed event handler from InputEvent to Event
RepositoriesFilter.tsx Changed event handler from InputEvent to Event
RepositoriesResultFormat.tsx Changed event handler from InputEvent to Event
RepositoriesSort.tsx Changed event handler from InputEvent to Event
DataGrid.tsx Updated ref types from React.Ref<HTMLElement | undefined> to React.Ref<HTMLDivElement>
MethodRow.tsx Updated ref types to HTMLDivElement and changed useRef initialization to null
TextButton.tsx Made $size prop optional in styled component to match component props
VariantAnalysisActions.tsx Removed unsupported appearance prop from VscodeButton

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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