refactor: migrate page components to Design System v4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -603,7 +603,7 @@ export function TreeNavigationPage() {
|
||||
</div>
|
||||
<button
|
||||
onClick={() => navigate('/trees')}
|
||||
className="mt-4 text-muted-foreground hover:text-foreground hover:underline"
|
||||
className="mt-4 text-[#848b9b] hover:text-[#e2e5eb] hover:underline"
|
||||
>
|
||||
Back to trees
|
||||
</button>
|
||||
@@ -615,17 +615,17 @@ export function TreeNavigationPage() {
|
||||
if (showMetadataForm) {
|
||||
return (
|
||||
<div className="container mx-auto max-w-lg px-4 py-8">
|
||||
<h1 className="mb-2 text-2xl font-bold font-heading text-foreground">{tree.name}</h1>
|
||||
<p className="mb-6 text-muted-foreground">{tree.description}</p>
|
||||
<h1 className="mb-2 text-2xl font-bold font-heading text-[#e2e5eb]">{tree.name}</h1>
|
||||
<p className="mb-6 text-[#848b9b]">{tree.description}</p>
|
||||
|
||||
<div className="bg-card border border-border rounded-xl space-y-4 p-6">
|
||||
<h2 className="font-semibold text-foreground">Session Details</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
<div className="bg-[#14161d] border border-[#1e2130] rounded-xl space-y-4 p-6">
|
||||
<h2 className="font-semibold text-[#e2e5eb]">Session Details</h2>
|
||||
<p className="text-sm text-[#848b9b]">
|
||||
Optional: Add ticket and client info for easier tracking
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-foreground">
|
||||
<label className="block text-sm font-medium text-[#e2e5eb]">
|
||||
Ticket Number
|
||||
</label>
|
||||
<input
|
||||
@@ -634,15 +634,15 @@ export function TreeNavigationPage() {
|
||||
onChange={(e) => setTicketNumber(e.target.value)}
|
||||
placeholder="e.g., INC0012345"
|
||||
className={cn(
|
||||
'mt-1 block w-full rounded-md border border-border bg-card px-3 py-2',
|
||||
'text-foreground placeholder:text-muted-foreground',
|
||||
'mt-1 block w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-2',
|
||||
'text-[#e2e5eb] placeholder:text-[#848b9b]',
|
||||
'focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20'
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-foreground">
|
||||
<label className="block text-sm font-medium text-[#e2e5eb]">
|
||||
Client Name
|
||||
</label>
|
||||
<input
|
||||
@@ -651,8 +651,8 @@ export function TreeNavigationPage() {
|
||||
onChange={(e) => setClientName(e.target.value)}
|
||||
placeholder="e.g., Acme Corp"
|
||||
className={cn(
|
||||
'mt-1 block w-full rounded-md border border-border bg-card px-3 py-2',
|
||||
'text-foreground placeholder:text-muted-foreground',
|
||||
'mt-1 block w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-2',
|
||||
'text-[#e2e5eb] placeholder:text-[#848b9b]',
|
||||
'focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20'
|
||||
)}
|
||||
/>
|
||||
@@ -685,9 +685,9 @@ export function TreeNavigationPage() {
|
||||
<div className="mb-6 flex items-center justify-between">
|
||||
<div>
|
||||
<div className="flex items-center gap-3">
|
||||
<h1 className="text-xl font-bold font-heading text-foreground">{tree.name}</h1>
|
||||
<h1 className="text-xl font-bold font-heading text-[#e2e5eb]">{tree.name}</h1>
|
||||
{timerDisplay && (
|
||||
<span className="flex items-center gap-1.5 rounded-full bg-accent px-2 py-0.5 text-[0.6875rem] font-label text-muted-foreground">
|
||||
<span className="flex items-center gap-1.5 rounded-full bg-accent px-2 py-0.5 text-[0.6875rem] font-sans text-xs text-[#848b9b]">
|
||||
<Clock className="h-4 w-4" />
|
||||
{timerDisplay}
|
||||
</span>
|
||||
@@ -695,14 +695,14 @@ export function TreeNavigationPage() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShortcutsModalOpen(true)}
|
||||
className="flex items-center justify-center rounded-full p-1 text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
className="flex items-center justify-center rounded-full p-1 text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb]"
|
||||
title="Keyboard shortcuts"
|
||||
>
|
||||
<HelpCircle className="h-4 w-4" />
|
||||
</button>
|
||||
</div>
|
||||
{(ticketNumber || clientName) && (
|
||||
<p className="text-sm text-muted-foreground">
|
||||
<p className="text-sm text-[#848b9b]">
|
||||
{ticketNumber && `Ticket: ${ticketNumber}`}
|
||||
{ticketNumber && clientName && ' · '}
|
||||
{clientName && `Client: ${clientName}`}
|
||||
@@ -725,8 +725,8 @@ export function TreeNavigationPage() {
|
||||
<button
|
||||
onClick={() => setShowSharePopover(!showSharePopover)}
|
||||
className={cn(
|
||||
'flex items-center gap-1.5 rounded-md border border-border px-3 py-1.5 text-xs font-medium text-muted-foreground',
|
||||
'hover:bg-accent hover:text-foreground transition-colors'
|
||||
'flex items-center gap-1.5 rounded-md border border-[#1e2130] px-3 py-1.5 text-xs font-medium text-[#848b9b]',
|
||||
'hover:bg-accent hover:text-[#e2e5eb] transition-colors'
|
||||
)}
|
||||
>
|
||||
<Copy className="h-3.5 w-3.5" />
|
||||
@@ -734,7 +734,7 @@ export function TreeNavigationPage() {
|
||||
<ChevronDown className="h-3 w-3" />
|
||||
</button>
|
||||
{showSharePopover && (
|
||||
<div className="absolute right-0 mt-1 z-50 bg-card border border-border rounded-xl p-1 min-w-[220px]">
|
||||
<div className="absolute right-0 mt-1 z-50 bg-[#14161d] border border-[#1e2130] rounded-xl p-1 min-w-[220px]">
|
||||
{/* Copy Progress Summary */}
|
||||
<button
|
||||
onClick={() => {
|
||||
@@ -743,8 +743,8 @@ export function TreeNavigationPage() {
|
||||
}}
|
||||
disabled={isCopyingForTicket}
|
||||
className={cn(
|
||||
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-muted-foreground w-full text-left cursor-pointer transition-colors',
|
||||
'hover:bg-accent hover:text-foreground disabled:opacity-50'
|
||||
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-[#848b9b] w-full text-left cursor-pointer transition-colors',
|
||||
'hover:bg-accent hover:text-[#e2e5eb] disabled:opacity-50'
|
||||
)}
|
||||
>
|
||||
{copiedForTicket ? <Check className="h-4 w-4 text-emerald-400" /> : <Clipboard className="h-4 w-4" />}
|
||||
@@ -758,15 +758,15 @@ export function TreeNavigationPage() {
|
||||
}}
|
||||
disabled={isCopyingShareLink}
|
||||
className={cn(
|
||||
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-muted-foreground w-full text-left cursor-pointer transition-colors',
|
||||
'hover:bg-accent hover:text-foreground disabled:opacity-50'
|
||||
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-[#848b9b] w-full text-left cursor-pointer transition-colors',
|
||||
'hover:bg-accent hover:text-[#e2e5eb] disabled:opacity-50'
|
||||
)}
|
||||
>
|
||||
{copiedShareLink ? <Check className="h-4 w-4 text-emerald-400" /> : <Link2 className="h-4 w-4" />}
|
||||
{isCopyingShareLink ? 'Loading...' : copiedShareLink ? 'Copied!' : 'Copy Share Link'}
|
||||
</button>
|
||||
{/* Divider */}
|
||||
<div className="border-t border-border my-1" />
|
||||
<div className="border-t border-[#1e2130] my-1" />
|
||||
{/* Manage Share Links */}
|
||||
<button
|
||||
onClick={() => {
|
||||
@@ -774,8 +774,8 @@ export function TreeNavigationPage() {
|
||||
setShowShareModal(true)
|
||||
}}
|
||||
className={cn(
|
||||
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-muted-foreground w-full text-left cursor-pointer transition-colors',
|
||||
'hover:bg-accent hover:text-foreground'
|
||||
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-[#848b9b] w-full text-left cursor-pointer transition-colors',
|
||||
'hover:bg-accent hover:text-[#e2e5eb]'
|
||||
)}
|
||||
>
|
||||
<Settings className="h-4 w-4" />
|
||||
@@ -786,7 +786,7 @@ export function TreeNavigationPage() {
|
||||
</div>
|
||||
<button
|
||||
onClick={() => navigate('/sessions')}
|
||||
className="rounded-md px-3 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
className="rounded-md px-3 py-1.5 text-sm text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb]"
|
||||
>
|
||||
Exit
|
||||
</button>
|
||||
@@ -814,17 +814,17 @@ export function TreeNavigationPage() {
|
||||
const truncatedLabel = label.length > 30 ? `${label.slice(0, 30)}...` : label
|
||||
return (
|
||||
<span key={nodeId} className="flex items-center gap-2 whitespace-nowrap">
|
||||
{index > 0 && <span className="text-muted-foreground">→</span>}
|
||||
{index > 0 && <span className="text-[#848b9b]">→</span>}
|
||||
{index < pathTaken.length - 1 ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => handleBreadcrumbJump(nodeId, index)}
|
||||
className="text-muted-foreground hover:text-foreground hover:underline"
|
||||
className="text-[#848b9b] hover:text-[#e2e5eb] hover:underline"
|
||||
>
|
||||
{truncatedLabel}
|
||||
</button>
|
||||
) : (
|
||||
<span className="font-medium text-foreground">
|
||||
<span className="font-medium text-[#e2e5eb]">
|
||||
{truncatedLabel}
|
||||
</span>
|
||||
)}
|
||||
@@ -834,7 +834,7 @@ export function TreeNavigationPage() {
|
||||
</div>
|
||||
|
||||
{/* Current Node */}
|
||||
<div className="bg-card border border-border rounded-xl p-6 shadow-xs">
|
||||
<div className="bg-[#14161d] border border-[#1e2130] rounded-xl p-6 shadow-xs">
|
||||
{/* Answer placeholder guard */}
|
||||
{currentNode && currentNode.type === 'answer' && (
|
||||
<div className="rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-6 text-center">
|
||||
@@ -847,11 +847,11 @@ export function TreeNavigationPage() {
|
||||
{/* Decision Node */}
|
||||
{currentNode && currentNode.type === 'decision' && (
|
||||
<>
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-[#e2e5eb]">
|
||||
{currentNode.question}
|
||||
</h2>
|
||||
{currentNode.help_text && (
|
||||
<div className="mb-4 text-sm text-muted-foreground">
|
||||
<div className="mb-4 text-sm text-[#848b9b]">
|
||||
<MarkdownContent content={currentNode.help_text} />
|
||||
</div>
|
||||
)}
|
||||
@@ -862,7 +862,7 @@ export function TreeNavigationPage() {
|
||||
onClick={() => handleSelectOption(option.id, option.label, option.next_node_id)}
|
||||
disabled={!!selectingOption}
|
||||
className={cn(
|
||||
'w-full rounded-md border border-border p-3 text-left text-foreground transition-colors',
|
||||
'w-full rounded-md border border-[#1e2130] p-3 text-left text-[#e2e5eb] transition-colors',
|
||||
'hover:border-primary/30 hover:bg-accent',
|
||||
'flex items-center gap-3',
|
||||
selectingOption && selectingOption !== option.id && 'opacity-50 pointer-events-none'
|
||||
@@ -874,7 +874,7 @@ export function TreeNavigationPage() {
|
||||
<Spinner size="sm" className="h-4 w-4 border-t-foreground" />
|
||||
</span>
|
||||
) : (
|
||||
<span className="flex h-6 w-6 shrink-0 items-center justify-center rounded bg-accent text-xs font-medium text-muted-foreground">
|
||||
<span className="flex h-6 w-6 shrink-0 items-center justify-center rounded bg-accent text-xs font-medium text-[#848b9b]">
|
||||
{index + 1}
|
||||
</span>
|
||||
)
|
||||
@@ -886,7 +886,7 @@ export function TreeNavigationPage() {
|
||||
{/* Previously-created custom steps at this node */}
|
||||
{customStepFlow.customSteps.filter(cs => cs.inserted_after_node_id === currentNodeId).length > 0 && (
|
||||
<div className="mt-2 space-y-2">
|
||||
<p className="text-xs font-medium uppercase tracking-wide text-muted-foreground">
|
||||
<p className="text-xs font-medium uppercase tracking-wide text-[#848b9b]">
|
||||
Your Custom Steps
|
||||
</p>
|
||||
{customStepFlow.customSteps
|
||||
@@ -897,12 +897,12 @@ export function TreeNavigationPage() {
|
||||
key={cs.id}
|
||||
onClick={() => customStepFlow.handleNavigateToCustomStep(cs)}
|
||||
className={cn(
|
||||
'w-full rounded-md border border-primary/30 bg-primary/10 p-3 text-left text-foreground transition-colors',
|
||||
'w-full rounded-md border border-primary/30 bg-[rgba(34,211,238,0.10)] p-3 text-left text-[#e2e5eb] transition-colors',
|
||||
'hover:border-primary/50 hover:bg-primary/20',
|
||||
'flex items-center gap-3'
|
||||
)}
|
||||
>
|
||||
<span className="shrink-0 rounded-full bg-primary/20 px-2 py-0.5 text-xs font-medium text-primary">
|
||||
<span className="shrink-0 rounded-full bg-primary/20 px-2 py-0.5 text-xs font-medium text-[#22d3ee]">
|
||||
Custom
|
||||
</span>
|
||||
<span>{cs.step_data.title}</span>
|
||||
@@ -914,7 +914,7 @@ export function TreeNavigationPage() {
|
||||
{/* Add Custom Step Button */}
|
||||
<button
|
||||
onClick={() => customStepFlow.setShowCustomStepModal(true)}
|
||||
className="mt-2 inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
|
||||
className="mt-2 inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-sm text-[#848b9b] hover:bg-accent hover:text-[#e2e5eb]"
|
||||
>
|
||||
<Plus className="h-3.5 w-3.5" />
|
||||
Add Custom Step
|
||||
@@ -924,18 +924,18 @@ export function TreeNavigationPage() {
|
||||
|
||||
{/* Custom Step Node */}
|
||||
{currentCustomStep && (
|
||||
<div className="rounded-lg border border-primary/30 bg-primary/10 p-4">
|
||||
<div className="rounded-lg border border-primary/30 bg-[rgba(34,211,238,0.10)] p-4">
|
||||
{/* Custom Step Badge */}
|
||||
<span className="mb-2 inline-block rounded-full bg-primary/20 px-2 py-1 text-xs font-medium text-primary">
|
||||
<span className="mb-2 inline-block rounded-full bg-primary/20 px-2 py-1 text-xs font-medium text-[#22d3ee]">
|
||||
Custom Step
|
||||
</span>
|
||||
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-[#e2e5eb]">
|
||||
{currentCustomStep.step_data.title}
|
||||
</h2>
|
||||
|
||||
{currentCustomStep.step_data.content.instructions && (
|
||||
<div className="mb-4 text-muted-foreground">
|
||||
<div className="mb-4 text-[#848b9b]">
|
||||
<MarkdownContent content={currentCustomStep.step_data.content.instructions} />
|
||||
</div>
|
||||
)}
|
||||
@@ -948,11 +948,11 @@ export function TreeNavigationPage() {
|
||||
|
||||
{currentCustomStep.step_data.content.commands && currentCustomStep.step_data.content.commands.length > 0 && (
|
||||
<div className="mb-4">
|
||||
<p className="mb-2 text-sm font-medium text-foreground">Commands:</p>
|
||||
<p className="mb-2 text-sm font-medium text-[#e2e5eb]">Commands:</p>
|
||||
<div className="space-y-2">
|
||||
{currentCustomStep.step_data.content.commands.map((cmd, index) => (
|
||||
<div key={index}>
|
||||
<p className="mb-1 text-xs text-muted-foreground">{cmd.label}</p>
|
||||
<p className="mb-1 text-xs text-[#848b9b]">{cmd.label}</p>
|
||||
<div className="group relative">
|
||||
<code className="block rounded bg-accent p-2 pr-8 text-sm font-mono">
|
||||
{cmd.command}
|
||||
@@ -966,7 +966,7 @@ export function TreeNavigationPage() {
|
||||
{copiedCommand === cmd.command ? (
|
||||
<Check className="h-3.5 w-3.5 text-green-400" />
|
||||
) : (
|
||||
<Clipboard className="h-3.5 w-3.5 text-muted-foreground hover:text-foreground" />
|
||||
<Clipboard className="h-3.5 w-3.5 text-[#848b9b] hover:text-[#e2e5eb]" />
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
@@ -978,7 +978,7 @@ export function TreeNavigationPage() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setCommandOutputOpen(!commandOutputOpen)}
|
||||
className="flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground"
|
||||
className="flex items-center gap-1.5 text-sm text-[#848b9b] hover:text-[#e2e5eb]"
|
||||
>
|
||||
<Terminal className="h-3.5 w-3.5" />
|
||||
<span>Paste Output (Optional)</span>
|
||||
@@ -993,12 +993,12 @@ export function TreeNavigationPage() {
|
||||
rows={4}
|
||||
maxLength={10000}
|
||||
className={cn(
|
||||
'block w-full rounded-md border border-border bg-accent px-3 py-2',
|
||||
'font-mono text-sm text-foreground placeholder:text-muted-foreground',
|
||||
'block w-full rounded-md border border-[#1e2130] bg-accent px-3 py-2',
|
||||
'font-mono text-sm text-[#e2e5eb] placeholder:text-[#848b9b]',
|
||||
'focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20'
|
||||
)}
|
||||
/>
|
||||
<p className="mt-1 text-right text-xs text-muted-foreground">
|
||||
<p className="mt-1 text-right text-xs text-[#848b9b]">
|
||||
{commandOutput.length.toLocaleString()} / 10,000
|
||||
</p>
|
||||
</div>
|
||||
@@ -1035,8 +1035,8 @@ export function TreeNavigationPage() {
|
||||
<button
|
||||
onClick={() => customStepFlow.setShowCustomStepModal(true)}
|
||||
className={cn(
|
||||
'flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground',
|
||||
'hover:bg-accent hover:text-foreground'
|
||||
'flex items-center gap-2 rounded-md border border-[#1e2130] px-4 py-2 text-sm font-medium text-[#848b9b]',
|
||||
'hover:bg-accent hover:text-[#e2e5eb]'
|
||||
)}
|
||||
>
|
||||
<Plus className="h-4 w-4" />
|
||||
@@ -1062,17 +1062,17 @@ export function TreeNavigationPage() {
|
||||
{/* Action Node */}
|
||||
{currentNode && currentNode.type === 'action' && (
|
||||
<>
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-[#e2e5eb]">
|
||||
{currentNode.title}
|
||||
</h2>
|
||||
{currentNode.description && (
|
||||
<div className="mb-4 text-muted-foreground">
|
||||
<div className="mb-4 text-[#848b9b]">
|
||||
<MarkdownContent content={currentNode.description} />
|
||||
</div>
|
||||
)}
|
||||
{currentNode.commands && currentNode.commands.length > 0 && (
|
||||
<div className="mb-4">
|
||||
<p className="mb-2 text-sm font-medium text-foreground">Commands:</p>
|
||||
<p className="mb-2 text-sm font-medium text-[#e2e5eb]">Commands:</p>
|
||||
<div className="space-y-1">
|
||||
{currentNode.commands.map((cmd, index) => (
|
||||
<div key={index} className="group relative">
|
||||
@@ -1088,7 +1088,7 @@ export function TreeNavigationPage() {
|
||||
{copiedCommand === cmd ? (
|
||||
<Check className="h-3.5 w-3.5 text-green-400" />
|
||||
) : (
|
||||
<Clipboard className="h-3.5 w-3.5 text-muted-foreground hover:text-foreground" />
|
||||
<Clipboard className="h-3.5 w-3.5 text-[#848b9b] hover:text-[#e2e5eb]" />
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
@@ -1099,7 +1099,7 @@ export function TreeNavigationPage() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setCommandOutputOpen(!commandOutputOpen)}
|
||||
className="flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground"
|
||||
className="flex items-center gap-1.5 text-sm text-[#848b9b] hover:text-[#e2e5eb]"
|
||||
>
|
||||
<Terminal className="h-3.5 w-3.5" />
|
||||
<span>Paste Output (Optional)</span>
|
||||
@@ -1114,12 +1114,12 @@ export function TreeNavigationPage() {
|
||||
rows={4}
|
||||
maxLength={10000}
|
||||
className={cn(
|
||||
'block w-full rounded-md border border-border bg-accent px-3 py-2',
|
||||
'font-mono text-sm text-foreground placeholder:text-muted-foreground',
|
||||
'block w-full rounded-md border border-[#1e2130] bg-accent px-3 py-2',
|
||||
'font-mono text-sm text-[#e2e5eb] placeholder:text-[#848b9b]',
|
||||
'focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20'
|
||||
)}
|
||||
/>
|
||||
<p className="mt-1 text-right text-xs text-muted-foreground">
|
||||
<p className="mt-1 text-right text-xs text-[#848b9b]">
|
||||
{commandOutput.length.toLocaleString()} / 10,000
|
||||
</p>
|
||||
</div>
|
||||
@@ -1128,7 +1128,7 @@ export function TreeNavigationPage() {
|
||||
</div>
|
||||
)}
|
||||
{currentNode.expected_outcome && (
|
||||
<p className="mb-4 text-sm text-muted-foreground">
|
||||
<p className="mb-4 text-sm text-[#848b9b]">
|
||||
<strong>Expected outcome:</strong> {currentNode.expected_outcome}
|
||||
</p>
|
||||
)}
|
||||
@@ -1148,18 +1148,18 @@ export function TreeNavigationPage() {
|
||||
Solution
|
||||
</span>
|
||||
</div>
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
|
||||
<h2 className="mb-2 text-xl font-semibold font-heading text-[#e2e5eb]">
|
||||
{currentNode.title}
|
||||
</h2>
|
||||
{currentNode.description && (
|
||||
<div className="mb-4 text-muted-foreground">
|
||||
<div className="mb-4 text-[#848b9b]">
|
||||
<MarkdownContent content={currentNode.description} />
|
||||
</div>
|
||||
)}
|
||||
{currentNode.resolution_steps && currentNode.resolution_steps.length > 0 && (
|
||||
<div className="mb-4">
|
||||
<p className="mb-2 text-sm font-medium text-foreground">Resolution steps:</p>
|
||||
<ol className="list-inside list-decimal space-y-1 text-sm text-muted-foreground">
|
||||
<p className="mb-2 text-sm font-medium text-[#e2e5eb]">Resolution steps:</p>
|
||||
<ol className="list-inside list-decimal space-y-1 text-sm text-[#848b9b]">
|
||||
{currentNode.resolution_steps.map((step, index) => (
|
||||
<li key={index}>{step}</li>
|
||||
))}
|
||||
@@ -1181,14 +1181,14 @@ export function TreeNavigationPage() {
|
||||
|
||||
{/* Step Feedback */}
|
||||
{session && (currentNode || currentCustomStep) && (
|
||||
<div className="mt-3 flex justify-end border-t border-border pt-3">
|
||||
<div className="mt-3 flex justify-end border-t border-[#1e2130] pt-3">
|
||||
<StepFeedback stepId={currentCustomStep?.id || currentNodeId} sessionId={session.id} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Notes */}
|
||||
<div className="mt-6 border-t border-border pt-4">
|
||||
<label className="block text-sm font-medium text-foreground">
|
||||
<div className="mt-6 border-t border-[#1e2130] pt-4">
|
||||
<label className="block text-sm font-medium text-[#e2e5eb]">
|
||||
Notes (optional)
|
||||
</label>
|
||||
<textarea
|
||||
@@ -1198,8 +1198,8 @@ export function TreeNavigationPage() {
|
||||
placeholder="Add any notes for this step..."
|
||||
rows={2}
|
||||
className={cn(
|
||||
'mt-1 block w-full rounded-md border border-border bg-card px-3 py-2',
|
||||
'text-foreground placeholder:text-muted-foreground',
|
||||
'mt-1 block w-full rounded-md border border-[#1e2130] bg-[#14161d] px-3 py-2',
|
||||
'text-[#e2e5eb] placeholder:text-[#848b9b]',
|
||||
'focus:border-primary focus:outline-hidden focus:ring-1 focus:ring-primary/20'
|
||||
)}
|
||||
/>
|
||||
@@ -1216,15 +1216,15 @@ export function TreeNavigationPage() {
|
||||
{pathTaken.length > 1 && (
|
||||
<button
|
||||
onClick={handleGoBack}
|
||||
className="mt-4 text-sm text-muted-foreground hover:text-foreground"
|
||||
className="mt-4 text-sm text-[#848b9b] hover:text-[#e2e5eb]"
|
||||
>
|
||||
← Go back <span className="text-xs text-muted-foreground">[Esc]</span>
|
||||
← Go back <span className="text-xs text-[#848b9b]">[Esc]</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Keyboard Shortcuts Hint */}
|
||||
{currentNode && (
|
||||
<div className="mt-4 border-t border-border pt-3 text-xs text-muted-foreground">
|
||||
<div className="mt-4 border-t border-[#1e2130] pt-3 text-xs text-[#848b9b]">
|
||||
<span className="font-medium">Keyboard:</span>{' '}
|
||||
{currentNode.type === 'decision' && currentOptions.length > 0 && (
|
||||
<span>1-{Math.min(currentOptions.length, 9)} select option</span>
|
||||
@@ -1301,24 +1301,24 @@ export function TreeNavigationPage() {
|
||||
>
|
||||
<div className="space-y-3 text-sm">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-muted-foreground">Select option</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">1-9</span>
|
||||
<span className="text-[#848b9b]">Select option</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-[#e2e5eb]">1-9</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-muted-foreground">Go back</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">Esc</span>
|
||||
<span className="text-[#848b9b]">Go back</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-[#e2e5eb]">Esc</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-muted-foreground">Continue / Complete</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">Enter</span>
|
||||
<span className="text-[#848b9b]">Continue / Complete</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-[#e2e5eb]">Enter</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-muted-foreground">Focus notes</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">Tab</span>
|
||||
<span className="text-[#848b9b]">Focus notes</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-[#e2e5eb]">Tab</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-muted-foreground">Show shortcuts</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">?</span>
|
||||
<span className="text-[#848b9b]">Show shortcuts</span>
|
||||
<span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-[#e2e5eb]">?</span>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user