Skip to content

[Serie A] Update extensions - #22427

Merged
raycastbot merged 6 commits into
raycast:mainfrom
anhthang:serie-a
Oct 28, 2025
Merged

raycastbot merged 6 commits into
raycast:mainfrom
anhthang:serie-a

Conversation

@anhthang

Copy link
Copy Markdown
Contributor

Description

  • Migrate to new API
  • Code improvements

Screencast

serie-a-1

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: lega-serie-a Issues related to the lega-serie-a extension platform: macOS platform: Windows OP is author The OP of the PR is the author of the extension labels Oct 26, 2025
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

You can expect an initial review within five business days.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Migrates the Serie A extension to a new API v3 endpoint while maintaining backward compatibility with the legacy API for historical seasons (2022-23 and earlier). The update modernizes the codebase by adopting @raycast/utils hooks like usePromise for better async state management and error handling.

Key improvements:

  • Introduced dual API support: v3 for recent seasons (2023-24 onwards) and legacy API for historical data
  • Replaced manual state management with usePromise hook across all components for cleaner async operations
  • Added @raycast/utils for improved error handling with showFailureToast
  • Extracted utility functions (getFlagEmoji, positionMap) to shared module for code reuse
  • Removed unnecessary API call in player component by reusing squad data
  • Updated dependencies to latest versions and added Windows platform support
  • Added API key preference for accessing detailed statistics

Issue found:

  • Cache key mismatch in getSquad function that will cause the cache lookup to fail (line 123 in src/api/index.ts)

Confidence Score: 4/5

  • This PR is safe to merge after fixing the cache key bug
  • The PR demonstrates excellent code modernization with proper migration to hooks and improved error handling. However, there's a critical cache key mismatch bug in the getSquad function that will prevent proper cache retrieval. The bug is straightforward to fix and won't cause data corruption, just unnecessary API calls.
  • Review src/api/index.ts - fix the cache key bug on line 123

Important Files Changed

File Analysis

Filename Score Overview
extensions/lega-serie-a/src/api/index.ts 4/5 Migrated to new API structure with improved error handling and added v3 API endpoints. Has potential cache key bug in getSquad.
extensions/lega-serie-a/package.json 5/5 Updated dependencies to latest versions, improved descriptions, added API key preference, and added Windows platform support.
extensions/lega-serie-a/src/table.tsx 5/5 Refactored to use usePromise hook, split into new v3 and legacy standing components, removed deprecated player action.
extensions/lega-serie-a/src/components/standing.tsx 5/5 New component for v3 API standings with improved stats display, form indicators, and movement icons.
extensions/lega-serie-a/CHANGELOG.md 3/5 Updated with new API migration entry but uses current date instead of PR merge date per custom rules.

20 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@anhthang
anhthang force-pushed the serie-a branch 2 times, most recently from 73ab276 to c8ce2ec Compare October 28, 2025 03:43
@pernielsentikaer pernielsentikaer self-assigned this Oct 28, 2025

@pernielsentikaer pernielsentikaer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit 5bc4749 into raycast:main Oct 28, 2025
@github-actions

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@anhthang
anhthang deleted the serie-a branch October 28, 2025 08:24
csymons pushed a commit to csymons/raycast-extensions that referenced this pull request Oct 29, 2025
- update dependencies
- fix(scheduler): add missing code changes
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
- [Linear] Use API-provided notification presentation (raycast#22285)
- Update CODEOWNERs (1a7209e)
- Update harvest extension (raycast#22256)
- Update CODEOWNERs (13787cd)
- Fix finding button in Tahoe. (raycast#22330)
- Update GitHub Actions workflow for PR approvals (raycast#22487)
- Docs: update for the new API release
- Update CODEOWNERs (77f6477)
- Added support for Asana sections (raycast#21912)
- Update auto-label workflow for PR approvals (raycast#22484)
- Update GitHub Actions workflow to set effective token (raycast#22482)
- Update workflow to use pull_request_review event (raycast#22479)
- Update CODEOWNERs (d5727aa)
- Add action to generate and copy private links (raycast#22273)
- Enhance PR approval labeling workflow (raycast#22477)
- Chatgpt atlas bookmarks improvement (raycast#22371)
- Add windows support  (raycast#22367)
- Update diskutil-mac extension (raycast#22307)
- [Secret Browser Commands] add ChatGPT Atlas, etc (raycast#22348)
- Update deployhq extension (raycast#22319)
- [Serie A] Update extensions (raycast#22427)
- package-lock.json update
- fix: add missing BACKGROUND_REFRESH_STATUS to STORAGE_KEYS
- Merge branch \'contributions/merge-1761638558070\'
- Pull contributions
- update changelog
- docs: update CHANGELOG for background refresh alert feature
- feat: add background refresh status alert to scheduled command form
tktcorporation added a commit to tktcorporation/extensions that referenced this pull request Nov 2, 2025