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/[email protected].

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.

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 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:

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