Skip to content

Add ai-stats extension - #21393

Closed
JonathanRReed wants to merge 10 commits into
raycast:mainfrom
JonathanRReed:ext/ai-stats
Closed

JonathanRReed wants to merge 10 commits into
raycast:mainfrom
JonathanRReed:ext/ai-stats

Conversation

@JonathanRReed

@JonathanRReed JonathanRReed commented Sep 6, 2025 •

Copy link
Copy Markdown
Contributor

Description

Screencast

Checklist

- docs: add privacy policy, preferences docs and improve error handling
- chore: package update
- docs: move screenshots from metadata to assets folder and add commands section
- feat: improve UI with N/A placeholders, enhanced copy options and metadata display
- docs: add screenshots and usage instructions to README
- refactor: add default Supabase credentials and remove preference fields
- feat: unify model search and leaderboard into single view with pinning and filtering
- feat: improve UI with creator filter dropdown, reset filters, and cleaner model display
- feat: add pinned section toggle and pin reordering to model search
- feat: support pinning up to 10 models with dedicated pinned section
- docs: update README and add model pinning with quick switcher menu
- int
@raycastbot raycastbot added the new extension Label for PRs with new extensions label Sep 6, 2025
@raycastbot

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

You can expect an initial review within five business days.

Once the PR is approved and merged, the extension will be available on our Store.

@JonathanRReed
JonathanRReed marked this pull request as ready for review September 6, 2025 06:42

@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 Summary

This PR introduces a new ai-stats extension that provides Raycast users with access to AI model statistics and leaderboards. The extension integrates with ArtificialAnalysis.ai data via a read-only Supabase backend, offering search functionality, price comparisons, benchmark results, and detailed model information.

• Core Features: Model search, leaderboard rankings, pricing data, benchmark scores, and pinning functionality
• Architecture: Uses React components with Raycast API, Supabase client for data fetching, and local storage for user preferences
• Configuration: Proper ESLint/Prettier setup following Raycast guidelines with optional Supabase override preferences
• Store Readiness: Minor issue with screenshot placement - they need to be moved from assets to metadata folder for store submission

Confidence score: 4/5

  • This PR is safe to merge with minimal changes needed for store compliance
  • Well-structured code following Raycast conventions with proper TypeScript typing, error handling, and configuration. Only minor store compliance issue with screenshot placement.
  • Screenshot folder structure needs adjustment for store submission

Important Files Changed

File Analysis
Filename Score Overview Issues
extensions/ai-stats/package.json 5/5 Extension configuration with proper dependencies and Node.js version requirement None identified
extensions/ai-stats/src/view_ui.tsx 4/5 Main React component with search, leaderboard, and detail views for AI model statistics None identified
extensions/ai-stats/src/lib/supabase.ts 4/5 Supabase client configuration with fallback defaults and preference-based overrides None identified
extensions/ai-stats/.prettierrc 5/5 Prettier configuration matching Raycast guidelines None identified
extensions/ai-stats/eslint.config.js 5/5 ESLint configuration extending Raycast's standard config None identified

12 files reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

Comment thread extensions/ai-stats/package.json Resolved
- chore: move screenshot assets from assets/ to metadata/ directory
- chore: clean up of readme.md & minor ui fixes
- refactor: extract prop type interfaces and add type roots config
- chore: add Node.js version requirement to package.json
- docs: add privacy policy, preferences docs and improve error handling
- chore: package update
- docs: move screenshots from metadata to assets folder and add commands section
- feat: improve UI with N/A placeholders, enhanced copy options and metadata display
- docs: add screenshots and usage instructions to README
- refactor: add default Supabase credentials and remove preference fields
- feat: unify model search and leaderboard into single view with pinning and filtering
- feat: improve UI with creator filter dropdown, reset filters, and cleaner model display
- feat: add pinned section toggle and pin reordering to model search
- feat: support pinning up to 10 models with dedicated pinned section
- docs: update README and add model pinning with quick switcher menu
- int

@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.

Hi 👋

Thanks for your contribution 💪

