这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@ralt
Copy link
Contributor

@ralt ralt commented Nov 13, 2025

  • Replace all 'any' types with specific TypeScript interfaces
  • Add InsightValue, InsightDimensions, InsightDataItem, and InsightResponse types
  • Import Chart.js types (ChartData, ChartOptions, TooltipItem) for type safety
  • Add proper undefined checks to prevent "possibly undefined" errors
  • Add computed property to detect when insights are disabled
  • Show user-friendly message to contact support when insights are disabled

🤖 Generated with Claude Code

- Replace all 'any' types with specific TypeScript interfaces
- Add InsightValue, InsightDimensions, InsightDataItem, and InsightResponse types
- Import Chart.js types (ChartData, ChartOptions, TooltipItem) for type safety
- Add proper undefined checks to prevent "possibly undefined" errors
- Add computed property to detect when insights are disabled
- Show user-friendly message to contact support when insights are disabled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Theosakamg Theosakamg requested a review from Copilot November 13, 2025 13: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 improves type safety and user experience in the InsightsCard component by replacing loose any types with strict TypeScript interfaces and adding detection for disabled insights.

  • Replaces any types with specific TypeScript interfaces (InsightValue, InsightDimensions, InsightDataItem, InsightResponse)
  • Imports Chart.js types and adds proper undefined checks for type safety
  • Adds a computed property to detect when insights are disabled and displays a user-friendly message

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

@Theosakamg
Copy link
Collaborator

LGTM

Theosakamg and others added 2 commits November 13, 2025 14:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Theosakamg Theosakamg merged commit 81282d0 into master Nov 13, 2025
1 check passed
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