Skip to content

Conversation

@dericksozo
Copy link
Contributor

Adding all the necessary files for the logo switcher attempt.

@dericksozo dericksozo requested a review from karimhass January 21, 2026 10:53
@cursor
Copy link

cursor bot commented Jan 21, 2026

PR Summary

Introduces a new interactive header logo with theme-aware Dune/Sim toggle behavior.

  • Update docs.json to use logo/dune-toggle-light.svg and logo/dune-toggle-dark.svg, change logo.href to https://docs.dune.com, and load logo-interactive.js (deferred)
  • Add logo-interactive.js to attach hover/click interactions, theme detection, MutationObserver handling, duplicate-logo visibility control, and click-through to docs.sim.dune.com / sim.dune.com
  • Add new SVG assets: logo/dune-toggle-light.svg, logo/dune-toggle-dark.svg, and logo/dune-toggle.svg (220x48)
  • Add styles.css rules to enforce logo sizing and hide/show the correct logo based on theme (plus minor styling adjustments)

Written by Cursor Bugbot for commit 6cac840. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

e.preventDefault();
e.stopPropagation();
window.open('https://sim.dune.com/', '_blank');
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click handlers open wrong destinations for Dune/Sim toggle

High Severity

The click handlers have swapped destinations. Clicking the "Dune" side (clickLeft) opens https://docs.sim.dune.com/ which is the Sim documentation, while clicking "Sim" (clickRight) opens https://sim.dune.com/. Users clicking "Dune" would expect to stay on Dune docs or navigate to the main Dune site, not navigate to Sim documentation. Similarly, clicking "Sim" would logically expect to reach Sim docs (docs.sim.dune.com), not the main Sim site.

Additional Locations (1)

Fix in Cursor Fix in Web

clickRight.setAttribute('height', '56');
clickRight.setAttribute('fill', 'transparent');
clickRight.style.cursor = 'pointer';
svg.appendChild(clickRight);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fallback click targets have wrong dimensions

Low Severity

When click targets don't exist and are dynamically created, they're sized at 140x56 pixels positioned at x=0 and x=140. The SVG viewBox is 220x48 and the SVG-defined click targets are 110x48 at x=0 and x=110. The fallback dimensions extend beyond the viewBox (280px total width vs 220px viewBox) and don't match the intended 50/50 split.

Fix in Cursor Fix in Web

const SLIDER_WIDTH = 110;

// Track if we've already initialized to prevent duplicates
let initialized = false;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused initialized variable is a dead store

Low Severity

The initialized variable is declared and assigned values at lines 319 and 346, but is never read after assignment. The comment says it's to "prevent duplicates" but no conditional check uses this variable.

Additional Locations (1)

Fix in Cursor Fix in Web

<!-- Invisible click targets -->
<rect id="clickLeft" class="click-target" x="0" y="0" width="110" height="48" fill="transparent"/>
<rect id="clickRight" class="click-target" x="110" y="0" width="110" height="48" fill="transparent"/>
</svg>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused dune-toggle.svg file is never referenced

Low Severity

The file logo/dune-toggle.svg is added but never referenced anywhere. The docs.json only references dune-toggle-light.svg and dune-toggle-dark.svg. The JavaScript only searches for selectors matching #dune-toggle-light, #dune-toggle-dark, their class variants, or svg:has(#toggleBg). This base file with id="dune-toggle" will never be loaded or used.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants