From 66f928ca2462372f9ba95b6efb929e33b1ced716 Mon Sep 17 00:00:00 2001 From: Mahad Kalam <55807755+skyfallwastaken@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:43:52 +0000 Subject: [PATCH] OS switcher tabs updates (#1002) * Add OS switcher tabs to WakatimeSetup page - Add segmented control with macOS/Linux/Codespaces, Windows, and Advanced tabs - Default tab is auto-detected from user agent (server-side) - Show WSL option in mac/linux tab label only when user is on Windows - Use modal-matching cubic-bezier easing for tab transitions * Add system test for WakatimeSetup OS switcher tabs * Extract repeated tab classes into tabClass helper * Remove Xcode reference from setup subtitle * Show Xcode in subtitle only on macOS/Linux tab * pf * Update test/system/wakatime_setup_test.rb Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../pages/WakatimeSetup/Index.svelte | 35 ++++++++++--------- test/system/wakatime_setup_test.rb | 30 ++++++++++++++++ 2 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 test/system/wakatime_setup_test.rb diff --git a/app/javascript/pages/WakatimeSetup/Index.svelte b/app/javascript/pages/WakatimeSetup/Index.svelte index 7a19c68..130b05d 100644 --- a/app/javascript/pages/WakatimeSetup/Index.svelte +++ b/app/javascript/pages/WakatimeSetup/Index.svelte @@ -16,6 +16,15 @@ let activeSection = $state(setup_os === "windows" ? "windows" : "mac-linux"); let isWindows = setup_os === "windows"; + + const tabBase = + "flex-1 px-4 py-2 rounded-lg text-sm font-medium transition-all duration-300 ease-[cubic-bezier(0.16,1,0.3,1)]"; + const tabActive = "bg-darkless text-surface-content shadow-sm"; + const tabInactive = "text-secondary hover:text-surface-content"; + function tabClass(section: string) { + return `${tabBase} ${activeSection === section ? tabActive : tabInactive}`; + } + let hasHeartbeat = $state(false); let heartbeatTimeAgo = $state(""); let checkCount = $state(0); @@ -33,8 +42,11 @@ ]; const sharedTitle = "Configure Hackatime"; - const sharedSubtitle = + const macLinuxSubtitle = "This creates your config file and validates your API key. And if you're using VS Code, a JetBrains IDE, Zed, or Xcode, we'll even set up the plugins for you!"; + const windowsSubtitle = + "This creates your config file and validates your API key. And if you're using VS Code, a JetBrains IDE, or Zed, we'll even set up the plugins for you!"; + const advancedSubtitle = macLinuxSubtitle; function showSuccess(timeAgo: string) { hasHeartbeat = true; @@ -123,28 +135,19 @@