auto-claude: subtask-5-2 - Enhance OAuthStep to detect and display if token is already configured

- Enhanced success state to differentiate between existing token detection
  and newly configured token
- Shows 'Token already configured' message for existing tokens vs
  'Token configured successfully' for new configurations
- Updated reconfigure button text to 'Reconfigure token' when existing
  token is detected
- Provides clearer guidance that users can continue or reconfigure
This commit is contained in:
AndyMik90
2025-12-15 17:36:54 +01:00
parent f57c28e5d8
commit 50f22dad14
@@ -140,7 +140,7 @@ export function OAuthStep({ onNext, onBack, onSkip }: OAuthStepProps) {
</div>
)}
{/* Success state */}
{/* Success state - differentiate between existing token and newly configured */}
{!isChecking && success && (
<div className="space-y-6">
<Card className="border border-success/30 bg-success/10">
@@ -149,11 +149,14 @@ export function OAuthStep({ onNext, onBack, onSkip }: OAuthStepProps) {
<CheckCircle2 className="h-6 w-6 text-success flex-shrink-0 mt-0.5" />
<div className="flex-1">
<h3 className="text-lg font-medium text-success">
Token configured successfully
{hasExistingToken && !token
? 'Token already configured'
: 'Token configured successfully'}
</h3>
<p className="mt-1 text-sm text-success/80">
You're all set to use AI features like Ideation, Roadmap generation,
and autonomous code generation.
{hasExistingToken && !token
? 'Your Claude OAuth token is already set up. You can continue to the next step or reconfigure if needed.'
: "You're all set to use AI features like Ideation, Roadmap generation, and autonomous code generation."}
</p>
</div>
</div>
@@ -165,7 +168,7 @@ export function OAuthStep({ onNext, onBack, onSkip }: OAuthStepProps) {
onClick={handleReconfigure}
className="text-primary hover:text-primary/80 underline-offset-4 hover:underline"
>
Configure a different token
{hasExistingToken && !token ? 'Reconfigure token' : 'Configure a different token'}
</button>
</div>
</div>