Skip to content

Create OnboardingWidget component for Dashboard #894

Closed

Description

@propr-dev

Context

We need a high-level widget that aggregates the onboarding steps and displays them prominently on the dashboard for new users.

Requirements

  • Create an OnboardingWidget component that takes hasAgents and hasRepos as props.
  • It should render two OnboardingStep components: one for configuring an AI Agent, and one for adding a repository.
  • Logic should ensure that the repo step only becomes 'active' after the agent step is 'completed'.

Implementation Specification

  • Create a new file propr-ui/src/components/Dashboard/OnboardingWidget.tsx.
  • Use useNavigate from react-router-dom to route users to /settings/agents or /repositories.

Acceptance Criteria

  • The widget accurately reflects the current onboarding state.
  • Clicking the CTAs routes the user to the correct setup pages.

Created by ProPR AI Planner

Activity

  1. propr-dev commented on Mar 3, 2026

    @propr-dev
    ContributorAuthor

    Suggested Implementation:

    Implementation Approach

    We build a composite widget that sequences the setup tasks. By managing the status dynamically (calculating 'active' vs 'pending' based on the completion of prior steps), we naturally guide the user through a linear setup process without overwhelming them.

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

    import React from 'react';
    import { useNavigate } from 'react-router-dom';
    import { OnboardingStep, StepStatus } from './OnboardingStep';
    import { Sparkles } from 'lucide-react';
    
    export interface OnboardingWidgetProps {
      hasAgents: boolean;
      hasRepos: boolean;
    }
    
    export const OnboardingWidget: React.FC<OnboardingWidgetProps> = ({ hasAgents, hasRepos }) => {
      const navigate = useNavigate();
    
      // Determine the status of each step strictly based on dependencies
      const getAgentStatus = (): StepStatus => hasAgents ? 'completed' : 'active';
      
      const getRepoStatus = (): StepStatus => {
        if (hasRepos) return 'completed';
        if (hasAgents) return 'active'; // Only active if the previous step is done
        return 'pending';
      };
    
      // Do not render if the user has completed onboarding
      if (hasAgents && hasRepos) {
        return null;
      }
    
      return (
        <div className="bg-white border border-indigo-100 rounded-xl p-6 mb-8 shadow-sm">
          <div className="flex items-center gap-3 mb-6">
            <div className="w-10 h-10 rounded-lg bg-indigo-100 flex items-center justify-center text-indigo-600 shadow-sm">
              <Sparkles size={20} />
            </div>
            <div>
              <h2 className="text-xl font-bold text-gray-900">Welcome to ProPR!</h2>
              <p className="text-sm text-gray-500 mt-0.5">Complete these quick steps to set up your AI automation workspace.</p>
            </div>
          </div>
    
          <div className="grid grid-cols-1 lg:grid-cols-2 gap-4">
            <OnboardingStep
              number={1}
              title="Configure an AI Agent"
              description="Connect an AI model (like Claude, Gemini, or Codex) to serve as your automated developer engine."
              status={getAgentStatus()}
              ctaText="Add AI Agent"
              onCtaClick={() => navigate('/settings/agents')}
            />
            <OnboardingStep
              number={2}
              title="Add a Repository"
              description="Select a GitHub repository for the AI to monitor, allowing it to plan and create pull requests."
              status={getRepoStatus()}
              ctaText="Add Repository"
              onCtaClick={() => navigate('/repositories')}
            />
          </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: 894/claude-opus-4-5-20251101-create-onboardingwidget-c-20260303-1212-g97
    • Base Branch: 892-epic-create-usesystemreadiness-xcn
    • Worktree: issue-894-20260303-1212-claude-opus-4-5-20251101-g97

    🔍 Track Task Execution

  3. added a commit that references this issue on Mar 3, 2026
  4. added a commit that references this issue on Mar 3, 2026
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