Skip to content

feat(projects): require repository when location is remote#408

Merged
matt2e merged 1 commit intomainfrom
remote-projects-require-repo
Mar 18, 2026
Merged

feat(projects): require repository when location is remote#408
matt2e merged 1 commit intomainfrom
remote-projects-require-repo

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Mar 18, 2026

Summary

  • Makes the repository field required when creating a remote project
  • Adds a "Required" badge to the repository label for remote projects
  • Disables the create button when no repository is selected for remote projects

Test plan

  • Create a new project with location set to "remote" and verify the repository field shows a "Required" badge
  • Verify the "Create" button is disabled until a repository is selected for remote projects
  • Verify local projects can still be created without a repository

🤖 Generated with Claude Code

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
@matt2e matt2e requested review from baxen and wesbillman as code owners March 18, 2026 01:37
@matt2e matt2e merged commit 1f74eec into main Mar 18, 2026
4 checks passed
@matt2e matt2e deleted the remote-projects-require-repo branch March 18, 2026 01:40
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.

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

Comment on lines +93 to +94
let repoMissing = $derived(location === 'remote' && !selectedRepo);
let canCreate = $derived(!!name.trim() && !saving && !repoMissing);

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

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