Skip to content

fix: restore Device Settings section in settings sidebar#5993

Open
kodjima33 wants to merge 1 commit intomainfrom
fix/issue-5917
Open

fix: restore Device Settings section in settings sidebar#5993
kodjima33 wants to merge 1 commit intomainfrom
fix/issue-5917

Conversation

@kodjima33
Copy link
Copy Markdown
Collaborator

Summary

Restores the Device Settings section that was accidentally removed in commit badf72b ("Flatten Advanced settings").

Changes

  • Added case device = "Device" back to SettingsSection enum
  • Added DeviceSettingsPage() to the settings content switch
  • Added selectedSettingsSection = .device in the navigateToDeviceSettings handler
  • Added device icon to SettingsSidebar

Impact

Users can now access Device Settings to pair BLE devices. This was a P1 regression — without this, there was no UI path to scan/pair Omi hardware on macOS.

Fixes #5917

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 24, 2026

Greptile Summary

This PR restores the Device Settings section that was accidentally dropped in commit badf72be8. The three-line addition (enum case, switch arm, sidebar icon) re-enables the only macOS UI path for BLE device pairing, fixing a P1 regression tracked in #5917.

  • SettingsSection.device re-added to the enum in SettingsPage.swift
  • DeviceSettingsPage() re-wired into the section content switch
  • selectedSettingsSection = .device restored in the navigateToDeviceSettings notification handler — placement is consistent with the analogous navigateToRewindSettings handler
  • "wave.3.right.circle" icon added for the Device row in SettingsSidebar.swift, keeping the exhaustive switch complete

No logic changes were introduced; this is a pure restoration of previously working code.

Confidence Score: 5/5

  • Safe to merge — pure restoration of accidentally deleted code with no logic changes.
  • All three additions mirror patterns already established in the codebase (enum case, switch arm, sidebar icon, notification handler assignment). DeviceSettingsPage already exists and was previously wired in. No new behaviour is introduced; the PR only re-enables a code path that broke in the previous commit.
  • No files require special attention.

Important Files Changed

Filename Overview
desktop/Desktop/Sources/MainWindow/Pages/SettingsPage.swift Restores case device = "Device" to SettingsSection enum and adds the DeviceSettingsPage() case to the settings content switch — matches the pre-regression structure exactly.
desktop/Desktop/Sources/MainWindow/DesktopHomeView.swift Adds selectedSettingsSection = .device before the animation block in the .navigateToDeviceSettings notification handler, consistent with the existing .navigateToRewindSettings pattern.
desktop/Desktop/Sources/MainWindow/SettingsSidebar.swift Adds "wave.3.right.circle" SF Symbol for the .device case in the sidebar icon switch — exhaustive switch is now complete again.

Sequence Diagram

sequenceDiagram
    participant N as NotificationCenter
    participant DHV as DesktopHomeView
    participant SSB as SettingsSidebar
    participant SCV as SettingsContentView
    participant DSP as DeviceSettingsPage

    N->>DHV: .navigateToDeviceSettings
    DHV->>DHV: selectedSettingsSection = .device
    DHV->>DHV: selectedIndex = settings (animated)
    DHV->>SSB: render with selectedSection = .device
    SSB->>SSB: highlight Device row (wave.3.right.circle icon)
    DHV->>SCV: render selectedSection = .device
    SCV->>DSP: DeviceSettingsPage()
    DSP-->>SCV: BLE scan / pair UI
Loading

Reviews (1): Last reviewed commit: "fix: restore Device Settings section in ..." | Re-trigger Greptile

@kodjima33 kodjima33 force-pushed the fix/issue-5917 branch 3 times, most recently from 1bbc10f to c4565af Compare March 26, 2026 20:50
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.

macOS: Device Settings page unreachable - cannot pair BLE device

1 participant