Skip to content

refactor: replace custom sidebar search with native .searchable()#231

Merged
datlechin merged 1 commit intomainfrom
refactor/native-sidebar-search
Mar 9, 2026
Merged

refactor: replace custom sidebar search with native .searchable()#231
datlechin merged 1 commit intomainfrom
refactor/native-sidebar-search

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • Replace the custom TextField-based search field in SidebarView with SwiftUI's native .searchable() modifier on the NavigationSplitView sidebar column
  • Remove localSearchText state, searchSyncTask debounce task, and the entire searchField computed property (~55 lines removed)
  • Move the .searchable() binding to ContentView via sidebarSearchTextBinding(for:) so it applies at the NavigationSplitView level
  • Simplify onChange(of: sidebarState.searchText) to directly update viewModel.debouncedSearchText

Test plan

  • Open a connection with tables — verify the search field appears in the sidebar toolbar area
  • Type to filter tables — verify filtering works
  • Clear search — verify all tables reappear
  • Verify search state syncs across native tabs for the same connection

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin datlechin merged commit 835f4f1 into main Mar 9, 2026
2 checks passed
@datlechin datlechin deleted the refactor/native-sidebar-search branch March 9, 2026 09:45
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