feat(projects): require repository when location is remote#408
Conversation
When creating a new project with the Remote location selected, a repository is now required before the form can be submitted. - Add derived `repoMissing` and `canCreate` states that gate submission - Disable the Create button when remote is selected without a repo - Show a 'Required' badge on the Repository label for remote projects - Add `.field-badge.required` style using `--ui-danger` color
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a668fd9bb4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| let repoMissing = $derived(location === 'remote' && !selectedRepo); | ||
| let canCreate = $derived(!!name.trim() && !saving && !repoMissing); |
There was a problem hiding this comment.
Don't block remote projects that start without a repository
This new repoMissing gate removes the existing “empty remote project” flow from every creation entry point that renders NewProjectForm. The backend still treats that flow as valid — create_project explicitly handles a remote project created with no repo and defers workspace startup until one is added (apps/staged/src-tauri/src/lib.rs:463-466) — and project-level remote sessions are written to operate that way, telling the agent to use add_project_repo when the context says “No repositories are attached to this project” (apps/staged/src-tauri/src/session_commands.rs:402-438, 1206-1212). With this guard, users who want to create a remote coordination project first and let the agent discover/add repos later can no longer do so.
Useful? React with 👍 / 👎.
Summary
Test plan
🤖 Generated with Claude Code