Find + Replace across editor surfaces#296
Merged
Merged
Conversation
Expands the existing find bar with a chevron-toggleable replace row, case-sensitive and regex options, and Replace / Replace All on Mac, iOS, and the live-preview editor. ClearlyCore gains TextMatcher options + ReplaceEngine ($0–$9 capture-group templates). iOS gains its first UndoManager-backed programmatic-edit path so Replace All is one undoable step. Fixes #250
Codifies four session learnings: @published willSet timing for Combine sinks, the silent SwiftUI .keyboardShortcut break for ⌥⌘-letter shortcuts (workaround via NSMenuItem), iOS find highlights needing an explicit removeAttribute(.backgroundColor) wipe, and always passing -derivedDataPath ./.build/DerivedData inside Conductor worktrees.
Shpigford
added a commit
that referenced
this pull request
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aa) and regex (.*) toggles, and Replace / Replace All buttons on Mac, iOS, and the live-preview editor; ClearlyCore gets a regex-capableTextMatcherand a newReplaceEngine(literal +\$0–\$9capture-group templates).UndoManager-backed programmatic-edit path so Replace / Replace All produce a single undoable step that restores both text and syntax-highlight state.CLAUDE.md:@PublishedwillSet timing for Combine sinks, the SwiftUI.keyboardShortcut⌥⌘-letter dispatch bug (with the existingNSMenuIteminjection workaround), the iOS find-highlightremoveAttribute(.backgroundColor)wipe requirement, and the worktree-local-derivedDataPathrule.Fixes #250
Test plan
Aaand.*after typing a query → matches re-compute live; invalid regex shows a red border.swift test --package-path Packages/ClearlyCore— 172/172 pass (9 existing TextMatcher + 7 new ReplaceEngine).