I have now tested your extension, and I have some feedback ready for you:

  • Could be nice to show the isLoading property on the <List> and maybe utilize useCachedPromise for the data being fetched faster?

  • It feels like something is wrong with the colors, it's pretty red, not sure what you think here?

ai-stats 2025-09-09 at 10 15 35

I'm looking forward to testing this extension again 🔥

Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.

@pernielsentikaer
pernielsentikaer marked this pull request as draft September 9, 2025 08:16
@JonathanRReed

Copy link
Copy Markdown
Contributor Author

Listened to feedback: reduced “all red” colors, improved loading with isLoading + useCachedPromise, and kept pins cached locally. Decided to skip heavy global caching to avoid stale data. It also avoids forcing the user to manually refresh to get the most up-to-date info.

@JonathanRReed

Copy link
Copy Markdown
Contributor Author

Updated the screenshots with the new colors.

@JonathanRReed
JonathanRReed marked this pull request as ready for review September 9, 2025 15:54

@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 Summary

This PR adds a new ai-stats extension that provides AI model benchmarks and pricing data through a Supabase backend. The extension features search functionality, leaderboards by different metrics, and detailed model information views with proper TypeScript typing and React hooks usage.

Key Features Added:

  • Search and filter AI models by name, creator, and other criteria
  • Leaderboard view for various metrics (MMLU Pro, GPQA, pricing, throughput)
  • Pin/unpin functionality for favorite models
  • Detailed model information with benchmarks, pricing, and performance data
  • Proper metadata folder structure with screenshots for Raycast store submission

Issues Found:

  • Hardcoded Supabase credentials exposed in source code
  • Memory leak potential in debounced search implementation missing cleanup

Confidence score: 3/5

  • This PR introduces security concerns with hardcoded credentials and has a minor memory leak issue
  • Score reflects the hardcoded Supabase credentials which is a security vulnerability, plus a missing cleanup in useEffect that could cause memory leaks. The extension is otherwise well-structured.
  • extensions/ai-stats/src/lib/supabase.ts needs credential externalization, extensions/ai-stats/src/view_ui.tsx needs useEffect cleanup

Important Files Changed

File Analysis
Filename Score Overview Issues
extensions/ai-stats/package.json 4/5 Well-structured package configuration with proper dependencies and commands None identified
extensions/ai-stats/src/view_ui.tsx 3/5 Complex React component with search, leaderboards and model details functionality Memory leak in debounce cleanup missing
extensions/ai-stats/src/lib/supabase.ts 2/5 Supabase client configuration with fallback credentials Hardcoded credentials exposed in source code

3 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

Comment thread extensions/ai-stats/src/lib/supabase.ts Resolved
Comment thread extensions/ai-stats/src/view_ui.tsx Resolved
…ebounced search timeouts and implement tiered config resolution for Supabase credentials
@JonathanRReed

Copy link
Copy Markdown
Contributor Author

fix: targeted errors found in greptile-apps bot, kept Supabase but allowed users to change it if they want. The Supabase keys are anonymous & publishable. The DB has RLS enabled & configured.

…i.tsx

- Updated dependencies in package-lock.json for various packages including @eslint-community/eslint-utils, @oclif/core, and @supabase libraries.
- Enhanced user interactions in view_ui.tsx by adding keyboard shortcuts for pinning actions and displaying toast notifications for pinning/unpinning models.
@pernielsentikaer

Copy link
Copy Markdown
Contributor
  • When you're in the view below and pin a model, should it maybe go back to the list or redraw the view so that it's possible to unpin directly again?
ai-stats 2025-09-10 at 14 46 59
  • I'm not sure it makes sense to let the user start in the view below; it creates a really bad flicker when you enter the extensions
ai-stats 2025-09-10 at 14 47 42

@JonathanRReed

Copy link
Copy Markdown
Contributor Author

I'll try to resolve those later today!

@JonathanRReed
JonathanRReed deleted the ext/ai-stats branch September 10, 2025 19:12
@JonathanRReed

Copy link
Copy Markdown
Contributor Author

Had problems with uploading the new PR, so I made a new one. Sorry. #21480

@JonathanRReed JonathanRReed mentioned this pull request Sep 10, 2025
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants