Skip to content

Use native macOS controls for the clipboard popup - #10

Merged
nklmilojevic merged 2 commits into
mainfrom
improve/native-macos-popup
Sep 10, 2026
Merged

nklmilojevic merged 2 commits into
mainfrom
improve/native-macos-popup

Conversation

@nklmilojevic

@nklmilojevic nklmilojevic commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

Lodge's popup used custom search, row selection, and divider controls. Replace them with an AppKit split view, native search field, and sidebar-style history lists so the window uses the macOS system appearance. The preview uses a solid content background.

Keep compact view, separate pinned items, and saved column width. Share keyboard handling between the native search field and SwiftUI views, and let AppKit update the Tab navigation order. The minimum supported version remains macOS 14.

Validation:

  • Xcode 27 build and all 110 unit tests passed locally on macOS 27.
  • Xcode 26.6 build and all 110 unit tests passed in macOS 26 CI.
  • Added checks for keyboard navigation, text entry handling, and saved divider width after reopening. Column width uses the full split pane, including the sidebar inset on macOS 26.
  • git diff --check passed.

Live appearance and interaction need a local check. The test renderer could not capture the full native sidebar effect. This change has not been tested on macOS 14 or 15.

@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR replaces the clipboard popup’s custom controls with native AppKit and SwiftUI components while retaining compact mode and persisted sidebar width.

  • Adds an AppKit split-view controller with native divider behavior and sidebar-width persistence.
  • Replaces the custom search control with NSSearchField and centralizes keyboard handling.
  • Uses sidebar-style history lists with separate pinned and unpinned sections.
  • Updates native colors, backgrounds, focus traversal, and layout spacing.
  • Adds tests for keyboard navigation, text-entry pass-through, and divider-width persistence.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
Lodge/Views/ContentView.swift Introduces the native split-view hierarchy, sidebar constraints, and persisted divider-width restoration.
Lodge/Views/HistoryListView.swift Replaces custom scrolling rows with native sidebar lists and separate pinned and unpinned sections.
Lodge/Views/SearchFieldView.swift Replaces the SwiftUI search field with an AppKit search field that synchronizes text, focus, and key handling.
Lodge/Views/KeyHandlingView.swift Extracts popup keyboard behavior into a shared handler used by SwiftUI and AppKit controls.
LodgeTests/HistoryTests.swift Adds focused coverage for native-search keyboard behavior and split-view width persistence.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  FP[FloatingPanel] --> CV[ContentView]
  CV -->|Compact mode| CL[Sidebar material and history list]
  CV -->|Expanded mode| SV[HistorySplitController]
  SV --> SB[Sidebar hosting controller]
  SV --> DP[Detail hosting controller]
  SB --> SF[Native NSSearchField]
  SB --> HL[Pinned and unpinned sidebar Lists]
  SF --> KH[HistoryKeyHandler]
  HL --> AS[AppState and History]
  KH --> AS
Loading

Reviews (2): Last reviewed commit: "Save the full sidebar pane width on macO..." | Re-trigger Greptile

@nklmilojevic
nklmilojevic merged commit da95be8 into main Sep 10, 2026
2 checks passed
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.

1 participant