Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

Adds idempotent --add-project <path> flag to server mode.

If project exists at path, opens it. If not, creates it then opens it.

Frontend auto-navigates to first workspace in the project if available.

Generated with cmux

Add idempotent --add-project <path> flag that:
- Checks if project exists at specified path
- Creates project if it doesn't exist
- Sets launch project hint for frontend
- Frontend auto-selects first workspace in project

Backend changes:
- Added --add-project CLI flag to main-server.ts
- Added launchProjectPath tracking variable
- Added getHandler() method to HttpIpcMainAdapter
- Implemented initializeProject() to check/create project
- Added server:getLaunchProject IPC endpoint

Frontend changes:
- Added server.getLaunchProject() to browser API
- Added server property to IPCApi type
- Added useEffect in AppLoader to check launch project
- Auto-navigates to first workspace if available

_Generated with `cmux`_
Reassign projectPath directly instead of creating unnecessary variable.

_Generated with `cmux`_
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Validate and normalize path (expand tilde, make absolute) before
comparing with existing projects and storing in launchProjectPath.
This ensures ~/foo matches /home/user/foo in config and frontend
can match normalized paths in workspace metadata.

_Generated with `cmux`_
- Move validateProjectPath to static import
- Remove unnecessary async from getLaunchProject handler
- Handle error template literal types properly
- Add proper type casting for projectsList
- Use void for fire-and-forget initializeProject call

_Generated with `cmux`_
@ibetitsmike ibetitsmike added this pull request to the merge queue Nov 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 10, 2025
@ibetitsmike ibetitsmike added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit 97f490b Nov 10, 2025
13 checks passed
@ibetitsmike ibetitsmike deleted the new-project-on-launch branch November 10, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant