-
Notifications
You must be signed in to change notification settings - Fork 64
[WIP] Logo Switcher #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[WIP] Logo Switcher #1002
Conversation
PR SummaryIntroduces a new interactive header logo with theme-aware Dune/Sim toggle behavior.
Written by Cursor Bugbot for commit 6cac840. Configure here. |
There was a problem hiding this 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'); | ||
| }); |
There was a problem hiding this comment.
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)
| clickRight.setAttribute('height', '56'); | ||
| clickRight.setAttribute('fill', 'transparent'); | ||
| clickRight.style.cursor = 'pointer'; | ||
| svg.appendChild(clickRight); |
There was a problem hiding this comment.
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.
| const SLIDER_WIDTH = 110; | ||
|
|
||
| // Track if we've already initialized to prevent duplicates | ||
| let initialized = false; |
There was a problem hiding this comment.
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)
| <!-- 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> |
There was a problem hiding this comment.
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.
Adding all the necessary files for the logo switcher attempt.