Skip to content

Add helium extension - #22290

Merged
raycastbot merged 7 commits into
raycast:mainfrom
IslamTayeb:ext/helium
Oct 30, 2025
Merged

raycastbot merged 7 commits into
raycast:mainfrom
IslamTayeb:ext/helium

Conversation

@IslamTayeb

@IslamTayeb IslamTayeb commented Oct 20, 2025 •

Copy link
Copy Markdown
Contributor

Description

Navigate open tabs, bookmarks, and the web in Helium browser through Raycast.

Screencast

Clipboard-20251020-063331-206.mp4

Checklist

RE: Greptile Issues

SQL injection vulnerability

The Arc extension follows the same SQL query construction method throughout its code. You can see this pattern in Arc's history.ts (lines 57-77) as well as in sql.ts (lines 1-21), where it's used for constructing download search queries. Arc even tries to handle quote escaping by replacing instances of " with "", but still utilizes string interpolation. Given the fact that the Arc extension is alive and well with this approach, I'd assume it's fine for me to utilize that same approach.

Windows compatibility

Initially accidentally published the extension w/ Windows compatibility active, removed that from package.json since then.

- refactor: formatting, new icon
- refactor: unnecessary side effects + remove console debugging
- feat: substring search
- feat: search bookmarks, open new window + incognito
- refactor: deprecate applescripts, refactor actions, ordering fix
- feat: search web, open new tab, using raycast-native API
- init
@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.

@IslamTayeb
IslamTayeb marked this pull request as ready for review October 20, 2025 02:08
@IslamTayeb
IslamTayeb marked this pull request as draft October 20, 2025 02:10

@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

Summary

Adds a new Helium browser extension for Raycast with 6 commands: tab search, bookmark search, web search, and window management. The extension integrates with Raycast's Browser Extension API for tab management and uses AppleScript for browser control and bookmark access.

Major changes:

  • Search open tabs using Browser Extension API
  • Search bookmarks via AppleScript parsing
  • Unified web search with suggestions, history, and tabs
  • Commands for opening new tabs, windows, and incognito windows
  • SQLite-based browsing history search
  • Multi-engine search support (Google, DuckDuckGo, Bing, Yahoo, Ecosia)

Critical issues:

  • SQL injection vulnerability in history search query construction
  • Platform configuration mismatch (lists Windows but uses macOS-only AppleScript)
  • Missing required metadata folder with screenshots
  • Manual Preferences interface violates autogeneration convention

Confidence Score: 1/5

  • This PR has a critical SQL injection vulnerability that must be fixed before merge
  • Score reflects critical security vulnerability in history.ts (SQL injection via direct string interpolation), platform configuration error that would mislead Windows users, and missing store requirements. The SQL injection issue poses a real security risk that must be resolved.
  • Critical attention needed: src/utils/history.ts (SQL injection), package.json (platform mismatch). Also need metadata folder with screenshots before store submission.

Important Files Changed

File Analysis

Filename Score Overview
extensions/helium/package.json 2/5 Manifest config for Helium extension with 6 commands. Critical: lists Windows support but uses macOS-only AppleScript
extensions/helium/src/utils/history.ts 1/5 History database search with SQL injection vulnerability in query construction (line 56-62)
extensions/helium/src/utils/suggestions.ts 3/5 Search engine suggestions with manual Preferences interface that should be auto-generated
extensions/helium/README.md 2/5 Minimal README without metadata folder containing required screenshots

