Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix: add cursor-pointer to sidebar Settings and onboarding Skip buttons (#469)

Hiep Leb6df038ff163
diff --git a/__tests__/components/features/sidebar/sidebar.test.tsx b/__tests__/components/features/sidebar/sidebar.test.tsx
index 65690cd5da..0ba8a15279 100644
--- a/__tests__/components/features/sidebar/sidebar.test.tsx
+++ b/__tests__/components/features/sidebar/sidebar.test.tsx
@@ -285,6 +285,19 @@ describe("Sidebar", () => {
expect(navigate).toHaveBeenCalledWith("/settings");
});
+ it("opts the collapsed Settings button into cursor-pointer so hovering it shows the pointer affordance", () => {
+ // Arrange: render with the sidebar collapsed so the Settings icon is mounted.
+ window.localStorage.setItem("openhands-sidebar-collapsed", "true");
+ renderSidebar("/conversations");
+
+ // Act: locate the Settings button the user hovers.
+ const settingsButton = screen.getByTestId("collapsed-settings-link");
+
+ // Assert: Tailwind v4 preflight resets <button> cursor to default, so
+ // the button must opt back into cursor-pointer for the hover affordance.
+ expect(settingsButton.className).toMatch(/(^|\s)cursor-pointer(\s|$)/);
+ });
+
it("opens the backend popover when hovering the collapsed backend icon", async () => {
window.localStorage.setItem("openhands-sidebar-collapsed", "true");
renderSidebar("/conversations");
diff --git a/__tests__/components/onboarding/onboarding-modal.test.tsx b/__tests__/components/onboarding/onboarding-modal.test.tsx
index a83c96042f..10f504ba0f 100644
--- a/__tests__/components/onboarding/onboarding-modal.test.tsx
+++ b/__tests__/components/onboarding/onboarding-modal.test.tsx
@@ -187,6 +187,18 @@ describe("OnboardingModal", () => {
expect(onClose).toHaveBeenCalledTimes(1);
});
+ it("opts the Skip button into cursor-pointer so hovering it shows the pointer affordance", () => {
+ // Arrange: render the modal so the Skip button is mounted.
+ renderModal();
+
+ // Act: locate the Skip button the user hovers.
+ const skipButton = screen.getByTestId("onboarding-skip");
+
+ // Assert: Tailwind v4 preflight resets <button> cursor to default, so
+ // the button must opt back into cursor-pointer for the hover affordance.
+ expect(skipButton.className).toMatch(/(^|\s)cursor-pointer(\s|$)/);
+ });
+
it("wraps the slide rail in a dedicated scroll region so the modal chrome stays put", () => {
// Arrange + act: render the modal once.
renderModal();
diff --git a/src/components/features/onboarding/onboarding-modal.tsx b/src/components/features/onboarding/onboarding-modal.tsx
index 4d6433beb3..ccff56b3bf 100644
--- a/src/components/features/onboarding/onboarding-modal.tsx
+++ b/src/components/features/onboarding/onboarding-modal.tsx
@@ -117,7 +117,7 @@ export function OnboardingModal({ onClose }: OnboardingModalProps) {
type="button"
data-testid="onboarding-skip"
onClick={onClose}
- className="flex items-center gap-1 rounded-md px-2 py-1 text-xs text-gray-400 hover:bg-white/5 hover:text-white"
+ className="flex items-center gap-1 rounded-md px-2 py-1 text-xs text-gray-400 cursor-pointer hover:bg-white/5 hover:text-white"
>
<span>{t(I18nKey.ONBOARDING$SKIP)}</span>
<X className="size-3.5" aria-hidden />
diff --git a/src/components/features/sidebar/sidebar.tsx b/src/components/features/sidebar/sidebar.tsx
index 291026f08b..89ede719ac 100644
--- a/src/components/features/sidebar/sidebar.tsx
+++ b/src/components/features/sidebar/sidebar.tsx
@@ -315,7 +315,7 @@ export function Sidebar() {
aria-label={t(I18nKey.SIDEBAR$SETTINGS)}
onClick={() => navigate("/settings")}
className={cn(
- "inline-flex items-center justify-center w-10 h-10 p-0 mx-auto rounded-md transition-colors",
+ "inline-flex items-center justify-center w-10 h-10 p-0 mx-auto rounded-md transition-colors cursor-pointer",
currentPath.startsWith("/settings")
? "bg-[#1f1f1f99] text-white font-medium"
: "text-[#8C8C8C] hover:text-white hover:bg-[#1f1f1f99]",