Skip to content

Add codex-open extension#27548

Open
Miaonster wants to merge 2 commits intoraycast:mainfrom
Miaonster:ext/codex-open
Open

Add codex-open extension#27548
Miaonster wants to merge 2 commits intoraycast:mainfrom
Miaonster:ext/codex-open

Conversation

@Miaonster
Copy link
Copy Markdown

@Miaonster Miaonster commented Apr 30, 2026

Description

Screencast

Checklist

- Ignore local npm config
- Switch extension project to npm
- Initial Raycast Codex Open extension
@raycastbot raycastbot added the new extension Label for PRs with new extensions label Apr 30, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

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

- Add extension screenshot
- Remove worktree open action
- Set command icon
@Miaonster Miaonster marked this pull request as ready for review May 1, 2026 00:47
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 1, 2026

Greptile Summary

This PR adds a new codex-open extension that searches VS Code Project Manager projects and opens them in the Codex editor via a bundled codex:// URL scheme shell script, with support for frecency sorting, tag filtering, and grouping.

  • package.json is missing the required categories field, which will block store publishing.
  • The Preferences interface in types.ts is manually defined rather than relying on the auto-generated raycast-env.d.ts type, and the ESLint config bypasses the standard @raycast/eslint-config preset.

Confidence Score: 3/5

Not ready to merge — missing categories field in package.json will prevent store publishing, and several convention violations need to be addressed first.

One P1 finding (missing categories) acts as a publishing blocker, pulling the score below the P1 ceiling of 4. The remaining P2s (changelog date placeholder, manual Preferences type, custom ESLint config, closeMainWindow ordering) are straightforward fixes that don't affect core runtime correctness.

extensions/codex-open/package.json (missing categories), extensions/codex-open/src/types.ts (manual Preferences), extensions/codex-open/eslint.config.mjs (non-standard ESLint setup), extensions/codex-open/CHANGELOG.md (hardcoded date).

Important Files Changed

Filename Overview
extensions/codex-open/package.json Missing required categories field — extension cannot be properly published to the Raycast store without it.
extensions/codex-open/src/search-project-manager-projects.tsx Main command implementation: reads VS Code Project Manager JSON files, deduplicates entries, supports frecency sorting, tag filtering and grouping. closeMainWindow() fires before the async execFile callback, so error toasts may be missed by users.
extensions/codex-open/src/types.ts Manually defines Preferences interface, which should instead rely on the auto-generated raycast-env.d.ts type.
extensions/codex-open/CHANGELOG.md Uses a hardcoded date (2026-04-30) instead of the required {PR_MERGE_DATE} placeholder.
extensions/codex-open/eslint.config.mjs Custom ESLint config that bypasses @raycast/eslint-config and does not use defineConfig from eslint/config as required by repo conventions.
extensions/codex-open/assets/codex-open Bundled POSIX shell script that opens paths in Codex via the codex:// URL scheme; supports single path and --all worktree modes. Logic is sound and defensively written.
extensions/codex-open/.prettierrc Correctly configured with printWidth: 120 and singleQuote: false per repo standards.
Prompt To Fix All With AI
Fix the following 5 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 5
extensions/codex-open/CHANGELOG.md:3
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**

The changelog uses a hardcoded date (`2026-04-30`) instead of the standard Raycast template placeholder. The date should be `{PR_MERGE_DATE}` so it is automatically populated when the PR is merged.

```suggestion
## [Initial Release] - {PR_MERGE_DATE}
```

### Issue 2 of 5
extensions/codex-open/src/types.ts:16-22
**Manually defined `Preferences` interface**

The `Preferences` interface is manually defined here and then used as `getPreferenceValues<Preferences>()`. Raycast auto-generates this type in `raycast-env.d.ts` when the extension runs, so manual definitions can drift out of sync with `package.json` and cause type mismatches. Remove the manual `Preferences` interface and let the auto-generated type handle it.

### Issue 3 of 5
extensions/codex-open/eslint.config.mjs:1-26
**Custom ESLint config instead of `@raycast/eslint-config`**

This file sets up a bespoke ESLint config instead of using the standard Raycast ESLint config with `defineConfig` from `eslint/config`. The recommended pattern for Raycast extensions is:

```js
import { defineConfig } from "eslint/config";
import raycast from "@raycast/eslint-config";

export default defineConfig([...raycast]);
```

The custom config also skips the `@raycast/eslint-config` preset, which may miss Raycast-specific lint rules enforced across the extensions repo.

### Issue 4 of 5
extensions/codex-open/package.json:1-10
**Missing `categories` field**

The extension has no `categories` field in `package.json`. Every extension must include at least one predefined category for store discoverability. For this extension (a developer utility that opens projects in a code editor), `Developer Tools` is the appropriate category:

```json
"categories": ["Developer Tools"],
```

### Issue 5 of 5
extensions/codex-open/src/search-project-manager-projects.tsx:261-276
**`closeMainWindow()` called before async result is known**

`closeMainWindow()` is executed synchronously — before the `execFile` callback fires. On failure the error toast appears after the window is already gone, which can make it easy for users to miss. Consider only closing the window on success.

Reviews (1): Last reviewed commit: "Update codex-open extension" | Re-trigger Greptile

@@ -0,0 +1,6 @@
# Codex Open Changelog

## [Initial Version] - 2026-04-30
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.

P2 Hardcoded date instead of {PR_MERGE_DATE} placeholder

The changelog uses a hardcoded date (2026-04-30) instead of the standard Raycast template placeholder. The date should be {PR_MERGE_DATE} so it is automatically populated when the PR is merged.

