refactor: migrate TreeNavigationPage to new design system

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-15 19:42:42 -05:00
parent a3364bafda
commit 369c75a055

View File

@@ -516,7 +516,7 @@ export function TreeNavigationPage() {
if (isLoading) { if (isLoading) {
return ( return (
<div className="flex h-64 items-center justify-center"> <div className="flex h-64 items-center justify-center">
<div className="h-8 w-8 animate-spin rounded-full border-4 border-white/20 border-t-white" /> <div className="h-8 w-8 animate-spin rounded-full border-4 border-border border-t-foreground" />
</div> </div>
) )
} }
@@ -529,7 +529,7 @@ export function TreeNavigationPage() {
</div> </div>
<button <button
onClick={() => navigate('/trees')} onClick={() => navigate('/trees')}
className="mt-4 text-white/50 hover:text-white hover:underline" className="mt-4 text-muted-foreground hover:text-foreground hover:underline"
> >
Back to trees Back to trees
</button> </button>
@@ -541,17 +541,17 @@ export function TreeNavigationPage() {
if (showMetadataForm) { if (showMetadataForm) {
return ( return (
<div className="container mx-auto max-w-lg px-4 py-8"> <div className="container mx-auto max-w-lg px-4 py-8">
<h1 className="mb-2 text-2xl font-bold text-white">{tree.name}</h1> <h1 className="mb-2 text-2xl font-bold font-heading text-foreground">{tree.name}</h1>
<p className="mb-6 text-white/40">{tree.description}</p> <p className="mb-6 text-muted-foreground">{tree.description}</p>
<div className="glass-card rounded-2xl space-y-4 p-6"> <div className="bg-card border border-border rounded-xl space-y-4 p-6">
<h2 className="font-semibold text-white">Session Details</h2> <h2 className="font-semibold text-foreground">Session Details</h2>
<p className="text-sm text-white/40"> <p className="text-sm text-muted-foreground">
Optional: Add ticket and client info for easier tracking Optional: Add ticket and client info for easier tracking
</p> </p>
<div> <div>
<label className="block text-sm font-medium text-white"> <label className="block text-sm font-medium text-foreground">
Ticket Number Ticket Number
</label> </label>
<input <input
@@ -560,15 +560,15 @@ export function TreeNavigationPage() {
onChange={(e) => setTicketNumber(e.target.value)} onChange={(e) => setTicketNumber(e.target.value)}
placeholder="e.g., INC0012345" placeholder="e.g., INC0012345"
className={cn( className={cn(
'mt-1 block w-full rounded-md border border-white/10 bg-black/50 px-3 py-2', 'mt-1 block w-full rounded-md border border-border bg-card px-3 py-2',
'text-white placeholder:text-white/40', 'text-foreground placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20' 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20'
)} )}
/> />
</div> </div>
<div> <div>
<label className="block text-sm font-medium text-white"> <label className="block text-sm font-medium text-foreground">
Client Name Client Name
</label> </label>
<input <input
@@ -577,9 +577,9 @@ export function TreeNavigationPage() {
onChange={(e) => setClientName(e.target.value)} onChange={(e) => setClientName(e.target.value)}
placeholder="e.g., Acme Corp" placeholder="e.g., Acme Corp"
className={cn( className={cn(
'mt-1 block w-full rounded-md border border-white/10 bg-black/50 px-3 py-2', 'mt-1 block w-full rounded-md border border-border bg-card px-3 py-2',
'text-white placeholder:text-white/40', 'text-foreground placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20' 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20'
)} )}
/> />
</div> </div>
@@ -587,8 +587,8 @@ export function TreeNavigationPage() {
<button <button
onClick={startSession} onClick={startSession}
className={cn( className={cn(
'w-full rounded-md bg-white px-4 py-2 text-sm font-medium text-black', 'w-full rounded-md bg-gradient-brand px-4 py-2 text-sm font-medium text-white shadow-lg shadow-primary/20',
'hover:bg-white/90' 'hover:opacity-90'
)} )}
> >
Start Troubleshooting Start Troubleshooting
@@ -617,9 +617,9 @@ export function TreeNavigationPage() {
<div className="mb-6 flex items-center justify-between"> <div className="mb-6 flex items-center justify-between">
<div> <div>
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<h1 className="text-xl font-bold text-white">{tree.name}</h1> <h1 className="text-xl font-bold font-heading text-foreground">{tree.name}</h1>
{timerDisplay && ( {timerDisplay && (
<span className="flex items-center gap-1.5 rounded-full bg-white/10 px-2.5 py-0.5 text-sm text-white/60"> <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">
<Clock className="h-4 w-4" /> <Clock className="h-4 w-4" />
{timerDisplay} {timerDisplay}
</span> </span>
@@ -627,14 +627,14 @@ export function TreeNavigationPage() {
<button <button
type="button" type="button"
onClick={() => setShortcutsModalOpen(true)} onClick={() => setShortcutsModalOpen(true)}
className="flex items-center justify-center rounded-full p-1 text-white/30 hover:bg-white/10 hover:text-white/60" className="flex items-center justify-center rounded-full p-1 text-muted-foreground hover:bg-accent hover:text-foreground"
title="Keyboard shortcuts" title="Keyboard shortcuts"
> >
<HelpCircle className="h-4 w-4" /> <HelpCircle className="h-4 w-4" />
</button> </button>
</div> </div>
{(ticketNumber || clientName) && ( {(ticketNumber || clientName) && (
<p className="text-sm text-white/40"> <p className="text-sm text-muted-foreground">
{ticketNumber && `Ticket: ${ticketNumber}`} {ticketNumber && `Ticket: ${ticketNumber}`}
{ticketNumber && clientName && ' · '} {ticketNumber && clientName && ' · '}
{clientName && `Client: ${clientName}`} {clientName && `Client: ${clientName}`}
@@ -647,8 +647,8 @@ export function TreeNavigationPage() {
<button <button
onClick={() => setShowSharePopover(!showSharePopover)} onClick={() => setShowSharePopover(!showSharePopover)}
className={cn( className={cn(
'flex items-center gap-1.5 rounded-md border border-white/10 px-3 py-1.5 text-xs font-medium text-white/60', '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-white/10 hover:text-white transition-colors' 'hover:bg-accent hover:text-foreground transition-colors'
)} )}
> >
<Copy className="h-3.5 w-3.5" /> <Copy className="h-3.5 w-3.5" />
@@ -656,7 +656,7 @@ export function TreeNavigationPage() {
<ChevronDown className="h-3 w-3" /> <ChevronDown className="h-3 w-3" />
</button> </button>
{showSharePopover && ( {showSharePopover && (
<div className="absolute right-0 mt-1 z-50 glass-card rounded-lg p-1 min-w-[220px]"> <div className="absolute right-0 mt-1 z-50 bg-card border border-border rounded-xl p-1 min-w-[220px]">
{/* Copy Progress Summary */} {/* Copy Progress Summary */}
<button <button
onClick={() => { onClick={() => {
@@ -665,8 +665,8 @@ export function TreeNavigationPage() {
}} }}
disabled={isCopyingForTicket} disabled={isCopyingForTicket}
className={cn( className={cn(
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-white/70 w-full text-left cursor-pointer transition-colors', '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-white/10 hover:text-white disabled:opacity-50' 'hover:bg-accent hover:text-foreground disabled:opacity-50'
)} )}
> >
{copiedForTicket ? <Check className="h-4 w-4 text-emerald-400" /> : <Clipboard className="h-4 w-4" />} {copiedForTicket ? <Check className="h-4 w-4 text-emerald-400" /> : <Clipboard className="h-4 w-4" />}
@@ -680,15 +680,15 @@ export function TreeNavigationPage() {
}} }}
disabled={isCopyingShareLink} disabled={isCopyingShareLink}
className={cn( className={cn(
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-white/70 w-full text-left cursor-pointer transition-colors', '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-white/10 hover:text-white disabled:opacity-50' 'hover:bg-accent hover:text-foreground disabled:opacity-50'
)} )}
> >
{copiedShareLink ? <Check className="h-4 w-4 text-emerald-400" /> : <Link2 className="h-4 w-4" />} {copiedShareLink ? <Check className="h-4 w-4 text-emerald-400" /> : <Link2 className="h-4 w-4" />}
{isCopyingShareLink ? 'Loading...' : copiedShareLink ? 'Copied!' : 'Copy Share Link'} {isCopyingShareLink ? 'Loading...' : copiedShareLink ? 'Copied!' : 'Copy Share Link'}
</button> </button>
{/* Divider */} {/* Divider */}
<div className="border-t border-white/[0.06] my-1" /> <div className="border-t border-border my-1" />
{/* Manage Share Links */} {/* Manage Share Links */}
<button <button
onClick={() => { onClick={() => {
@@ -696,8 +696,8 @@ export function TreeNavigationPage() {
setShowShareModal(true) setShowShareModal(true)
}} }}
className={cn( className={cn(
'flex items-center gap-2 rounded-md px-3 py-2 text-sm text-white/70 w-full text-left cursor-pointer transition-colors', '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-white/10 hover:text-white' 'hover:bg-accent hover:text-foreground'
)} )}
> >
<Settings className="h-4 w-4" /> <Settings className="h-4 w-4" />
@@ -708,7 +708,7 @@ export function TreeNavigationPage() {
</div> </div>
<button <button
onClick={() => navigate('/sessions')} onClick={() => navigate('/sessions')}
className="rounded-md px-3 py-1.5 text-sm text-white/50 hover:bg-white/[0.06] hover:text-white" className="rounded-md px-3 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground"
> >
Exit Exit
</button> </button>
@@ -724,17 +724,17 @@ export function TreeNavigationPage() {
const truncatedLabel = label.length > 30 ? `${label.slice(0, 30)}...` : label const truncatedLabel = label.length > 30 ? `${label.slice(0, 30)}...` : label
return ( return (
<span key={nodeId} className="flex items-center gap-2 whitespace-nowrap"> <span key={nodeId} className="flex items-center gap-2 whitespace-nowrap">
{index > 0 && <span className="text-white/40"></span>} {index > 0 && <span className="text-muted-foreground"></span>}
{index < pathTaken.length - 1 ? ( {index < pathTaken.length - 1 ? (
<button <button
type="button" type="button"
onClick={() => handleBreadcrumbJump(nodeId, index)} onClick={() => handleBreadcrumbJump(nodeId, index)}
className="text-white/40 hover:text-white/70 hover:underline" className="text-muted-foreground hover:text-foreground hover:underline"
> >
{truncatedLabel} {truncatedLabel}
</button> </button>
) : ( ) : (
<span className="font-medium text-white"> <span className="font-medium text-foreground">
{truncatedLabel} {truncatedLabel}
</span> </span>
)} )}
@@ -744,15 +744,15 @@ export function TreeNavigationPage() {
</div> </div>
{/* Current Node */} {/* Current Node */}
<div className="glass-card rounded-2xl p-6 shadow-sm"> <div className="bg-card border border-border rounded-xl p-6 shadow-sm">
{/* Decision Node */} {/* Decision Node */}
{currentNode && currentNode.type === 'decision' && ( {currentNode && currentNode.type === 'decision' && (
<> <>
<h2 className="mb-2 text-xl font-semibold text-white"> <h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
{currentNode.question} {currentNode.question}
</h2> </h2>
{currentNode.help_text && ( {currentNode.help_text && (
<div className="mb-4 text-sm text-white/50"> <div className="mb-4 text-sm text-muted-foreground">
<MarkdownContent content={currentNode.help_text} /> <MarkdownContent content={currentNode.help_text} />
</div> </div>
)} )}
@@ -763,8 +763,8 @@ export function TreeNavigationPage() {
onClick={() => handleSelectOption(option.id, option.label, option.next_node_id)} onClick={() => handleSelectOption(option.id, option.label, option.next_node_id)}
disabled={!!selectingOption} disabled={!!selectingOption}
className={cn( className={cn(
'w-full rounded-md border border-white/10 p-3 text-left text-white transition-colors', 'w-full rounded-md border border-border p-3 text-left text-foreground transition-colors',
'hover:border-white/30 hover:bg-white/[0.06]', 'hover:border-primary/30 hover:bg-accent',
'flex items-center gap-3', 'flex items-center gap-3',
selectingOption && selectingOption !== option.id && 'opacity-50 pointer-events-none' selectingOption && selectingOption !== option.id && 'opacity-50 pointer-events-none'
)} )}
@@ -772,10 +772,10 @@ export function TreeNavigationPage() {
{index < 9 && ( {index < 9 && (
selectingOption === option.id ? ( selectingOption === option.id ? (
<span className="flex h-6 w-6 shrink-0 items-center justify-center"> <span className="flex h-6 w-6 shrink-0 items-center justify-center">
<span className="h-4 w-4 animate-spin rounded-full border-2 border-white/20 border-t-white" /> <span className="h-4 w-4 animate-spin rounded-full border-2 border-border border-t-foreground" />
</span> </span>
) : ( ) : (
<span className="flex h-6 w-6 shrink-0 items-center justify-center rounded bg-white/10 text-xs font-medium text-white/50"> <span className="flex h-6 w-6 shrink-0 items-center justify-center rounded bg-accent text-xs font-medium text-muted-foreground">
{index + 1} {index + 1}
</span> </span>
) )
@@ -787,7 +787,7 @@ export function TreeNavigationPage() {
{/* Previously-created custom steps at this node */} {/* Previously-created custom steps at this node */}
{customStepFlow.customSteps.filter(cs => cs.inserted_after_node_id === currentNodeId).length > 0 && ( {customStepFlow.customSteps.filter(cs => cs.inserted_after_node_id === currentNodeId).length > 0 && (
<div className="mt-2 space-y-2"> <div className="mt-2 space-y-2">
<p className="text-xs font-medium uppercase tracking-wide text-white/40"> <p className="text-xs font-medium uppercase tracking-wide text-muted-foreground">
Your Custom Steps Your Custom Steps
</p> </p>
{customStepFlow.customSteps {customStepFlow.customSteps
@@ -798,12 +798,12 @@ export function TreeNavigationPage() {
key={cs.id} key={cs.id}
onClick={() => customStepFlow.handleNavigateToCustomStep(cs)} onClick={() => customStepFlow.handleNavigateToCustomStep(cs)}
className={cn( className={cn(
'w-full rounded-md border border-purple-700 bg-purple-900/20 p-3 text-left text-white transition-colors', 'w-full rounded-md border border-primary/30 bg-primary/10 p-3 text-left text-foreground transition-colors',
'hover:border-purple-500 hover:bg-purple-900/40', 'hover:border-primary/50 hover:bg-primary/20',
'flex items-center gap-3' 'flex items-center gap-3'
)} )}
> >
<span className="flex-shrink-0 rounded-full bg-purple-900 px-2 py-0.5 text-xs font-medium text-purple-100"> <span className="flex-shrink-0 rounded-full bg-primary/20 px-2 py-0.5 text-xs font-medium text-primary">
Custom Custom
</span> </span>
<span>{cs.step_data.title}</span> <span>{cs.step_data.title}</span>
@@ -815,7 +815,7 @@ export function TreeNavigationPage() {
{/* Add Custom Step Button */} {/* Add Custom Step Button */}
<button <button
onClick={() => customStepFlow.setShowCustomStepModal(true)} onClick={() => customStepFlow.setShowCustomStepModal(true)}
className="mt-2 inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-sm text-white/50 hover:bg-white/10 hover:text-white" 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"
> >
<Plus className="h-3.5 w-3.5" /> <Plus className="h-3.5 w-3.5" />
Add Custom Step Add Custom Step
@@ -825,18 +825,18 @@ export function TreeNavigationPage() {
{/* Custom Step Node */} {/* Custom Step Node */}
{currentCustomStep && ( {currentCustomStep && (
<div className="rounded-lg border border-purple-800 bg-purple-900/20 p-4"> <div className="rounded-lg border border-primary/30 bg-primary/10 p-4">
{/* Custom Step Badge */} {/* Custom Step Badge */}
<span className="mb-2 inline-block rounded-full bg-purple-900 px-2 py-1 text-xs font-medium text-purple-100"> <span className="mb-2 inline-block rounded-full bg-primary/20 px-2 py-1 text-xs font-medium text-primary">
Custom Step Custom Step
</span> </span>
<h2 className="mb-2 text-xl font-semibold text-white"> <h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
{currentCustomStep.step_data.title} {currentCustomStep.step_data.title}
</h2> </h2>
{currentCustomStep.step_data.content.instructions && ( {currentCustomStep.step_data.content.instructions && (
<div className="mb-4 text-white/60"> <div className="mb-4 text-muted-foreground">
<MarkdownContent content={currentCustomStep.step_data.content.instructions} /> <MarkdownContent content={currentCustomStep.step_data.content.instructions} />
</div> </div>
)} )}
@@ -849,13 +849,13 @@ export function TreeNavigationPage() {
{currentCustomStep.step_data.content.commands && currentCustomStep.step_data.content.commands.length > 0 && ( {currentCustomStep.step_data.content.commands && currentCustomStep.step_data.content.commands.length > 0 && (
<div className="mb-4"> <div className="mb-4">
<p className="mb-2 text-sm font-medium text-white">Commands:</p> <p className="mb-2 text-sm font-medium text-foreground">Commands:</p>
<div className="space-y-2"> <div className="space-y-2">
{currentCustomStep.step_data.content.commands.map((cmd, index) => ( {currentCustomStep.step_data.content.commands.map((cmd, index) => (
<div key={index}> <div key={index}>
<p className="mb-1 text-xs text-white/40">{cmd.label}</p> <p className="mb-1 text-xs text-muted-foreground">{cmd.label}</p>
<div className="group relative"> <div className="group relative">
<code className="block rounded bg-white/10 p-2 pr-8 text-sm font-mono"> <code className="block rounded bg-accent p-2 pr-8 text-sm font-mono">
{cmd.command} {cmd.command}
</code> </code>
<button <button
@@ -867,7 +867,7 @@ export function TreeNavigationPage() {
{copiedCommand === cmd.command ? ( {copiedCommand === cmd.command ? (
<Check className="h-3.5 w-3.5 text-green-400" /> <Check className="h-3.5 w-3.5 text-green-400" />
) : ( ) : (
<Clipboard className="h-3.5 w-3.5 text-white/40 hover:text-white" /> <Clipboard className="h-3.5 w-3.5 text-muted-foreground hover:text-foreground" />
)} )}
</button> </button>
</div> </div>
@@ -879,7 +879,7 @@ export function TreeNavigationPage() {
<button <button
type="button" type="button"
onClick={() => setCommandOutputOpen(!commandOutputOpen)} onClick={() => setCommandOutputOpen(!commandOutputOpen)}
className="flex items-center gap-1.5 text-sm text-white/50 hover:text-white" className="flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground"
> >
<Terminal className="h-3.5 w-3.5" /> <Terminal className="h-3.5 w-3.5" />
<span>Paste Output (Optional)</span> <span>Paste Output (Optional)</span>
@@ -894,12 +894,12 @@ export function TreeNavigationPage() {
rows={4} rows={4}
maxLength={10000} maxLength={10000}
className={cn( className={cn(
'block w-full rounded-md border border-white/10 bg-white/10 px-3 py-2', 'block w-full rounded-md border border-border bg-accent px-3 py-2',
'font-mono text-sm text-white placeholder:text-white/40', 'font-mono text-sm text-foreground placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20' 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20'
)} )}
/> />
<p className="mt-1 text-right text-xs text-white/30"> <p className="mt-1 text-right text-xs text-muted-foreground">
{commandOutput.length.toLocaleString()} / 10,000 {commandOutput.length.toLocaleString()} / 10,000
</p> </p>
</div> </div>
@@ -913,13 +913,13 @@ export function TreeNavigationPage() {
const targetNode = findNode(customStepFlow.pendingContinuationNodeId, tree?.tree_structure) const targetNode = findNode(customStepFlow.pendingContinuationNodeId, tree?.tree_structure)
const targetLabel = targetNode?.question || targetNode?.title || 'next step' const targetLabel = targetNode?.question || targetNode?.title || 'next step'
return ( return (
<div className="mt-6 border-t border-purple-700 pt-4"> <div className="mt-6 border-t border-primary/30 pt-4">
<button <button
type="button" type="button"
onClick={handleCustomContinueToDescendant} onClick={handleCustomContinueToDescendant}
className={cn( className={cn(
'flex w-full items-center justify-between rounded-md bg-white px-4 py-3 text-sm font-medium text-black', 'flex w-full items-center justify-between rounded-md bg-gradient-brand px-4 py-3 text-sm font-medium text-white shadow-lg shadow-primary/20',
'hover:bg-white/90' 'hover:opacity-90'
)} )}
> >
<span>Continue to: {targetLabel.length > 50 ? `${targetLabel.slice(0, 50)}...` : targetLabel}</span> <span>Continue to: {targetLabel.length > 50 ? `${targetLabel.slice(0, 50)}...` : targetLabel}</span>
@@ -931,7 +931,7 @@ export function TreeNavigationPage() {
{/* Custom Branch Controls */} {/* Custom Branch Controls */}
{customStepFlow.customBranchMode && ( {customStepFlow.customBranchMode && (
<div className="mt-6 border-t border-purple-700 pt-4"> <div className="mt-6 border-t border-primary/30 pt-4">
<p className="mb-3 text-sm text-amber-400"> <p className="mb-3 text-sm text-amber-400">
Building custom branch - add steps until the issue is resolved Building custom branch - add steps until the issue is resolved
</p> </p>
@@ -939,8 +939,8 @@ export function TreeNavigationPage() {
<button <button
onClick={() => customStepFlow.setShowCustomStepModal(true)} onClick={() => customStepFlow.setShowCustomStepModal(true)}
className={cn( className={cn(
'flex items-center gap-2 rounded-md border border-white/10 px-4 py-2 text-sm font-medium text-white/60', 'flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-muted-foreground',
'hover:bg-white/10 hover:text-white' 'hover:bg-accent hover:text-foreground'
)} )}
> >
<Plus className="h-4 w-4" /> <Plus className="h-4 w-4" />
@@ -966,21 +966,21 @@ export function TreeNavigationPage() {
{/* Action Node */} {/* Action Node */}
{currentNode && currentNode.type === 'action' && ( {currentNode && currentNode.type === 'action' && (
<> <>
<h2 className="mb-2 text-xl font-semibold text-white"> <h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
{currentNode.title} {currentNode.title}
</h2> </h2>
{currentNode.description && ( {currentNode.description && (
<div className="mb-4 text-white/60"> <div className="mb-4 text-muted-foreground">
<MarkdownContent content={currentNode.description} /> <MarkdownContent content={currentNode.description} />
</div> </div>
)} )}
{currentNode.commands && currentNode.commands.length > 0 && ( {currentNode.commands && currentNode.commands.length > 0 && (
<div className="mb-4"> <div className="mb-4">
<p className="mb-2 text-sm font-medium text-white">Commands:</p> <p className="mb-2 text-sm font-medium text-foreground">Commands:</p>
<div className="space-y-1"> <div className="space-y-1">
{currentNode.commands.map((cmd, index) => ( {currentNode.commands.map((cmd, index) => (
<div key={index} className="group relative"> <div key={index} className="group relative">
<code className="block rounded bg-white/10 p-2 pr-8 text-sm font-mono"> <code className="block rounded bg-accent p-2 pr-8 text-sm font-mono">
{cmd} {cmd}
</code> </code>
<button <button
@@ -992,7 +992,7 @@ export function TreeNavigationPage() {
{copiedCommand === cmd ? ( {copiedCommand === cmd ? (
<Check className="h-3.5 w-3.5 text-green-400" /> <Check className="h-3.5 w-3.5 text-green-400" />
) : ( ) : (
<Clipboard className="h-3.5 w-3.5 text-white/40 hover:text-white" /> <Clipboard className="h-3.5 w-3.5 text-muted-foreground hover:text-foreground" />
)} )}
</button> </button>
</div> </div>
@@ -1003,7 +1003,7 @@ export function TreeNavigationPage() {
<button <button
type="button" type="button"
onClick={() => setCommandOutputOpen(!commandOutputOpen)} onClick={() => setCommandOutputOpen(!commandOutputOpen)}
className="flex items-center gap-1.5 text-sm text-white/50 hover:text-white" className="flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground"
> >
<Terminal className="h-3.5 w-3.5" /> <Terminal className="h-3.5 w-3.5" />
<span>Paste Output (Optional)</span> <span>Paste Output (Optional)</span>
@@ -1018,12 +1018,12 @@ export function TreeNavigationPage() {
rows={4} rows={4}
maxLength={10000} maxLength={10000}
className={cn( className={cn(
'block w-full rounded-md border border-white/10 bg-white/10 px-3 py-2', 'block w-full rounded-md border border-border bg-accent px-3 py-2',
'font-mono text-sm text-white placeholder:text-white/40', 'font-mono text-sm text-foreground placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20' 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20'
)} )}
/> />
<p className="mt-1 text-right text-xs text-white/30"> <p className="mt-1 text-right text-xs text-muted-foreground">
{commandOutput.length.toLocaleString()} / 10,000 {commandOutput.length.toLocaleString()} / 10,000
</p> </p>
</div> </div>
@@ -1032,7 +1032,7 @@ export function TreeNavigationPage() {
</div> </div>
)} )}
{currentNode.expected_outcome && ( {currentNode.expected_outcome && (
<p className="mb-4 text-sm text-white/40"> <p className="mb-4 text-sm text-muted-foreground">
<strong>Expected outcome:</strong> {currentNode.expected_outcome} <strong>Expected outcome:</strong> {currentNode.expected_outcome}
</p> </p>
)} )}
@@ -1040,8 +1040,8 @@ export function TreeNavigationPage() {
<button <button
onClick={() => handleContinue()} onClick={() => handleContinue()}
className={cn( className={cn(
'rounded-md bg-white px-4 py-2 text-sm font-medium text-black', 'rounded-md bg-gradient-brand px-4 py-2 text-sm font-medium text-white shadow-lg shadow-primary/20',
'hover:bg-white/90' 'hover:opacity-90'
)} )}
> >
Continue Continue
@@ -1058,18 +1058,18 @@ export function TreeNavigationPage() {
Solution Solution
</span> </span>
</div> </div>
<h2 className="mb-2 text-xl font-semibold text-white"> <h2 className="mb-2 text-xl font-semibold font-heading text-foreground">
{currentNode.title} {currentNode.title}
</h2> </h2>
{currentNode.description && ( {currentNode.description && (
<div className="mb-4 text-white/60"> <div className="mb-4 text-muted-foreground">
<MarkdownContent content={currentNode.description} /> <MarkdownContent content={currentNode.description} />
</div> </div>
)} )}
{currentNode.resolution_steps && currentNode.resolution_steps.length > 0 && ( {currentNode.resolution_steps && currentNode.resolution_steps.length > 0 && (
<div className="mb-4"> <div className="mb-4">
<p className="mb-2 text-sm font-medium text-white">Resolution steps:</p> <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-white/40"> <ol className="list-inside list-decimal space-y-1 text-sm text-muted-foreground">
{currentNode.resolution_steps.map((step, index) => ( {currentNode.resolution_steps.map((step, index) => (
<li key={index}>{step}</li> <li key={index}>{step}</li>
))} ))}
@@ -1090,8 +1090,8 @@ export function TreeNavigationPage() {
)} )}
{/* Notes */} {/* Notes */}
<div className="mt-6 border-t border-white/[0.06] pt-4"> <div className="mt-6 border-t border-border pt-4">
<label className="block text-sm font-medium text-white"> <label className="block text-sm font-medium text-foreground">
Notes (optional) Notes (optional)
</label> </label>
<textarea <textarea
@@ -1101,9 +1101,9 @@ export function TreeNavigationPage() {
placeholder="Add any notes for this step..." placeholder="Add any notes for this step..."
rows={2} rows={2}
className={cn( className={cn(
'mt-1 block w-full rounded-md border border-white/10 bg-black/50 px-3 py-2', 'mt-1 block w-full rounded-md border border-border bg-card px-3 py-2',
'text-white placeholder:text-white/40', 'text-foreground placeholder:text-muted-foreground',
'focus:border-white/30 focus:outline-none focus:ring-1 focus:ring-white/20' 'focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/20'
)} )}
/> />
</div> </div>
@@ -1112,15 +1112,15 @@ export function TreeNavigationPage() {
{pathTaken.length > 1 && ( {pathTaken.length > 1 && (
<button <button
onClick={handleGoBack} onClick={handleGoBack}
className="mt-4 text-sm text-white/50 hover:text-white" className="mt-4 text-sm text-muted-foreground hover:text-foreground"
> >
Go back <span className="text-xs text-white/30">[Esc]</span> Go back <span className="text-xs text-muted-foreground">[Esc]</span>
</button> </button>
)} )}
{/* Keyboard Shortcuts Hint */} {/* Keyboard Shortcuts Hint */}
{currentNode && ( {currentNode && (
<div className="mt-4 border-t border-white/[0.06] pt-3 text-xs text-white/40"> <div className="mt-4 border-t border-border pt-3 text-xs text-muted-foreground">
<span className="font-medium">Keyboard:</span>{' '} <span className="font-medium">Keyboard:</span>{' '}
{currentNode.type === 'decision' && currentOptions.length > 0 && ( {currentNode.type === 'decision' && currentOptions.length > 0 && (
<span>1-{Math.min(currentOptions.length, 9)} select option</span> <span>1-{Math.min(currentOptions.length, 9)} select option</span>
@@ -1189,24 +1189,24 @@ export function TreeNavigationPage() {
> >
<div className="space-y-3 text-sm"> <div className="space-y-3 text-sm">
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<span className="text-white/60">Select option</span> <span className="text-muted-foreground">Select option</span>
<span className="rounded bg-white/10 px-2 py-0.5 font-mono text-xs text-white/80">1-9</span> <span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">1-9</span>
</div> </div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<span className="text-white/60">Go back</span> <span className="text-muted-foreground">Go back</span>
<span className="rounded bg-white/10 px-2 py-0.5 font-mono text-xs text-white/80">Esc</span> <span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">Esc</span>
</div> </div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<span className="text-white/60">Continue / Complete</span> <span className="text-muted-foreground">Continue / Complete</span>
<span className="rounded bg-white/10 px-2 py-0.5 font-mono text-xs text-white/80">Enter</span> <span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">Enter</span>
</div> </div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<span className="text-white/60">Focus notes</span> <span className="text-muted-foreground">Focus notes</span>
<span className="rounded bg-white/10 px-2 py-0.5 font-mono text-xs text-white/80">Tab</span> <span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">Tab</span>
</div> </div>
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<span className="text-white/60">Show shortcuts</span> <span className="text-muted-foreground">Show shortcuts</span>
<span className="rounded bg-white/10 px-2 py-0.5 font-mono text-xs text-white/80">?</span> <span className="rounded bg-accent px-2 py-0.5 font-mono text-xs text-foreground">?</span>
</div> </div>
</div> </div>
</Modal> </Modal>