From 71df76b9e0c5ccbc857c62a571a19148614b3ffa Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Wed, 24 Jun 2026 18:08:27 -0600 Subject: [PATCH] [RELEASE] fix: active nav by text-content matching (sidebar uses divs not links) --- .../agent-runs/run_1782345998663_x4lnsq.json | 18 ++++++ .../domains/cloud.tangle.tools/knowledge.json | 56 +++++++++++++------ .../runs/run_1782346053079_iefk.json | 21 +++++++ .agent-memory/traj_1782346052849_xs7h0u.json | 20 +++++++ apps/tangle-cloud/src/components/Layout.tsx | 39 +++++++------ 5 files changed, 121 insertions(+), 33 deletions(-) create mode 100644 .agent-memory/agent-runs/run_1782345998663_x4lnsq.json create mode 100644 .agent-memory/runs/run_1782346053079_iefk.json create mode 100644 .agent-memory/traj_1782346052849_xs7h0u.json diff --git a/.agent-memory/agent-runs/run_1782345998663_x4lnsq.json b/.agent-memory/agent-runs/run_1782345998663_x4lnsq.json new file mode 100644 index 000000000..1be669211 --- /dev/null +++ b/.agent-memory/agent-runs/run_1782345998663_x4lnsq.json @@ -0,0 +1,18 @@ +{ + "runId": "run_1782345998663_x4lnsq", + "status": "completed", + "goal": "Screenshot this page. Look at the left sidebar navigation. Is the 'Blueprints' item visually different from the others? Specifically: does it have a colored left border, a background tint, or brighter/bolder text? Answer YES or NO + describe what you see.", + "domain": "cloud.tangle.tools", + "startUrl": "https://cloud.tangle.tools/blueprints", + "startedAt": "2026-06-25T00:06:39.689Z", + "updatedAt": "2026-06-25T00:07:33.074Z", + "artifactPaths": [ + "file:///tmp/opencode/dom-inject-check/cli-task/recording.webm" + ], + "turnCount": 2, + "success": true, + "finalUrl": "https://cloud.tangle.tools/blueprints", + "summary": "**Answer: NO**\n\nThe 'Blueprints' navigation item in the left sidebar has **NO visual difference** from the other navigation items.\n\n**What I See on the 'Blueprints' Item:**\n\n1. **Colored Left Border**: NONE - No left accent border, no colored stripe, no visual indicator on the left edge\n2. **Background Tint**: NONE - No background highlight, no subtle color difference from inactive items (Dashboard, Operators, Rewards, Earnings)\n3. **Brighter/Bolder Text**: NO - The text appears identical in weight, color, and brightness to all other navigation items (same white/light gray color)\n4. **Icon Styling**: The icon appears identical to other navigation icons - no color change or visual emphasis\n\n**Critical UX Issue Identified**: The 'Blueprints' navigation item is completely indistinguishable from inactive navigation items. All sidebar links appear visually identical with:\n- Same background color (dark, no tint)\n- Same text color (white/light gray)\n- Same font weight (regular, not bold)\n- Same icon styling\n- No border or accent indicators\n\nThe only way to identify the current page is by reading the URL (https://cloud.tangle.tools/blueprints) or the main content heading 'Blueprints' - not from the navigation itself. This represents a significant wayfinding and accessibility concern.", + "result": "**Answer: NO**\n\nThe 'Blueprints' navigation item in the left sidebar has **NO visual difference** from the other navigation items.\n\n**What I See on the 'Blueprints' Item:**\n\n1. **Colored Left Border**: NONE - No left accent border, no colored stripe, no visual indicator on the left edge\n2. **Background Tint**: NONE - No background highlight, no subtle color difference from inactive items (Dashboard, Operators, Rewards, Earnings)\n3. **Brighter/Bolder Text**: NO - The text appears identical in weight, color, and brightness to all other navigation items (same white/light gray color)\n4. **Icon Styling**: The icon appears identical to other navigation icons - no color change or visual emphasis\n\n**Critical UX Issue Identified**: The 'Blueprints' navigation item is completely indistinguishable from inactive navigation items. All sidebar links appear visually identical with:\n- Same background color (dark, no tint)\n- Same text color (white/light gray)\n- Same font weight (regular, not bold)\n- Same icon styling\n- No border or accent indicators\n\nThe only way to identify the current page is by reading the URL (https://cloud.tangle.tools/blueprints) or the main content heading 'Blueprints' - not from the navigation itself. This represents a significant wayfinding and accessibility concern.", + "completedAt": "2026-06-25T00:07:32.849Z" +} \ No newline at end of file diff --git a/.agent-memory/domains/cloud.tangle.tools/knowledge.json b/.agent-memory/domains/cloud.tangle.tools/knowledge.json index 272d5381e..083af1333 100644 --- a/.agent-memory/domains/cloud.tangle.tools/knowledge.json +++ b/.agent-memory/domains/cloud.tangle.tools/knowledge.json @@ -5,9 +5,9 @@ "type": "timing", "key": "typical-turns", "value": "2 turns", - "confidence": 0.9887410009315738, - "sources": 17, - "lastSeen": "2026-06-24T23:54:57.609Z" + "confidence": 0.9909928007452591, + "sources": 18, + "lastSeen": "2026-06-25T00:07:32.850Z" }, { "type": "selector", @@ -317,7 +317,7 @@ "type": "quirk", "key": "nav-active-state", "value": "Left sidebar navigation lacks visual active state indicators — cannot reliably detect current page from sidebar styling alone", - "confidence": 0.6, + "confidence": 0.3, "sources": 1, "lastSeen": "2026-06-24T22:58:34.359Z" }, @@ -661,12 +661,46 @@ "type": "selector", "key": "current-page-heading", "value": "Main content heading (e.g., 'Blueprints') is the reliable visual indicator of current page location", - "confidence": 0.6, + "confidence": 0.3, "sources": 1, "lastSeen": "2026-06-24T23:55:03.797Z" + }, + { + "type": "quirk", + "key": "nav-active-state", + "value": "Sidebar navigation items do NOT show visual active state — current page must be determined from URL or content heading, not nav styling", + "confidence": 0.6, + "sources": 1, + "lastSeen": "2026-06-25T00:07:38.476Z" + }, + { + "type": "pattern", + "key": "page-identification", + "value": "To verify current page: check URL path or main content heading, not sidebar nav item appearance", + "confidence": 0.6, + "sources": 1, + "lastSeen": "2026-06-25T00:07:38.476Z" + }, + { + "type": "selector", + "key": "current-page-heading", + "value": "Main content heading (typically h1) is more reliable for page identification than nav item styling", + "confidence": 0.6, + "sources": 1, + "lastSeen": "2026-06-25T00:07:38.476Z" } ], "sessions": [ + { + "id": "session_1782346052848_zzd9x9", + "goal": "Screenshot this page. Look at the left sidebar navigation. Is the 'Blueprints' item visually different from the others? Specifically: does it have a colored left border, a background tint, or brighter/bolder text? Answer YES or NO + describe what you see.", + "outcome": "**Answer: NO**\n\nThe 'Blueprints' navigation item in the left sidebar has **NO visual difference** from the other navigation items.\n\n**What I See on the 'Blueprints' Item:**\n\n1. **Colored Left Border**: NONE - No left accent border, no colored stripe, no visual indicator on the left edge\n2. **Background Tint**: NONE - No background highlight, no subtle color difference from inactive items (Dashboard, Operators, Rewards, Earnings)\n3. **Brighter/Bolder Text**: NO - The text appears identical in weight, color, and brightness to all other navigation items (same white/light gray color)\n4. **Icon Styling**: The icon appears identical to other navigation icons - no color change or visual emphasis\n\n**Critical UX Issue Identified**: The 'Blueprints' navigation item is completely indistinguishable from inactive navigation items. All sidebar links appear visually identical with:\n- Same background color (dark, no tint)\n- Same text color (white/light gray)\n- Same font weight (regular, not bold)\n- Same icon styling\n- No border or accent indicators\n\nThe only way to identify the current page is by reading the URL (https://cloud.tangle.tools/blueprints) or the main content heading 'Blueprints' - not from the navigation itself. This represents a significant wayfinding and accessibility concern.", + "success": true, + "finalUrl": "https://cloud.tangle.tools/blueprints", + "timestamp": "2026-06-25T00:07:32.848Z", + "turnsUsed": 2, + "durationMs": 54185 + }, { "id": "session_1782345297607_unpno9", "goal": "Screenshot this page. Look ONLY at the left sidebar. Is there ANY visible difference (background color, border, text weight) on the 'Blueprints' nav item vs the others? Answer YES/NO + describe exactly what you see on the active item.", @@ -706,17 +740,7 @@ "timestamp": "2026-06-24T23:25:24.082Z", "turnsUsed": 2, "durationMs": 56039 - }, - { - "id": "session_1782343460932_v60fg3", - "goal": "Screenshot this page. As a senior product designer, rate it /10. One-line verdict + one thing to improve. Dark SaaS dashboard.", - "outcome": "**Design Rating: 6/10** — Tangle Cloud Rewards Page\n\n**One-line Verdict:** Professional dark SaaS dashboard with excellent color contrast (WCAG AAA), clean typography, and clear empty state messaging ('Connect to see your staking rewards'), but critically undermined by invisible navigation active states that make it impossible to identify the current page location without checking the URL.\n\n**One Thing to Improve:** Add clear active state indicators to the sidebar navigation—implement a left accent border in brand color (purple #8B5CF6), subtle background highlight (rgba(139, 92, 246, 0.1)), and/or bold font weight for the current 'Rewards' page so users can instantly see where they are in the dashboard hierarchy at a glance.", - "success": true, - "finalUrl": "https://cloud.tangle.tools/rewards", - "timestamp": "2026-06-24T23:24:20.932Z", - "turnsUsed": 2, - "durationMs": 52148 } ], - "updatedAt": "2026-06-24T23:55:03.797Z" + "updatedAt": "2026-06-25T00:07:38.476Z" } \ No newline at end of file diff --git a/.agent-memory/runs/run_1782346053079_iefk.json b/.agent-memory/runs/run_1782346053079_iefk.json new file mode 100644 index 000000000..483ba9aa3 --- /dev/null +++ b/.agent-memory/runs/run_1782346053079_iefk.json @@ -0,0 +1,21 @@ +{ + "id": "run_1782346053079_iefk", + "model": "sonnet", + "timestamp": "2026-06-25T00:07:33.078Z", + "total": 1, + "passed": 1, + "failed": 0, + "passRate": 1, + "avgTurns": 2, + "avgDurationMs": 54199, + "totalDurationMs": 54199, + "tests": [ + { + "id": "cli-task", + "name": "Screenshot this page. Look at the left sidebar navigation. I", + "verified": true, + "turnsUsed": 2, + "durationMs": 54199 + } + ] +} \ No newline at end of file diff --git a/.agent-memory/traj_1782346052849_xs7h0u.json b/.agent-memory/traj_1782346052849_xs7h0u.json new file mode 100644 index 000000000..0382bec48 --- /dev/null +++ b/.agent-memory/traj_1782346052849_xs7h0u.json @@ -0,0 +1,20 @@ +{ + "id": "traj_1782346052849_xs7h0u", + "goal": "Screenshot this page. Look at the left sidebar navigation. Is the 'Blueprints' item visually different from the others? Specifically: does it have a colored left border, a background tint, or brighter/bolder text? Answer YES or NO + describe what you see.", + "origin": "https://cloud.tangle.tools", + "steps": [ + { + "url": "https://cloud.tangle.tools/blueprints", + "action": { + "action": "evaluate", + "criteria": "Looking at the LEFT SIDEBAR navigation: Does the 'Blueprints' item have ANY visual difference from other nav items (Dashboard, Operators, Rewards, Earnings)? Check for: 1) Colored left border or accent stripe, 2) Background tint/highlight or subtle color difference, 3) Brighter/bolder text or different font weight, 4) Icon color difference. Compare the exact visual styling of 'Blueprints' vs the inactive items." + }, + "snapshotHash": "1019957389", + "expectedEffect": "Will receive visual assessment describing any styling differences (or lack thereof) between the Blueprints nav item and other sidebar items, enabling me to provide a definitive YES/NO answer" + } + ], + "success": true, + "durationMs": 41401, + "model": "sonnet", + "timestamp": "2026-06-25T00:07:32.850Z" +} \ No newline at end of file diff --git a/apps/tangle-cloud/src/components/Layout.tsx b/apps/tangle-cloud/src/components/Layout.tsx index c4840005a..882760868 100644 --- a/apps/tangle-cloud/src/components/Layout.tsx +++ b/apps/tangle-cloud/src/components/Layout.tsx @@ -83,32 +83,37 @@ const Layout: FC> = ({ onOpenHelp: useCallback(() => setIsHelpOpen(true), []), }); - // Direct DOM active-nav marker — bypasses the shared SideBar's prop chain - // which wasn't reliably setting isActive on cloud's routes. This adds a - // visible class to the sidebar item matching the current URL. + // Direct DOM active-nav marker — bypasses the shared SideBar's prop chain. + // The sidebar renders divs with onClick (not ), so match by text. useEffect(() => { const path = window.location.pathname; + const routeLabels: Record = { + '/instances': 'Dashboard', + '/blueprints': 'Blueprints', + '/operators': 'Operators', + '/rewards': 'Rewards', + '/earnings': 'Earnings', + '/payments': 'Payments', + }; + const activeLabel = Object.entries(routeLabels).find( + ([href]) => href !== '/' && path.includes(href), + )?.[1]; + if (!activeLabel) return; + const markActive = () => { const items = document.querySelectorAll( - '.tangle-cloud-shell nav a[href], .tangle-cloud-shell [role="navigation"] a[href]', + '.tangle-cloud-shell div[class*="rounded-full"], .tangle-cloud-shell div[class*="px-4"]', ); - items.forEach((link) => { - const href = link.getAttribute('href'); - if (!href || href === '/' || href.startsWith('http')) return; - const parent = - link.closest('div[class*="rounded-full"]') ?? link.parentElement; - if (parent) { - if (path.includes(href)) { - parent.classList.add('cloud-nav-active'); - } else { - parent.classList.remove('cloud-nav-active'); - } + items.forEach((el) => { + if (el.textContent?.trim().includes(activeLabel)) { + el.classList.add('cloud-nav-active'); + } else { + el.classList.remove('cloud-nav-active'); } }); }; markActive(); - // Re-run after a tick in case sidebar renders late - const timer = setTimeout(markActive, 200); + const timer = setTimeout(markActive, 300); return () => clearTimeout(timer); });