Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions apps/staged/src/lib/features/projects/NewProjectForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@
error = null;
});

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

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


async function handleCreate() {
if (!name.trim() || saving) return;
if (!canCreate) return;

saving = true;
error = null;
Expand Down Expand Up @@ -239,7 +242,12 @@
</div>

<div class="form-group">
<label for="project-repo-select">Repository</label>
<label for="project-repo-select"
>Repository
{#if location === 'remote'}
<span class="field-badge required">Required</span>
{/if}</label
>
{#if selectedRepo}
<div class="repo-info">
<GitBranch size={14} class="repo-info-icon" />
Expand Down Expand Up @@ -337,7 +345,7 @@
variant="primary"
class={!onCancel ? 'full-width-btn' : ''}
onclick={handleCreate}
disabled={saving || !name.trim()}
disabled={!canCreate}
>
{#if saving}
<span class="button-content">
Expand Down Expand Up @@ -395,6 +403,11 @@
color: var(--bg-deepest);
}

.field-badge.required {
background-color: var(--ui-danger);
color: var(--bg-deepest);
}

.field-badge.new-branch {
background-color: var(--ui-accent);
color: var(--bg-deepest);
Expand Down