Skip to content

Conversation

@xmok
Copy link
Contributor

@xmok xmok commented Nov 22, 2025

NOTE

I have left some any in the extension for compatibility. I will attempt to remove in future updates with improved fetching process altogether.

Description

  • Modernize to use latest Raycast eslint configuration
  • Fix issue where "accountEnvato" would crash on first run due to missing cache
  • Show tooltip on badges
  • Add error handling in case of failed download link retrieval
  • Show error_code in error message
  • Fix "verifyPurchaseCode" where it would resubmit onchange

Screencast

envato-account-crash.yafw.balanced.mp4

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: envato Issues related to the envato extension platform: macOS OP is contributor The OP of the PR is a contributor of the extension labels Nov 22, 2025
@raycastbot
Copy link
Collaborator

raycastbot commented Nov 22, 2025

Thank you for your contribution! 🎉

🔔 @Slllava @3llomi you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

Due to our current reduced availability, the initial review may take up to 10 business days.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 22, 2025

Greptile Overview

Greptile Summary

This PR modernizes the Envato extension with critical bug fixes and improved error handling. The key fix prevents accountEnvato from crashing on first run when cache is empty by adding a conditional check (cached ? JSON.parse(cached) : stateFetch). Other improvements include wrapping the verifyPurchase submission in useEffect to prevent resubmission on form changes, adding try-catch error handling for download link retrieval, showing error codes in messages, and adding tooltips to badges.

Major Changes:

  • Fixed crash in accountEnvato when cache is empty on first run
  • Fixed verifyPurchase resubmitting on every form change by moving submission to useEffect
  • Added error handling for download link retrieval in list-purchases
  • Modernized to use latest Raycast eslint configuration (@raycast/eslint-config v2.0.4)
  • Improved type safety by replacing any types with proper types
  • Updated dependencies to latest versions
  • Added tooltips to badge accessories

Confidence Score: 4/5

  • This PR is safe to merge with minor comments to address
  • The changes fix real bugs and improve code quality. The cache fix is critical and correct. Minor issues include missing version in CHANGELOG and useEffect dependency array warning
  • Check CHANGELOG.md for version number and verifyPurchase.tsx for useEffect dependencies

Important Files Changed

File Analysis

Filename Score Overview
extensions/envato/src/accountEnvato.tsx 5/5 Fixes crash on first run by adding cache check, removes unnecessary String() wrapping
extensions/envato/src/verifyPurchase.tsx 4/5 Fixes form resubmission bug with useEffect, improves error handling
extensions/envato/src/list-purchases.tsx 5/5 Adds error handling to download function with try-catch
extensions/envato/src/utils.ts 5/5 Modernizes imports and improves error handling with proper type checking
extensions/envato/src/types.ts 5/5 Improves type safety by replacing any with proper types

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

15 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@pernielsentikaer pernielsentikaer self-assigned this Nov 24, 2025
Copy link
Collaborator

@pernielsentikaer pernielsentikaer left a comment

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 a2ce02f into raycast:main Nov 24, 2025
2 checks passed
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/astroon/envato

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

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

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

Labels

extension: envato Issues related to the envato extension extension fix / improvement Label for PRs with extension's fix improvements OP is contributor The OP of the PR is a contributor of the extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants