Skip to content

Conversation

@lucasgoral
Copy link
Contributor

@lucasgoral lucasgoral commented Oct 22, 2025

What this PR does / why we need it:
Typrescript fixes and added strict TypeScript Type Checking to the pipeline to make the code less error prone

Copilot AI review requested due to automatic review settings October 22, 2025 10:49
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 addresses TypeScript type safety issues across multiple components by improving type definitions and adding proper type assertions. The changes focus on standardizing type definitions for table cell instances and handling potentially undefined values more safely.

  • Standardized CellData interface across components to use Record<string, unknown> for row originals
  • Added proper type guards and assertions for accessing nested properties
  • Imported missing TypeScript type definitions

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
YamlEditor.tsx Added event existence check before calling onChange callback
ProjectsList.tsx Refactored cell instance types and added type assertions for accessing row original properties
MemberTable.tsx Changed row original type to generic Record and added type assertions for property access
ImportMembersDialog.tsx Introduced new CellData interface and updated Cell component with proper type casting
FeedbackButton.tsx Imported TextAreaInputEventDetail type and simplified function signatures
ControlPlaneListWorkspaceGridTile.tsx Updated createErrorView parameter to accept undefined error values
Providers.tsx Standardized CellData interface and added type assertions for row original property access
MCPHealthPopoverButton.tsx Cleaned up CellData interface and updated all Cell components to use consistent typing

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lucasgoral lucasgoral changed the title Typrescript fixes Typrescript fixes and added TypeScript Type Check to the pipeline Oct 22, 2025
@andreaskienle andreaskienle self-assigned this Oct 24, 2025
Copy link
Contributor

@andreaskienle andreaskienle left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this 🙏👍

Two suggestions:

  • Let's add a script to package.json and run this explicitly in our pipeline
  • Let's get rid of the custom CellData<T> definitions and rely on type inference. I marked a couple of occasions but I think we can simply remove them all

Copy link
Contributor

@andreaskienle andreaskienle left a comment

Choose a reason for hiding this comment

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

So clean 🤩 🫧

@lucasgoral lucasgoral merged commit 4c3cee5 into main Oct 27, 2025
5 checks passed
@lucasgoral lucasgoral deleted the typrescript-fixes branch October 27, 2025 12:35
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.

3 participants