refactor: migrate remaining components to Design System v4
111 files across 14 directories: common, tree-editor, kb-accelerator, copilot, assistant, analytics, library, procedural, procedural-editor, public, script-editor, ui, admin, step-library. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -59,38 +59,38 @@ export function CompletionSummary({
|
||||
<div className="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-emerald-400/10">
|
||||
<CheckCircle2 className="h-8 w-8 text-emerald-400" />
|
||||
</div>
|
||||
<h1 className="text-2xl font-bold text-foreground">Procedure Complete</h1>
|
||||
<p className="mt-1 text-muted-foreground">{treeName}</p>
|
||||
<h1 className="text-2xl font-bold text-[#e2e5eb]">Procedure Complete</h1>
|
||||
<p className="mt-1 text-[#848b9b]">{treeName}</p>
|
||||
</div>
|
||||
|
||||
{/* Summary stats */}
|
||||
<div className="grid grid-cols-3 gap-3">
|
||||
<div className="bg-card border border-border rounded-xl p-3 text-center">
|
||||
<div className="bg-[#14161d] border border-[#1e2130] rounded-xl p-3 text-center">
|
||||
<CheckCircle2 className="mx-auto mb-1 h-5 w-5 text-emerald-400" />
|
||||
<div className="text-lg font-semibold text-foreground">{procedureSteps.length}</div>
|
||||
<div className="text-xs text-muted-foreground">Steps Completed</div>
|
||||
<div className="text-lg font-semibold text-[#e2e5eb]">{procedureSteps.length}</div>
|
||||
<div className="text-xs text-[#848b9b]">Steps Completed</div>
|
||||
</div>
|
||||
<div className="bg-card border border-border rounded-xl p-3 text-center">
|
||||
<Clock className="mx-auto mb-1 h-5 w-5 text-muted-foreground" />
|
||||
<div className="text-lg font-semibold text-foreground">{formatTime(totalMinutes)}</div>
|
||||
<div className="text-xs text-muted-foreground">Total Time</div>
|
||||
<div className="bg-[#14161d] border border-[#1e2130] rounded-xl p-3 text-center">
|
||||
<Clock className="mx-auto mb-1 h-5 w-5 text-[#848b9b]" />
|
||||
<div className="text-lg font-semibold text-[#e2e5eb]">{formatTime(totalMinutes)}</div>
|
||||
<div className="text-xs text-[#848b9b]">Total Time</div>
|
||||
</div>
|
||||
<div className="bg-card border border-border rounded-xl p-3 text-center">
|
||||
<FileText className="mx-auto mb-1 h-5 w-5 text-muted-foreground" />
|
||||
<div className="text-lg font-semibold text-foreground">{Object.keys(variables).length}</div>
|
||||
<div className="text-xs text-muted-foreground">Parameters</div>
|
||||
<div className="bg-[#14161d] border border-[#1e2130] rounded-xl p-3 text-center">
|
||||
<FileText className="mx-auto mb-1 h-5 w-5 text-[#848b9b]" />
|
||||
<div className="text-lg font-semibold text-[#e2e5eb]">{Object.keys(variables).length}</div>
|
||||
<div className="text-xs text-[#848b9b]">Parameters</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Project parameters */}
|
||||
{Object.keys(variables).length > 0 && (
|
||||
<div className="bg-card border border-border rounded-xl p-4">
|
||||
<h3 className="mb-3 text-sm font-semibold text-muted-foreground">Project Parameters</h3>
|
||||
<div className="bg-[#14161d] border border-[#1e2130] rounded-xl p-4">
|
||||
<h3 className="mb-3 text-sm font-semibold text-[#848b9b]">Project Parameters</h3>
|
||||
<div className="space-y-1.5">
|
||||
{Object.entries(variables).map(([key, value]) => (
|
||||
<div key={key} className="flex items-baseline justify-between gap-4 text-sm">
|
||||
<span className="font-mono text-muted-foreground">{key}</span>
|
||||
<span className="text-right text-muted-foreground">{value}</span>
|
||||
<span className="font-mono text-[#848b9b]">{key}</span>
|
||||
<span className="text-right text-[#848b9b]">{value}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
@@ -98,8 +98,8 @@ export function CompletionSummary({
|
||||
)}
|
||||
|
||||
{/* Step details */}
|
||||
<div className="bg-card border border-border rounded-xl p-4">
|
||||
<h3 className="mb-3 text-sm font-semibold text-muted-foreground">Step Summary</h3>
|
||||
<div className="bg-[#14161d] border border-[#1e2130] rounded-xl p-4">
|
||||
<h3 className="mb-3 text-sm font-semibold text-[#848b9b]">Step Summary</h3>
|
||||
<div className="space-y-2">
|
||||
{procedureSteps.map((step, index) => {
|
||||
const completion = completions.get(step.id)
|
||||
@@ -108,15 +108,15 @@ export function CompletionSummary({
|
||||
<CheckCircle2 className="mt-0.5 h-4 w-4 shrink-0 text-emerald-400" />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-muted-foreground">
|
||||
<span className="text-[#848b9b]">
|
||||
{index + 1}. {step.title}
|
||||
</span>
|
||||
</div>
|
||||
{completion?.notes && (
|
||||
<p className="mt-0.5 text-xs text-muted-foreground">Note: {completion.notes}</p>
|
||||
<p className="mt-0.5 text-xs text-[#848b9b]">Note: {completion.notes}</p>
|
||||
)}
|
||||
{completion?.verificationValue && (
|
||||
<p className="mt-0.5 text-xs text-muted-foreground">
|
||||
<p className="mt-0.5 text-xs text-[#848b9b]">
|
||||
Verified: {completion.verificationValue}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -42,7 +42,7 @@ export function FallbackSteps({
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setExpanded((v) => !v)}
|
||||
className="flex items-center gap-2 text-sm text-muted-foreground hover:text-amber-400/80 transition-colors"
|
||||
className="flex items-center gap-2 text-sm text-[#848b9b] hover:text-amber-400/80 transition-colors"
|
||||
>
|
||||
<AlertCircle className="h-4 w-4 text-amber-400/80 shrink-0" />
|
||||
<span>{toggleLabel}</span>
|
||||
@@ -64,7 +64,7 @@ export function FallbackSteps({
|
||||
key={fbStep.id}
|
||||
className={cn(
|
||||
'rounded-lg border p-3 transition-colors',
|
||||
'bg-white/[0.02] border-border/50',
|
||||
'bg-white/[0.02] border-[#1e2130]/50',
|
||||
isCompleted && 'border-emerald-500/30 bg-emerald-500/5'
|
||||
)}
|
||||
>
|
||||
@@ -76,12 +76,12 @@ export function FallbackSteps({
|
||||
value={fbStep.title}
|
||||
onChange={(e) => onUpdate?.(index, { title: e.target.value })}
|
||||
placeholder="Fallback step title"
|
||||
className="flex-1 rounded border border-border bg-card px-2.5 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="flex-1 rounded border border-[#1e2130] bg-[#14161d] px-2.5 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onRemove?.(index)}
|
||||
className="shrink-0 rounded p-1.5 text-muted-foreground hover:bg-rose-500/10 hover:text-rose-400 transition-colors"
|
||||
className="shrink-0 rounded p-1.5 text-[#848b9b] hover:bg-rose-500/10 hover:text-rose-400 transition-colors"
|
||||
title="Remove fallback step"
|
||||
>
|
||||
<Trash2 className="h-3.5 w-3.5" />
|
||||
@@ -94,17 +94,17 @@ export function FallbackSteps({
|
||||
}
|
||||
placeholder="Describe this alternative approach..."
|
||||
rows={2}
|
||||
className="w-full rounded border border-border bg-card px-2.5 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded border border-[#1e2130] bg-[#14161d] px-2.5 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
// Execute mode
|
||||
<div>
|
||||
<p className={cn('text-sm font-medium', isCompleted ? 'text-emerald-400' : 'text-foreground')}>
|
||||
<p className={cn('text-sm font-medium', isCompleted ? 'text-emerald-400' : 'text-[#e2e5eb]')}>
|
||||
{fbStep.title}
|
||||
</p>
|
||||
{fbStep.description && (
|
||||
<p className="mt-1 text-xs text-muted-foreground">{fbStep.description}</p>
|
||||
<p className="mt-1 text-xs text-[#848b9b]">{fbStep.description}</p>
|
||||
)}
|
||||
{!isCompleted && (
|
||||
<div className="mt-3 flex gap-2">
|
||||
|
||||
@@ -88,7 +88,7 @@ export function InlineVariablePrompt({
|
||||
onBlur={() => {
|
||||
if (!value) setIsEditing(false)
|
||||
}}
|
||||
className="rounded-md border border-cyan-500/40 bg-cyan-500/5 px-2.5 py-1 text-sm text-foreground shadow-[0_0_12px_rgba(6,182,212,0.15)] focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
className="rounded-md border border-cyan-500/40 bg-cyan-500/5 px-2.5 py-1 text-sm text-[#e2e5eb] shadow-[0_0_12px_rgba(6,182,212,0.15)] focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
>
|
||||
<option value="">{placeholder}</option>
|
||||
{options.map((opt) => (
|
||||
@@ -117,10 +117,10 @@ export function InlineVariablePrompt({
|
||||
onBlur={handleSubmit}
|
||||
onKeyDown={handleKeyDown}
|
||||
placeholder={placeholder}
|
||||
className="w-48 rounded-md border border-cyan-500/40 bg-cyan-500/5 px-2.5 py-1 text-sm text-foreground shadow-[0_0_12px_rgba(6,182,212,0.15)] placeholder:text-muted-foreground focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
className="w-48 rounded-md border border-cyan-500/40 bg-cyan-500/5 px-2.5 py-1 text-sm text-[#e2e5eb] shadow-[0_0_12px_rgba(6,182,212,0.15)] placeholder:text-[#848b9b] focus:border-cyan-400 focus:outline-hidden focus:ring-1 focus:ring-cyan-400/30"
|
||||
/>
|
||||
{helpText && (
|
||||
<span className="absolute -bottom-5 left-0 text-[0.625rem] text-muted-foreground whitespace-nowrap">
|
||||
<span className="absolute -bottom-5 left-0 text-[0.625rem] text-[#848b9b] whitespace-nowrap">
|
||||
{helpText}
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -72,10 +72,10 @@ export function IntakeFormModal({ isOpen, fields, treeName, onSubmit, onCancel }
|
||||
const error = errors[field.variable_name]
|
||||
|
||||
const baseInputClass = cn(
|
||||
'w-full rounded-lg border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-hidden focus:ring-1',
|
||||
'w-full rounded-lg border bg-[#14161d] px-3 py-2 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:outline-hidden focus:ring-1',
|
||||
error
|
||||
? 'border-red-400/50 focus:border-red-400 focus:ring-red-400/20'
|
||||
: 'border-border focus:border-primary focus:ring-primary/20'
|
||||
: 'border-[#1e2130] focus:border-primary focus:ring-primary/20'
|
||||
)
|
||||
|
||||
let input: React.ReactNode
|
||||
@@ -112,9 +112,9 @@ export function IntakeFormModal({ isOpen, fields, treeName, onSubmit, onCancel }
|
||||
type="checkbox"
|
||||
checked={value === 'true'}
|
||||
onChange={(e) => setValue(field.variable_name, e.target.checked ? 'true' : 'false')}
|
||||
className="rounded border-border"
|
||||
className="rounded border-[#1e2130]"
|
||||
/>
|
||||
<span className="text-sm text-muted-foreground">{field.placeholder || field.label}</span>
|
||||
<span className="text-sm text-[#848b9b]">{field.placeholder || field.label}</span>
|
||||
</label>
|
||||
)
|
||||
break
|
||||
@@ -162,9 +162,9 @@ export function IntakeFormModal({ isOpen, fields, treeName, onSubmit, onCancel }
|
||||
: [...selected, opt]
|
||||
setValue(field.variable_name, next.join(','))
|
||||
}}
|
||||
className="rounded border-border"
|
||||
className="rounded border-[#1e2130]"
|
||||
/>
|
||||
<span className="text-sm text-muted-foreground">{opt}</span>
|
||||
<span className="text-sm text-[#848b9b]">{opt}</span>
|
||||
</label>
|
||||
)
|
||||
})}
|
||||
@@ -198,12 +198,12 @@ export function IntakeFormModal({ isOpen, fields, treeName, onSubmit, onCancel }
|
||||
|
||||
return (
|
||||
<div key={field.variable_name}>
|
||||
<label className="mb-1 flex items-center gap-1 text-sm font-medium text-muted-foreground">
|
||||
<label className="mb-1 flex items-center gap-1 text-sm font-medium text-[#848b9b]">
|
||||
{field.label}
|
||||
{field.required && <span className="text-red-400">*</span>}
|
||||
</label>
|
||||
{field.help_text && (
|
||||
<p className="mb-1.5 text-xs text-muted-foreground">{field.help_text}</p>
|
||||
<p className="mb-1.5 text-xs text-[#848b9b]">{field.help_text}</p>
|
||||
)}
|
||||
{input}
|
||||
{error && <p className="mt-1 text-xs text-red-400">{error}</p>}
|
||||
@@ -212,13 +212,13 @@ export function IntakeFormModal({ isOpen, fields, treeName, onSubmit, onCancel }
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-end justify-center p-0 sm:items-center sm:p-4 bg-black/60 backdrop-blur-xs">
|
||||
<div className="w-full max-w-full rounded-t-2xl border border-border bg-background shadow-xl sm:max-w-lg sm:rounded-2xl">
|
||||
<div className="fixed inset-0 z-50 flex items-end justify-center p-0 sm:items-center sm:p-4 bg-black/60">
|
||||
<div className="w-full max-w-full rounded-t-2xl border border-[#1e2130] bg-[#0c0d10] shadow-xl sm:max-w-lg sm:rounded-2xl">
|
||||
{/* Header */}
|
||||
<div className="border-b border-border px-6 py-4">
|
||||
<h2 className="text-lg font-semibold text-foreground">Project Information</h2>
|
||||
<p className="mt-0.5 text-sm text-muted-foreground">
|
||||
Fill in the details for <span className="text-muted-foreground">{treeName}</span>
|
||||
<div className="border-b border-[#1e2130] px-6 py-4">
|
||||
<h2 className="text-lg font-semibold text-[#e2e5eb]">Project Information</h2>
|
||||
<p className="mt-0.5 text-sm text-[#848b9b]">
|
||||
Fill in the details for <span className="text-[#848b9b]">{treeName}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -228,7 +228,7 @@ export function IntakeFormModal({ isOpen, fields, treeName, onSubmit, onCancel }
|
||||
{Array.from(groups.entries()).map(([groupName, groupFields]) => (
|
||||
<div key={groupName}>
|
||||
{groupName && (
|
||||
<h3 className="mb-3 border-b border-border pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
||||
<h3 className="mb-3 border-b border-[#1e2130] pb-1 text-xs font-semibold uppercase tracking-wider text-[#848b9b]">
|
||||
{groupName}
|
||||
</h3>
|
||||
)}
|
||||
@@ -240,7 +240,7 @@ export function IntakeFormModal({ isOpen, fields, treeName, onSubmit, onCancel }
|
||||
</div>
|
||||
|
||||
{/* Footer */}
|
||||
<div className="flex items-center justify-end gap-2 border-t border-border px-6 py-4">
|
||||
<div className="flex items-center justify-end gap-2 border-t border-[#1e2130] px-6 py-4">
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
|
||||
@@ -89,17 +89,17 @@ export function PrepareSessionModal({
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-end justify-center p-0 sm:items-center sm:p-4">
|
||||
<div className="absolute inset-0 bg-background/60 backdrop-blur-xs" onClick={onClose} />
|
||||
<div className="relative w-full max-w-full rounded-t-2xl border border-border bg-card shadow-2xl sm:max-w-lg sm:rounded-2xl">
|
||||
<div className="absolute inset-0 bg-[#0c0d10]/60" onClick={onClose} />
|
||||
<div className="relative w-full max-w-full rounded-t-2xl border border-[#1e2130] bg-[#14161d] shadow-2xl sm:max-w-lg sm:rounded-2xl">
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between border-b border-border px-5 py-4">
|
||||
<div className="flex items-center justify-between border-b border-[#1e2130] px-5 py-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<FileText className="h-4 w-4 text-cyan-400" />
|
||||
<h3 className="text-sm font-semibold text-foreground">Prepare Session</h3>
|
||||
<h3 className="text-sm font-semibold text-[#e2e5eb]">Prepare Session</h3>
|
||||
</div>
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="rounded-lg p-1 text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
className="rounded-lg p-1 text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb]"
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
</button>
|
||||
@@ -109,30 +109,30 @@ export function PrepareSessionModal({
|
||||
<div className="max-h-[70vh] overflow-y-auto p-4 space-y-5 sm:max-h-[60vh] sm:p-5">
|
||||
{/* Flow name */}
|
||||
<div className="rounded-lg bg-accent px-3 py-2">
|
||||
<p className="text-xs text-muted-foreground">Flow</p>
|
||||
<p className="text-sm font-medium text-foreground">{treeName}</p>
|
||||
<p className="text-xs text-[#848b9b]">Flow</p>
|
||||
<p className="text-sm font-medium text-[#e2e5eb]">{treeName}</p>
|
||||
</div>
|
||||
|
||||
{/* Context fields */}
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<label className="mb-1 block text-xs font-medium text-muted-foreground">Ticket Number</label>
|
||||
<label className="mb-1 block text-xs font-medium text-[#848b9b]">Ticket Number</label>
|
||||
<input
|
||||
type="text"
|
||||
value={ticketNumber}
|
||||
onChange={(e) => setTicketNumber(e.target.value)}
|
||||
placeholder="e.g. TKT-12345"
|
||||
className="w-full rounded-md border border-border bg-card px-3 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs font-medium text-muted-foreground">Client Name</label>
|
||||
<label className="mb-1 block text-xs font-medium text-[#848b9b]">Client Name</label>
|
||||
<input
|
||||
type="text"
|
||||
value={clientName}
|
||||
onChange={(e) => setClientName(e.target.value)}
|
||||
placeholder="e.g. Acme Corp"
|
||||
className="w-full rounded-md border border-border bg-card px-3 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -140,14 +140,14 @@ export function PrepareSessionModal({
|
||||
{/* Assignee */}
|
||||
{teamMembers.length > 0 && (
|
||||
<div>
|
||||
<label className="mb-1 flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
|
||||
<label className="mb-1 flex items-center gap-1.5 text-xs font-medium text-[#848b9b]">
|
||||
<UserPlus className="h-3.5 w-3.5" />
|
||||
Assign to Engineer
|
||||
</label>
|
||||
<select
|
||||
value={assignedToId}
|
||||
onChange={(e) => setAssignedToId(e.target.value)}
|
||||
className="w-full rounded-md border border-border bg-card px-3 py-1.5 text-sm text-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
>
|
||||
<option value="">Unassigned (visible to all)</option>
|
||||
{teamMembers.map(m => (
|
||||
@@ -160,17 +160,17 @@ export function PrepareSessionModal({
|
||||
{/* Intake form fields */}
|
||||
{intakeFields.length > 0 && (
|
||||
<div className="space-y-4">
|
||||
<h4 className="font-label text-[0.625rem] uppercase tracking-[0.1em] text-muted-foreground">
|
||||
<h4 className="font-sans text-xs text-[0.625rem] uppercase tracking-[0.1em] text-[#848b9b]">
|
||||
Variables (optional — can be filled later)
|
||||
</h4>
|
||||
{Array.from(grouped.entries()).map(([groupName, fields]) => (
|
||||
<div key={groupName} className="space-y-3">
|
||||
{grouped.size > 1 && (
|
||||
<p className="text-xs font-medium text-muted-foreground">{groupName}</p>
|
||||
<p className="text-xs font-medium text-[#848b9b]">{groupName}</p>
|
||||
)}
|
||||
{fields.map(field => (
|
||||
<div key={field.variable_name}>
|
||||
<label className="mb-1 block text-xs font-medium text-muted-foreground">
|
||||
<label className="mb-1 block text-xs font-medium text-[#848b9b]">
|
||||
{field.label}
|
||||
{field.required && <span className="ml-1 text-amber-400">*</span>}
|
||||
</label>
|
||||
@@ -178,7 +178,7 @@ export function PrepareSessionModal({
|
||||
<select
|
||||
value={values[field.variable_name] || ''}
|
||||
onChange={(e) => handleFieldChange(field.variable_name, e.target.value)}
|
||||
className="w-full rounded-md border border-border bg-card px-3 py-1.5 text-sm text-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
>
|
||||
<option value="">{field.placeholder || 'Select...'}</option>
|
||||
{field.options.map(opt => (
|
||||
@@ -191,7 +191,7 @@ export function PrepareSessionModal({
|
||||
onChange={(e) => handleFieldChange(field.variable_name, e.target.value)}
|
||||
placeholder={field.placeholder}
|
||||
rows={3}
|
||||
className="w-full rounded-md border border-border bg-card px-3 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
/>
|
||||
) : (
|
||||
<input
|
||||
@@ -199,11 +199,11 @@ export function PrepareSessionModal({
|
||||
value={values[field.variable_name] || ''}
|
||||
onChange={(e) => handleFieldChange(field.variable_name, e.target.value)}
|
||||
placeholder={field.placeholder}
|
||||
className="w-full rounded-md border border-border bg-card px-3 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
/>
|
||||
)}
|
||||
{field.help_text && (
|
||||
<p className="mt-1 text-[0.625rem] text-muted-foreground">{field.help_text}</p>
|
||||
<p className="mt-1 text-[0.625rem] text-[#848b9b]">{field.help_text}</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
@@ -214,10 +214,10 @@ export function PrepareSessionModal({
|
||||
</div>
|
||||
|
||||
{/* Footer */}
|
||||
<div className="flex items-center justify-end gap-3 border-t border-border px-5 py-4">
|
||||
<div className="flex items-center justify-end gap-3 border-t border-[#1e2130] px-5 py-4">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="rounded-[10px] px-4 py-2 text-sm text-muted-foreground hover:text-foreground"
|
||||
className="rounded-lg px-4 py-2 text-sm text-[#848b9b] hover:text-[#e2e5eb]"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
@@ -225,8 +225,8 @@ export function PrepareSessionModal({
|
||||
onClick={handleSubmit}
|
||||
disabled={isSubmitting}
|
||||
className={cn(
|
||||
'rounded-[10px] bg-gradient-brand px-4 py-2 text-sm font-semibold text-[#101114]',
|
||||
'shadow-lg shadow-primary/20 hover:opacity-90 active:scale-[0.97]',
|
||||
'rounded-lg bg-[#22d3ee] px-4 py-2 text-sm font-semibold text-white',
|
||||
'hover:brightness-110 active:scale-[0.98]',
|
||||
'disabled:opacity-40'
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -20,24 +20,24 @@ export function ProgressBar({ currentStep, totalSteps, elapsedMinutes, estimated
|
||||
return (
|
||||
<div className="space-y-1.5">
|
||||
<div className="flex items-center justify-between text-xs">
|
||||
<span className="text-muted-foreground">
|
||||
<span className="text-[#848b9b]">
|
||||
Step {currentStep} of {totalSteps}
|
||||
</span>
|
||||
<div className="flex items-center gap-3">
|
||||
{elapsedMinutes !== undefined && (
|
||||
<span className="text-muted-foreground">
|
||||
<span className="text-[#848b9b]">
|
||||
{formatTime(elapsed)}
|
||||
{estimatedTotalMinutes ? (
|
||||
<span className="text-muted-foreground"> / est. {formatTime(estimatedTotalMinutes)}</span>
|
||||
<span className="text-[#848b9b]"> / est. {formatTime(estimatedTotalMinutes)}</span>
|
||||
) : null}
|
||||
</span>
|
||||
)}
|
||||
<span className="font-medium text-muted-foreground">{percentage}%</span>
|
||||
<span className="font-medium text-[#848b9b]">{percentage}%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="h-1.5 overflow-hidden rounded-full bg-accent">
|
||||
<div
|
||||
className="h-full rounded-full bg-gradient-brand transition-all duration-300"
|
||||
className="h-full rounded-full bg-[#22d3ee] transition-all duration-300"
|
||||
style={{ width: `${percentage}%` }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -32,7 +32,7 @@ export function StepChecklist({ steps, currentStepIndex, completedStepIds, onSte
|
||||
return (
|
||||
<div key={step.id}>
|
||||
{showSection && (
|
||||
<div className="mb-1 mt-3 border-b border-border pb-1 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground first:mt-0">
|
||||
<div className="mb-1 mt-3 border-b border-[#1e2130] pb-1 text-[10px] font-semibold uppercase tracking-wider text-[#848b9b] first:mt-0">
|
||||
{'section_header' in step ? step.section_header : undefined}
|
||||
</div>
|
||||
)}
|
||||
@@ -40,17 +40,17 @@ export function StepChecklist({ steps, currentStepIndex, completedStepIds, onSte
|
||||
onClick={() => onStepClick(index)}
|
||||
className={cn(
|
||||
'flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm transition-colors',
|
||||
isCurrent && 'bg-accent text-foreground',
|
||||
!isCurrent && isCompleted && 'text-muted-foreground',
|
||||
!isCurrent && !isCompleted && 'text-muted-foreground hover:bg-accent/50'
|
||||
isCurrent && 'bg-accent text-[#e2e5eb]',
|
||||
!isCurrent && isCompleted && 'text-[#848b9b]',
|
||||
!isCurrent && !isCompleted && 'text-[#848b9b] hover:bg-accent/50'
|
||||
)}
|
||||
>
|
||||
{isCompleted ? (
|
||||
<CheckCircle2 className="h-4 w-4 shrink-0 text-emerald-400" />
|
||||
) : isCurrent ? (
|
||||
<ArrowRight className="h-4 w-4 shrink-0 text-foreground" />
|
||||
<ArrowRight className="h-4 w-4 shrink-0 text-[#e2e5eb]" />
|
||||
) : (
|
||||
<Circle className="h-4 w-4 shrink-0 text-muted-foreground" />
|
||||
<Circle className="h-4 w-4 shrink-0 text-[#848b9b]" />
|
||||
)}
|
||||
<span className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-accent text-[10px] font-medium">
|
||||
{index + 1}
|
||||
@@ -64,7 +64,7 @@ export function StepChecklist({ steps, currentStepIndex, completedStepIds, onSte
|
||||
)}
|
||||
</span>
|
||||
{'estimated_minutes' in step && step.estimated_minutes && (
|
||||
<span className="shrink-0 text-[10px] text-muted-foreground">~{step.estimated_minutes}m</span>
|
||||
<span className="shrink-0 text-[10px] text-[#848b9b]">~{step.estimated_minutes}m</span>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ import { cn } from '@/lib/utils'
|
||||
|
||||
const contentTypeConfig: Record<StepContentType, { icon: typeof Zap; color: string; bg: string; label: string }> = {
|
||||
action: { icon: Zap, color: 'text-blue-400', bg: 'bg-blue-400/10', label: 'Action' },
|
||||
informational: { icon: Info, color: 'text-muted-foreground', bg: 'bg-accent', label: 'Info' },
|
||||
informational: { icon: Info, color: 'text-[#848b9b]', bg: 'bg-accent', label: 'Info' },
|
||||
verification: { icon: CheckCircle2, color: 'text-emerald-400', bg: 'bg-emerald-400/10', label: 'Verification' },
|
||||
warning: { icon: AlertTriangle, color: 'text-yellow-400', bg: 'bg-yellow-400/10', label: 'Warning' },
|
||||
}
|
||||
@@ -91,11 +91,11 @@ export function StepDetail({
|
||||
<div className="space-y-4">
|
||||
{/* Step header */}
|
||||
<div className="flex items-start gap-3">
|
||||
<span className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-accent text-sm font-semibold text-foreground">
|
||||
<span className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-accent text-sm font-semibold text-[#e2e5eb]">
|
||||
{stepNumber}
|
||||
</span>
|
||||
<div className="min-w-0 flex-1">
|
||||
<h2 className="text-lg font-semibold text-foreground">{step.title}</h2>
|
||||
<h2 className="text-lg font-semibold text-[#e2e5eb]">{step.title}</h2>
|
||||
<div className="mt-1 flex items-center gap-2">
|
||||
{isCustom ? (
|
||||
<span className="inline-flex items-center gap-1 rounded-full bg-amber-400/15 px-2 py-0.5 text-xs text-amber-400">
|
||||
@@ -107,11 +107,11 @@ export function StepDetail({
|
||||
{config.label}
|
||||
</span>
|
||||
)}
|
||||
<span className="text-xs text-muted-foreground">
|
||||
<span className="text-xs text-[#848b9b]">
|
||||
Step {stepNumber} of {totalSteps}
|
||||
</span>
|
||||
{'estimated_minutes' in step && step.estimated_minutes && (
|
||||
<span className="text-xs text-muted-foreground">~{step.estimated_minutes} min</span>
|
||||
<span className="text-xs text-[#848b9b]">~{step.estimated_minutes} min</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -134,7 +134,7 @@ export function StepDetail({
|
||||
|
||||
{/* Description */}
|
||||
{step.description && (
|
||||
<div className="prose prose-invert prose-sm max-w-none text-muted-foreground">
|
||||
<div className="prose prose-invert prose-sm max-w-none text-[#848b9b]">
|
||||
<p className="whitespace-pre-wrap">
|
||||
<ResolvedText
|
||||
text={step.description}
|
||||
@@ -150,14 +150,14 @@ export function StepDetail({
|
||||
{commandBlocks.length > 0 && (
|
||||
<div className="space-y-3">
|
||||
{commandBlocks.map((cmd, i) => (
|
||||
<div key={i} className="rounded-lg border border-border bg-card">
|
||||
<div className="flex items-center justify-between border-b border-border px-3 py-1.5">
|
||||
<span className="text-xs font-medium text-muted-foreground">
|
||||
<div key={i} className="rounded-lg border border-[#1e2130] bg-[#14161d]">
|
||||
<div className="flex items-center justify-between border-b border-[#1e2130] px-3 py-1.5">
|
||||
<span className="text-xs font-medium text-[#848b9b]">
|
||||
{cmd.label || (cmd.language ? cmd.language : 'Command')}
|
||||
</span>
|
||||
<button
|
||||
onClick={() => handleCopyCommand(cmd.code, i)}
|
||||
className="flex items-center gap-1 rounded px-2 py-0.5 text-xs text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
className="flex items-center gap-1 rounded px-2 py-0.5 text-xs text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb]"
|
||||
>
|
||||
{copiedIndex === i ? <Check className="h-3 w-3 text-emerald-400" /> : <Copy className="h-3 w-3" />}
|
||||
{copiedIndex === i ? 'Copied' : 'Copy'}
|
||||
@@ -178,37 +178,37 @@ export function StepDetail({
|
||||
|
||||
{/* Expected outcome */}
|
||||
{'expected_outcome' in step && step.expected_outcome && (
|
||||
<div className="rounded-lg border border-border bg-white/2 p-3">
|
||||
<h4 className="mb-1 text-xs font-medium text-muted-foreground">Expected Outcome</h4>
|
||||
<p className="text-sm text-muted-foreground">{resolve(step.expected_outcome)}</p>
|
||||
<div className="rounded-lg border border-[#1e2130] bg-white/2 p-3">
|
||||
<h4 className="mb-1 text-xs font-medium text-[#848b9b]">Expected Outcome</h4>
|
||||
<p className="text-sm text-[#848b9b]">{resolve(step.expected_outcome)}</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Verification */}
|
||||
{verificationPrompt && (
|
||||
<div className="rounded-lg border border-border bg-white/2 p-3">
|
||||
<h4 className="mb-2 text-xs font-medium text-muted-foreground">Verification</h4>
|
||||
<div className="rounded-lg border border-[#1e2130] bg-white/2 p-3">
|
||||
<h4 className="mb-2 text-xs font-medium text-[#848b9b]">Verification</h4>
|
||||
{verificationType === 'checkbox' ? (
|
||||
<label className="flex items-center gap-2 text-sm text-muted-foreground">
|
||||
<label className="flex items-center gap-2 text-sm text-[#848b9b]">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={!!verificationValue}
|
||||
onChange={(e) => onVerificationChange(e.target.checked ? 'confirmed' : '')}
|
||||
disabled={isCompleted}
|
||||
className="rounded border-border"
|
||||
className="rounded border-[#1e2130]"
|
||||
/>
|
||||
{resolve(verificationPrompt)}
|
||||
</label>
|
||||
) : (
|
||||
<div>
|
||||
<p className="mb-2 text-sm text-muted-foreground">{resolve(verificationPrompt)}</p>
|
||||
<p className="mb-2 text-sm text-[#848b9b]">{resolve(verificationPrompt)}</p>
|
||||
<input
|
||||
type="text"
|
||||
value={verificationValue}
|
||||
onChange={(e) => onVerificationChange(e.target.value)}
|
||||
disabled={isCompleted}
|
||||
placeholder="Enter observed value..."
|
||||
className="w-full rounded border border-border bg-card px-3 py-1.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20 disabled:opacity-50"
|
||||
className="w-full rounded border border-[#1e2130] bg-[#14161d] px-3 py-1.5 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20 disabled:opacity-50"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@@ -218,13 +218,13 @@ export function StepDetail({
|
||||
{/* Notes */}
|
||||
{(!('notes_enabled' in step) || step.notes_enabled !== false) && (
|
||||
<div>
|
||||
<label className="mb-1 block text-xs font-medium text-muted-foreground">Notes</label>
|
||||
<label className="mb-1 block text-xs font-medium text-[#848b9b]">Notes</label>
|
||||
<textarea
|
||||
value={notes}
|
||||
onChange={(e) => onNotesChange(e.target.value)}
|
||||
placeholder="Add notes for this step..."
|
||||
rows={2}
|
||||
className="w-full rounded-lg border border-border bg-card px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
className="w-full rounded-lg border border-[#1e2130] bg-[#14161d] px-3 py-2 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@@ -235,7 +235,7 @@ export function StepDetail({
|
||||
href={resolve(step.reference_url)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground"
|
||||
className="inline-flex items-center gap-1.5 text-sm text-[#848b9b] hover:text-[#e2e5eb]"
|
||||
>
|
||||
<ExternalLink className="h-3.5 w-3.5" />
|
||||
Reference Documentation
|
||||
@@ -251,7 +251,7 @@ export function StepDetail({
|
||||
'flex w-full items-center justify-center gap-2 rounded-lg px-4 py-2.5 text-sm font-medium transition-colors',
|
||||
isCompleted
|
||||
? 'bg-emerald-400/10 text-emerald-400'
|
||||
: 'bg-gradient-brand text-white shadow-lg shadow-primary/20 hover:opacity-90 disabled:opacity-40 disabled:hover:opacity-100'
|
||||
: 'bg-[#22d3ee] text-white hover:brightness-110 disabled:opacity-40 disabled:hover:opacity-100'
|
||||
)}
|
||||
>
|
||||
{isCompleted ? (
|
||||
|
||||
Reference in New Issue
Block a user