From 369c75a05569952fd3924e8aac8f3a80519ae41a Mon Sep 17 00:00:00 2001 From: chihlasm Date: Sun, 15 Feb 2026 19:42:42 -0500 Subject: [PATCH] refactor: migrate TreeNavigationPage to new design system Co-Authored-By: Claude Opus 4.6 --- frontend/src/pages/TreeNavigationPage.tsx | 202 +++++++++++----------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/frontend/src/pages/TreeNavigationPage.tsx b/frontend/src/pages/TreeNavigationPage.tsx index 3cfa9402..d4a7414f 100644 --- a/frontend/src/pages/TreeNavigationPage.tsx +++ b/frontend/src/pages/TreeNavigationPage.tsx @@ -516,7 +516,7 @@ export function TreeNavigationPage() { if (isLoading) { return (
-
+
) } @@ -529,7 +529,7 @@ export function TreeNavigationPage() {
@@ -541,17 +541,17 @@ export function TreeNavigationPage() { if (showMetadataForm) { return (
-

{tree.name}

-

{tree.description}

+

{tree.name}

+

{tree.description}

-
-

Session Details

-

+

+

Session Details

+

Optional: Add ticket and client info for easier tracking

-
-
@@ -587,8 +587,8 @@ export function TreeNavigationPage() {
{(ticketNumber || clientName) && ( -

+

{ticketNumber && `Ticket: ${ticketNumber}`} {ticketNumber && clientName && ' · '} {clientName && `Client: ${clientName}`} @@ -647,8 +647,8 @@ export function TreeNavigationPage() { {showSharePopover && ( -

+
{/* Copy Progress Summary */} {/* Divider */} -
+
{/* Manage Share Links */}
@@ -724,17 +724,17 @@ export function TreeNavigationPage() { const truncatedLabel = label.length > 30 ? `${label.slice(0, 30)}...` : label return ( - {index > 0 && } + {index > 0 && } {index < pathTaken.length - 1 ? ( ) : ( - + {truncatedLabel} )} @@ -744,15 +744,15 @@ export function TreeNavigationPage() {
{/* Current Node */} -
+
{/* Decision Node */} {currentNode && currentNode.type === 'decision' && ( <> -

+

{currentNode.question}

{currentNode.help_text && ( -
+
)} @@ -763,8 +763,8 @@ export function TreeNavigationPage() { onClick={() => handleSelectOption(option.id, option.label, option.next_node_id)} disabled={!!selectingOption} className={cn( - 'w-full rounded-md border border-white/10 p-3 text-left text-white transition-colors', - 'hover:border-white/30 hover:bg-white/[0.06]', + 'w-full rounded-md border border-border p-3 text-left text-foreground transition-colors', + 'hover:border-primary/30 hover:bg-accent', 'flex items-center gap-3', selectingOption && selectingOption !== option.id && 'opacity-50 pointer-events-none' )} @@ -772,10 +772,10 @@ export function TreeNavigationPage() { {index < 9 && ( selectingOption === option.id ? ( - + ) : ( - + {index + 1} ) @@ -787,7 +787,7 @@ export function TreeNavigationPage() { {/* Previously-created custom steps at this node */} {customStepFlow.customSteps.filter(cs => cs.inserted_after_node_id === currentNodeId).length > 0 && (
-

+

Your Custom Steps

{customStepFlow.customSteps @@ -798,12 +798,12 @@ export function TreeNavigationPage() { key={cs.id} onClick={() => customStepFlow.handleNavigateToCustomStep(cs)} className={cn( - 'w-full rounded-md border border-purple-700 bg-purple-900/20 p-3 text-left text-white transition-colors', - 'hover:border-purple-500 hover:bg-purple-900/40', + 'w-full rounded-md border border-primary/30 bg-primary/10 p-3 text-left text-foreground transition-colors', + 'hover:border-primary/50 hover:bg-primary/20', 'flex items-center gap-3' )} > - + Custom {cs.step_data.title} @@ -815,7 +815,7 @@ export function TreeNavigationPage() { {/* Add Custom Step Button */}
@@ -879,7 +879,7 @@ export function TreeNavigationPage() {
@@ -913,13 +913,13 @@ export function TreeNavigationPage() { const targetNode = findNode(customStepFlow.pendingContinuationNodeId, tree?.tree_structure) const targetLabel = targetNode?.question || targetNode?.title || 'next step' return ( -
+
@@ -1003,7 +1003,7 @@ export function TreeNavigationPage() {
@@ -1032,7 +1032,7 @@ export function TreeNavigationPage() {
)} {currentNode.expected_outcome && ( -

+

Expected outcome: {currentNode.expected_outcome}

)} @@ -1040,8 +1040,8 @@ export function TreeNavigationPage() {
-

+

{currentNode.title}

{currentNode.description && ( -
+
)} {currentNode.resolution_steps && currentNode.resolution_steps.length > 0 && (
-

Resolution steps:

-
    +

    Resolution steps:

    +
      {currentNode.resolution_steps.map((step, index) => (
    1. {step}
    2. ))} @@ -1090,8 +1090,8 @@ export function TreeNavigationPage() { )} {/* Notes */} -
      -