Skip to content

Enhance NewPlanForm empty state for missing repositories #897

Closed

Description

@propr-dev

Context

Currently, if a user tries to create a plan but hasn't added any repositories, the NewPlanForm just disables the inputs. We should explicitly guide them to add a repository instead.

Requirements

  • Update NewPlanForm to display a dedicated empty state block when repos.length === 0.
  • Include a clear call-to-action button linking to the Repositories page.

Implementation Specification

  • Modify propr-ui/src/components/Dashboard/NewPlanForm.tsx to conditionally render an empty state UI replacing the entire form interface when no repos exist.

Acceptance Criteria

  • When zero repos exist, the form fields are hidden, and a friendly message with an "Add a Repository" button is shown instead.

Created by ProPR AI Planner

Activity

  1. propr-dev commented on Mar 3, 2026

    @propr-dev
    ContributorAuthor

    Suggested Implementation:

    Implementation Approach

    Rather than showing a disabled form that looks broken, we replace the inputs entirely with a targeted empty state block. This reduces friction and gives the user an actionable way forward directly inside the context they were trying to use.

    File: propr-ui/src/components/Dashboard/NewPlanForm.tsx

    --- a/propr-ui/src/components/Dashboard/NewPlanForm.tsx
    +++ b/propr-ui/src/components/Dashboard/NewPlanForm.tsx
    @@ -1,6 +1,6 @@
     import React, { useState, useEffect, useRef } from 'react';
     import { Link } from 'react-router-dom';
    -import { X, Paperclip, Loader2, Image } from 'lucide-react';
    +import { X, Paperclip, Loader2, Image, Github } from 'lucide-react';
     
     export interface Repo {
       name: string;
    @@ -113,6 +113,24 @@
           </div>
           <div className="space-y-4">
    -        {/* Repository Select - Always visible */}
    -        <div className="flex gap-4 items-end">
    -          <div className="flex-shrink-0 w-64">
    +        {repos.length === 0 ? (
    +          <div className="py-8 text-center bg-gray-50 border border-dashed border-gray-300 rounded-lg">
    +            <div className="w-12 h-12 bg-white border border-gray-200 shadow-sm rounded-full flex items-center justify-center mx-auto mb-3">
    +              <Github className="w-6 h-6 text-gray-400" />
    +            </div>
    +            <h4 className="text-gray-900 font-medium mb-1">No repositories configured</h4>
    +            <p className="text-gray-500 text-sm mb-4">You need to add at least one repository to start creating plans.</p>
    +            <Link
    +              to="/repositories"
    +              className="inline-flex items-center gap-2 px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors text-sm font-medium shadow-sm"
    +            >
    +              Add a Repository
    +            </Link>
    +          </div>
    +        ) : (
    +          <>
    +            {/* Repository Select - Always visible */}
    +            <div className="flex gap-4 items-end">
    +              <div className="flex-shrink-0 w-64">
                     <label className="block text-sm font-medium text-gray-700 mb-2">Repository</label>
                     <select
    @@ -213,6 +231,7 @@
                   </div>
                 </div>
    +          </>
    +        )}
           </div>
         </div>
       );
     };
  2. propr-dev commented on Mar 3, 2026

    @propr-dev
    ContributorAuthor

    🤖 AI processing has started for this issue using claude agent with claude-opus-4-5-20251101 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-4-5-20251101
    • Branch: 897/claude-opus-4-5-20251101-enhance-newplanform-empty-20260303-1223-jpn
    • Base Branch: 892-epic-create-usesystemreadiness-xcn
    • Worktree: issue-897-20260303-1223-claude-opus-4-5-20251101-jpn

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions