Fix GUI search rescans on every frame - #3384
Merged
Merged
Conversation
5 tasks
jsmestad
force-pushed
the
codex/gui-search-index-3280
branch
from
September 16, 2026 13:47
d7874cc to
c85c7b0
Compare
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.
TL;DR
GUI Find now builds and maintains a versioned search index outside Editor and render callbacks. Unchanged frames do not fetch or scan document text, while edits, undo and redo, query changes, option changes, and buffer switches keep exact counts and navigation current.
Closes #3280
Context
The Find toolbar previously fetched the full buffer and ran the complete search during render-state construction. Cursor-only frames and unrelated UI updates therefore repeated document-scale work. The render path also hid failures behind a zero-result fallback and encoded result counts as 16-bit values.
Changes
Compatibility
This changes the frontend protocol from version 20 to version 21. The BEAM encoder, generated Go decoder, and Swift decoder are updated together. Older payloads remain rejected by the existing protocol version check.
Verification
make lintmix test.llm: 58 doctests, 98 properties, 10,361 tests, 0 failures, 1 skippedmix conformance: 162 tests, 0 failuresgo test ./internal/protocol ./internal/generatedSearchToolbarTestsandProtocolSchemaTestswithxcodebuildAcceptance Criteria Addressed