Suggested change
## [Initial Version] - 2026-04-30
## [Initial Release] - {PR_MERGE_DATE}

Rule Used: What: In Raycast extension changelogs, `{PR_MERGE_... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex-open/CHANGELOG.md
Line: 3

Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**

The changelog uses a hardcoded date (`2026-04-30`) instead of the standard Raycast template placeholder. The date should be `{PR_MERGE_DATE}` so it is automatically populated when the PR is merged.

```suggestion
## [Initial Release] - {PR_MERGE_DATE}
```

**Rule Used:** What: In Raycast extension changelogs, `{PR_MERGE_... ([source](https://app.greptile.com/review/custom-context?memory=799af734-ebd9-4b40-9ffd-97a70fc71c8a))

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +16 to +22
export interface Preferences {
projectManagerDataPath?: string;
groupProjectsByTag: boolean;
hideProjectsWithoutTag: boolean;
hideProjectsNotEnabled: boolean;
vscodeApp?: Application;
}
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.

P2 Manually defined Preferences interface

The Preferences interface is manually defined here and then used as getPreferenceValues<Preferences>(). Raycast auto-generates this type in raycast-env.d.ts when the extension runs, so manual definitions can drift out of sync with package.json and cause type mismatches. Remove the manual Preferences interface and let the auto-generated type handle it.

Rule Used: What: Don't manually define Preferences for `get... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex-open/src/types.ts
Line: 16-22

Comment:
**Manually defined `Preferences` interface**

The `Preferences` interface is manually defined here and then used as `getPreferenceValues<Preferences>()`. Raycast auto-generates this type in `raycast-env.d.ts` when the extension runs, so manual definitions can drift out of sync with `package.json` and cause type mismatches. Remove the manual `Preferences` interface and let the auto-generated type handle it.

**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/review/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +1 to +26
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";

export default [
{
ignores: ["dist/**", "node_modules/**"],
},
{
files: ["src/**/*.{ts,tsx}"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
},
plugins: {
"@typescript-eslint": tseslint,
},
rules: {
...tseslint.configs.recommended.rules,
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
},
];
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.

P2 Custom ESLint config instead of @raycast/eslint-config

This file sets up a bespoke ESLint config instead of using the standard Raycast ESLint config with defineConfig from eslint/config. The recommended pattern for Raycast extensions is:

import { defineConfig } from "eslint/config";
import raycast from "@raycast/eslint-config";

export default defineConfig([...raycast]);

The custom config also skips the @raycast/eslint-config preset, which may miss Raycast-specific lint rules enforced across the extensions repo.

Rule Used: What: In ESLint v9+, defineConfig is exported fr... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex-open/eslint.config.mjs
Line: 1-26

Comment:
**Custom ESLint config instead of `@raycast/eslint-config`**

This file sets up a bespoke ESLint config instead of using the standard Raycast ESLint config with `defineConfig` from `eslint/config`. The recommended pattern for Raycast extensions is:

```js
import { defineConfig } from "eslint/config";
import raycast from "@raycast/eslint-config";

export default defineConfig([...raycast]);
```

The custom config also skips the `@raycast/eslint-config` preset, which may miss Raycast-specific lint rules enforced across the extensions repo.

**Rule Used:** What: In ESLint v9+, `defineConfig` is exported fr... ([source](https://app.greptile.com/review/custom-context?memory=ded2e079-95d0-44a7-80b5-83bbe04916f5))

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +1 to +10
{
"$schema": "https://www.raycast.com/schemas/extension.json",
"name": "codex-open",
"title": "Codex Open",
"description": "Search VS Code Project Manager projects and open them in Codex",
"icon": "command-icon.png",
"author": "miaonster",
"license": "MIT",
"commands": [
{
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.

P1 Missing categories field

The extension has no categories field in package.json. Every extension must include at least one predefined category for store discoverability. For this extension (a developer utility that opens projects in a code editor), Developer Tools is the appropriate category:

"categories": ["Developer Tools"],

Rule Used: What: Assign at least one predefined category to e... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex-open/package.json
Line: 1-10

Comment:
**Missing `categories` field**

The extension has no `categories` field in `package.json`. Every extension must include at least one predefined category for store discoverability. For this extension (a developer utility that opens projects in a code editor), `Developer Tools` is the appropriate category:

```json
"categories": ["Developer Tools"],
```

**Rule Used:** What: Assign at least one predefined category to e... ([source](https://app.greptile.com/review/custom-context?memory=f49debbf-b6f6-4c0d-9b35-e1927815992b))

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +261 to +276
function runCodexOpen(args: string[], successTitle: string) {
execFile("/bin/sh", [CODEX_OPEN_SCRIPT, ...args], (error, _stdout, stderr) => {
if (error) {
showToast({
style: Toast.Style.Failure,
title: "Unable to open Codex",
message: stderr.trim() || error.message,
});
return;
}

showToast({ style: Toast.Style.Success, title: successTitle });
});

closeMainWindow();
}
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.

P2 closeMainWindow() called before async result is known

closeMainWindow() is executed synchronously — before the execFile callback fires. On failure the error toast appears after the window is already gone, which can make it easy for users to miss. Consider only closing the window on success.

Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/codex-open/src/search-project-manager-projects.tsx
Line: 261-276

Comment:
**`closeMainWindow()` called before async result is known**

`closeMainWindow()` is executed synchronously — before the `execFile` callback fires. On failure the error toast appears after the window is already gone, which can make it easy for users to miss. Consider only closing the window on success.

How can I resolve this? If you propose a fix, please make it concise.

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.

2 participants