Repository navigation
Fix CodeEditor search ownership and upgrade AvalonEdit - #371
Merged
Merged
Conversation
Keep one installed AvalonEdit SearchPanel across load cycles and document replacement, with dual-target coverage for handlers, search behavior, and owned subscription lifetimes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 168d94f2-8e49-4a66-8ad7-d7073f7fc3d6
Add dual-target editor behavior coverage, consume the packaged CodeEditor public vendor-type boundary, validate exact AvalonEdit assets, and key package-only restore caches by the complete package family. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 168d94f2-8e49-4a66-8ad7-d7073f7fc3d6
Move CodeEditor to AvalonEdit 6.3.1.120 and update the exact framework asset and assembly identity contract for the retained net48 and net10 targets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 168d94f2-8e49-4a66-8ad7-d7073f7fc3d6
tgjones
approved these changes
Oct 14, 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
CodeEditorown one AvalonEditSearchPanelinstead of installingadditional panels during load and document changes.
behavior and packaged public contracts.
on
net48andnet10.0-windows.Review guide
The commits are intentionally separated:
e773302Own one CodeEditor search panelcfefb87Characterize AvalonEdit 6.0.0 contractsbehavior before the dependency change;
consumer;
same-version stale package cannot be reused.
28e1cb1Upgrade AvalonEdit to 6.3.1.120assembly identity.
The characterization remained green after the upgrade, so no compatibility-fix
commit was required.
SearchPanel ownership
SearchPanel.Installcreates a new panel and input handler each time it iscalled.
CodeEditorpreviously called it from bothLoadedandDocumentChanged, allowing handlers and panels to accumulate.The editor now installs one privately owned panel during construction.
AvalonEdit's panel already follows
TextArea.DocumentChanged, so the same panelcontinues to search the current document without Gemini reinstalling it.
The regression tests cover:
behavior;
AvalonEdit package contract
The package-only compatibility host now consumes
Gemini.Modules.CodeEditorand compiles external implementations against thepublic AvalonEdit types exposed by
CodeEditor,ICodeEditorView, andILanguageDefinition.Resolved assets after the upgrade:
net48:lib/net462/ICSharpCode.AvalonEdit.dllnet10.0-windows:lib/net8.0-windows7.0/ICSharpCode.AvalonEdit.dllBoth hosts load assembly version
6.3.1.120.AvalonEdit is strong-named, and its assembly version changes from
6.0.0.0to6.3.1.120. Extensions that use the exposed AvalonEdit types must rebuildagainst the updated package family. This change does not add binding redirects
or promise binary compatibility for assemblies already compiled against
AvalonEdit 6.0.0.
Validation
Results:
net48; 143 passed onnet10.0-windows.search navigation/options, document switching, and editor close/reopen
cycles on both targets.
Base and rollback
tgjones/gemini@6994950fe49f4b7d344e673b2590441043730175.28e1cb1returns to the characterized AvalonEdit 6.0.0 contractwithout reverting the search ownership fix or its tests.