Skip to content

🐛 Fix excessive 'any' type usage to improve type safety#4085

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/auto-qa-fix-any-type-usage
Closed

🐛 Fix excessive 'any' type usage to improve type safety#4085
Copilot wants to merge 2 commits intomainfrom
copilot/auto-qa-fix-any-type-usage

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

  • Analyze all 'any' type usages across source and test files
  • Fix useMarketplace.ts: replace data?: any with data?: unknown
  • Fix useNightlyE2EData.ts: replace (g: any) and (r: any) with NightlyGuideStatus and NightlyRun types
  • Fix kubectlProxy.ts: replace any[] with proper RawPodItem interface
  • Fix 16 drilldown view tests (data: Record<string, unknown>) - remove as any
  • Fix ResourcesDrillDown test - use data={{}}
  • Fix card tests with all-optional props - remove {} as any
  • Fix layout/missions/rewards tests with all-optional props - remove {} as any
  • Fix CPUDetailModal, EmptyClusterState, CopyButton - provide proper typed props
  • Fix AgentSection, GitHubTokenSection, AISettingsSection, AccessibilitySection, ProfileSection - provide proper typed props
  • Fix AgentBackendSettings - provide all required typed props
  • Fix ConnectTab - provide all required typed props
  • Fix BlueprintDefs, DependencyPath - provide required props (wrapped in SVG)
  • Fix DashboardHeader - provide required typed props
  • Fix PortalTooltip, HorseshoeGauge, ClusterDropZone - provide required props
  • Fix UI component tests (RotatingTip, ProgressRing, CollapsibleSection, FlashingValue, FeatureHintTooltip, StatBlockModePicker)
  • Fix InsightSourceBadge, EmptyState, PostConnectBanner - provide required props
  • Fix GitOpsDriftDetailModal, PolicyViolationDetailModal - use null for nullable data
  • Fix PodAiAnalysis, PodOutputTab, PodLabelsTab, PodDeleteSection - provide proper typed props
  • Fix remaining: WorkloadMonitorToolbar, ClusterSelectionDialog, ScanProgressOverlay, ImproveMissionDialog, multi-tenancy modals (KubeFlexDetailModal, OvnDetailModal, KubevirtDetailModal, K3sDetailModal, MultiTenancyDetailModal)
  • Run build and lint to verify changes
  • Run tests to validate no regressions

@kubestellar-prow kubestellar-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: no Indicates the PR's author has not signed the DCO. labels Apr 1, 2026
Copilot AI linked an issue Apr 1, 2026 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for kubestellarconsole failed. Why did it fail? →

Name Link
🔨 Latest commit fd05711
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69ccd7155618640008b1ac2e

@github-actions github-actions bot removed the dco-signoff: no Indicates the PR's author has not signed the DCO. label Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

👋 Hey @Copilot — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 1, 2026
@github-actions github-actions bot added dco-signoff: yes Indicates the PR's author has signed the DCO. copilot labels Apr 1, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

❌ PR Title Verification Failed

Your PR title does not follow the required format.

Current title: [WIP] Fix excessive 'any' type usage to improve type safety

Required Format

PR titles must start with one of these emoji prefixes:

Emoji Meaning
⚠️ Breaking change
Non-breaking feature
🐛 Patch fix / Bug fix
📖 Documentation
🚀 Release
🌱 Infra/Tests/Other

How to Fix

Edit your PR title to start with the appropriate emoji. For example:

  • ✨ Add new feature for user authentication
  • 🐛 Fix crash when loading empty config
  • 📖 Update installation guide

You can edit the title by clicking the Edit button next to your PR title.


This comment was automatically posted by the PR Title Verifier workflow.

@clubanderson clubanderson changed the title [WIP] Fix excessive 'any' type usage to improve type safety 🐛 Fix excessive 'any' type usage to improve type safety Apr 1, 2026
@clubanderson clubanderson removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 1, 2026
@clubanderson clubanderson marked this pull request as ready for review April 1, 2026 08:07
Copilot AI review requested due to automatic review settings April 1, 2026 08:07
@kubestellar-prow kubestellar-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Apr 1, 2026
Copy link
Copy Markdown
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.

Copilot wasn't able to review any files in this pull request.

Fixes #issue - removes 'any' type from source files and test files

Signed-off-by: copilot <copilot@github.com>

Agent-Logs-Url: https://github.com/kubestellar/console/sessions/fba86eba-0537-4620-b746-4c312bd15348

Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@kubestellar-prow kubestellar-prow bot added dco-signoff: no Indicates the PR's author has not signed the DCO. and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Apr 1, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from clubanderson. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 1, 2026
@github-actions github-actions bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Apr 1, 2026
Copilot AI requested a review from clubanderson April 1, 2026 08:30
Copilot stopped work on behalf of clubanderson due to an error April 1, 2026 08:30
@clubanderson
Copy link
Copy Markdown
Collaborator

Build Failed (fd05711)

@copilot The build failed. Fix the error.

Logs: https://app.netlify.com/projects/kubestellarconsole/deploys/69ccd7155618640008b1ac2e

@github-actions github-actions bot mentioned this pull request Apr 1, 2026
@clubanderson
Copy link
Copy Markdown
Collaborator

Build failure appears to be a merge conflict with #4062 (component split refactor) which was just merged. The type safety changes themselves are correct — anyunknown/proper types in 3 source files + 62 test files. Needs a rebase to resolve conflicts with the extracted SnoozedCards components, then should pass CI.

clubanderson added a commit that referenced this pull request Apr 1, 2026
Rebased the type safety PR (#4085) on current main to resolve merge
conflicts with the component split (#4062). Also fixed 5 new type
errors introduced by the any→unknown change:
- kubectlProxy.ts: guard optional waitReason with ?? ''
- Marketplace.tsx: narrow unknown data with type guard before access

Original changes (from Copilot):
- 3 source files: any → unknown/proper types
- 62 test files: remove {} as any spreads, use typed props

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
clubanderson added a commit that referenced this pull request Apr 1, 2026
…#4098)

Rebased the type safety PR (#4085) on current main to resolve merge
conflicts with the component split (#4062). Also fixed 5 new type
errors introduced by the any→unknown change:
- kubectlProxy.ts: guard optional waitReason with ?? ''
- Marketplace.tsx: narrow unknown data with type guard before access

Original changes (from Copilot):
- 3 source files: any → unknown/proper types
- 62 test files: remove {} as any spreads, use typed props

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
Copy link
Copy Markdown
Collaborator

Superseded by #4098 which rebases this on current main and fixes the merge conflicts + type errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Auto-QA] 25 uses of 'any' type reduce type safety

3 participants