Additional Comments (4)

  1. extensions/helium/src/utils/history.ts, line 56-62 (link)

    logic: SQL injection vulnerability: user input is directly interpolated into SQL query without proper parameterization. The single quote escaping on line 57 is insufficient protection.

    Use parameterized queries instead:

  2. extensions/helium/package.json, line 8-11 (link)

    logic: platform mismatch: extension lists Windows support but uses AppleScript throughout (src/utils/applescript.ts) which only works on macOS

    Context Used: Rule from dashboard - If an extension uses platform-specific APIs (like AppleScript or paths that only exists on on platfo... (source)

  3. extensions/helium/src/utils/suggestions.ts, line 11-13 (link)

    syntax: remove manual Preferences interface - it's autogenerated in raycast-env.d.ts

    Context Used: Context from dashboard - You shouldn't create the Preferences interface since it's autogenerated in raycast-env.d.ts when... (source)

  4. extensions/helium/README.md, line 1-3 (link)

    style: missing metadata folder with screenshots - extensions require at least one screenshot in a metadata folder for store submission

    Context Used: Rule from dashboard - Extensions must include at least one screenshot in a metadata folder for store submission. (source)

22 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

- feat: add metadata screenshots
- refactor: search web suggestion enhancements
- feat: edit README and package.json
- feat: add quicklink global action
Islam M. Tayeb added 2 commits October 20, 2025 02:16
- refactor: README
- feat: experimental space switching
@IslamTayeb
IslamTayeb marked this pull request as ready for review October 20, 2025 06:39
@lamarjambi

ghost commented Oct 20, 2025

Copy link
Copy Markdown

insane feature!!

ghost 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

Summary

This PR adds a new Helium browser extension for Raycast that enables searching and navigating tabs, bookmarks, and the web. The implementation follows Raycast extension best practices and patterns established by similar extensions like Arc.

Key features:

  • Search and switch between open tabs using Browser Extension API
  • Search bookmarks via AppleScript integration
  • Unified web search with tabs, history, and search suggestions
  • Support for multiple search engines (Google, DuckDuckGo, Bing, Yahoo, Ecosia)
  • Optional experimental Space switching workaround (disabled by default)

Code quality highlights:

  • Uses getFavicon from @raycast/utils correctly
  • Proper macOS platform restriction in package.json
  • SQL query construction follows the Arc extension pattern with quote escaping
  • Good error handling and empty state management
  • Clean separation of concerns with utility modules

Minor suggestion:

  • Consider using autogenerated Preferences type from raycast-env.d.ts instead of manually defining interface

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Code follows established Raycast extension patterns, uses proper APIs, includes appropriate error handling, and has correct platform restrictions. The SQL query construction follows the same pattern used in the Arc extension. Only one minor style suggestion about using autogenerated types.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
extensions/helium/package.json 5/5 package configuration looks good with correct macOS platform restriction, appropriate dependencies, and proper preference definitions
extensions/helium/src/utils/applescript.ts 4/5 AppleScript integration for Helium browser operations - should use autogenerated Preferences type instead of manual interface
extensions/helium/src/utils/history.ts 5/5 history search using SQL with proper quote escaping, follows established Arc extension pattern for SQL query construction
extensions/helium/src/search-web.tsx 5/5 unified search interface combining tabs, history, and web suggestions with proper section organization

Additional Comments (1)

  1. extensions/helium/src/utils/applescript.ts, line 4-6 (link)

    style: shouldn't manually create Preferences interface - autogenerated in raycast-env.d.ts when extension runs

    Context Used: Context from dashboard - You shouldn't create the Preferences interface since it's autogenerated in raycast-env.d.ts when... (source)

8 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

- refactor: remove redundant Preferences type
- fix: space re-ordering
@pernielsentikaer

ghost commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

Could you look into feedback from Greptile, @IslamTayeb

@pernielsentikaer
pernielsentikaer marked this pull request as draft October 21, 2025 10:38
@IslamTayeb

ghost commented Oct 21, 2025 •

Copy link
Copy Markdown
Contributor Author

@pernielsentikaer My latest commit (right after the greptile comment) addresses the local Preferences interface piece, first greptile comment is outdated I thought (besides, its feedback is accounted for in the main PR message or code changes), anything else?

@IslamTayeb
IslamTayeb marked this pull request as ready for review October 21, 2025 10:55

ghost 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

Summary

This PR adds a new Helium browser extension for Raycast that enables tab navigation, bookmark management, and web search functionality.

Key Changes

  • Implements AppleScript-based browser control for Helium
  • Includes tab switching, bookmark retrieval, and window management
  • Adds experimental macOS Space switching workaround (disabled by default)
  • Follows established patterns from Arc extension for SQL history queries
  • Proper escaping for AppleScript string interpolation (\" for quotes, \\\\ for backslashes)
  • Platform restriction correctly set to macOS only
  • Includes metadata screenshots and proper Prettier/ESLint configuration

SQL Injection Concern (Addressed)

The author correctly notes that the SQL query construction in history.ts follows the same pattern as the Arc extension. While string interpolation is used, single quotes are properly escaped with replace(/'/g, "''") before interpolation. This is acceptable given it matches the established Arc extension pattern and uses SQLite's standard escaping.

Notable Implementation

  • Experimental Space switching uses a creative workaround by opening/closing a temporary tab to trigger Raycast's open() API
  • Well-documented code with clear explanations of workarounds and limitations
  • Consistent error handling throughout AppleScript functions

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • Score reflects well-documented code following established patterns from Arc extension. Minor style improvement suggested for bookmark parsing, but no critical issues found. SQL escaping follows existing conventions, AppleScript string escaping is correct, and platform restrictions are properly configured.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
extensions/helium/src/utils/applescript.ts 4/5 New file adding AppleScript integration for Helium browser control, including tab switching, bookmark retrieval, and window management with experimental Space switching workaround

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@IslamTayeb IslamTayeb closed this Oct 21, 2025
@IslamTayeb IslamTayeb reopened this Oct 21, 2025

ghost 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

Summary

This PR adds a well-structured Helium browser extension to Raycast, providing tab management, bookmark search, and web search functionality.

Key Changes:

  • Tab Management: Integrates with Raycast's Browser Extension API for searching and switching between open tabs
  • Bookmark Search: Uses AppleScript to fetch and search Helium bookmarks across bookmarks bar and other folders
  • History Search: Queries Chromium-based history database with proper SQL escaping
  • Web Search: Multi-engine support (Google, DuckDuckGo, Bing, Yahoo, Ecosia) with API-based suggestions
  • Experimental Space Switching: Optional workaround for macOS Space switching using temporary tab technique
  • Configuration: Proper macOS platform restriction, Prettier config, and ESLint setup following Raycast standards

Code Quality:

  • Follows established patterns from similar browser extensions (Arc)
  • Good error handling and permission checks throughout
  • Proper use of optimistic updates for tab closing
  • SQL injection concerns addressed (escaping single quotes, following Arc's approach)
  • Clean separation of concerns with utility functions

Minor Issue:

  • One custom HeliumPreferences interface that should use the autogenerated Preferences type instead

Confidence Score: 5/5

  • This PR is safe to merge with only a minor style improvement needed
  • The extension is well-implemented following Raycast best practices and patterns from similar extensions. The code has proper error handling, uses established Raycast APIs correctly, includes appropriate platform restrictions, and addresses previous feedback about SQL injection. The only issue is a minor style preference about using autogenerated types rather than custom interfaces.
  • No files require special attention - the one comment on suggestions.ts is a minor style improvement

Important Files Changed

File Analysis

Filename Score Overview
extensions/helium/package.json 5/5 New extension configuration with proper macOS platform restriction, preferences, and commands
extensions/helium/src/utils/applescript.ts 4/5 AppleScript integration for tab/window management with experimental Space switching workaround
extensions/helium/src/utils/suggestions.ts 5/5 Search engine suggestions with URL detection and multi-engine support
extensions/helium/src/search-web.tsx 5/5 Unified search view combining tabs, history, and web suggestions
extensions/helium/.prettierrc 5/5 Prettier config matching Raycast standards (printWidth: 120, singleQuote: false)
extensions/helium/eslint.config.js 5/5 ESLint config using correct import path from eslint/config

22 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@IslamTayeb

ghost commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

@greptileai

@IslamTayeb

ghost commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

Update: seems like I had missed a few points from Greptile, made sure to implement again

ghost 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

Summary

This PR adds a new Helium browser extension for Raycast with commands to search tabs, bookmarks, and the web. The implementation addresses previous feedback by using newline delimiters for bookmark parsing (line 420) and relying on autogenerated Preferences types.

Key changes:

  • applescript.ts implements AppleScript utilities for browser integration with proper URL escaping and error handling
  • suggestions.ts provides search suggestions with multiple engine support (Google, DuckDuckGo, Bing, Yahoo, Ecosia)
  • Both files follow Raycast extension patterns and use the @raycast/utils package appropriately
  • Platform restriction correctly set to macOS only in package.json

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The code demonstrates solid quality with proper error handling, type safety, and adherence to Raycast extension best practices. Previous feedback regarding bookmark delimiters and Preferences types has been correctly addressed. The extension is appropriately restricted to macOS, uses standard Raycast utilities, and implements reasonable fallback behaviors.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
extensions/helium/src/utils/applescript.ts 5/5 Implements AppleScript utilities for Helium browser integration - tab switching, bookmark retrieval, and window management with proper escaping and error handling
extensions/helium/src/utils/suggestions.ts 5/5 Provides web search suggestions with multiple search engine support and proper type safety

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

ghost 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 2a0fab2 into raycast:main Oct 30, 2025
@github-actions

ghost commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Oct 30, 2025

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.

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 platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants