Repository navigation
Fix startup binding errors and background load sweep failure - #4206
Merged
siegfriedpammer merged 4 commits intoOct 5, 2026
Merged
Conversation
Dock's theme binds DockCapabilityOverrides.CanDrag/CanDrop on the tool and document docks themselves, not only on the panes inside them, and logged a binding error per property at startup. Filling them in from InitLayout covers layouts restored from disk, which never pass through CreateLayout. Assisted-by: Claude:claude-fable-5-1:Claude Code
With a DataContext binding of its own the panel first inherited the main window's view model, and each of its compiled bindings failed the cast to UpdatePanelViewModel and logged an error at startup. The new test boots the window with a capturing log sink and fails on any binding error. Assisted-by: Claude:claude-fable-5-1:Claude Code
The ancestor binding logged 'Ancestor not found' whenever a row's content was evaluated outside a SharpTreeView. An inherited property needs no lookup, and leaves the lines on where there is no tree view at all. Assisted-by: Claude:claude-fable-5-1:Claude Code
One assembly that failed to load faulted the whole sweep, which skipped the command requery at its end. 'Remove assemblies with load errors' was therefore not re-evaluated in the one case it exists for. ShowAssemblyList(AssemblyList) is internal so the test can show a list whose load it controls. Assisted-by: Claude:claude-fable-5-1:Claude Code
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.
The console of a "Start Debugging" session in VS Code showed 12
[Binding]errors in three groups and one swallowed exception. Each has its own commit; this is what was in the output and how it was fixed.1. Update banner (6 errors)
The same error was logged for
UpdateAvailable,Message,ButtonText,DownloadOrCheckUpdateCommandandCloseCommand.MainWindow.axamlgave the panel aDataContext="{Binding UpdatePanel}"of its own. Until that binding produced a value the panel inherited the window'sMainWindowViewModel, and its compiled bindings (x:DataType="vm:UpdatePanelViewModel") failed the cast.ContentControlwith aDataTemplate, so it never sees the window's view model.2. Dock chrome (4 errors)
Logged for
CanDragandCanDrop, on bothToolChromeControlandDocumentControl.DockCapabilityOverrides.CanDrag/CanDropon the tool and document docks themselves.ILSpyDockFactoryonly set that property on panes and tabs, and a layout restored from disk bypassesCreateLayoutaltogether.InitLayoutfills inDockCapabilityOverridesfor every dockable, which covers fresh and restored layouts. The tool dock created on demand afterInitLayoutgets it in its initializer.3. Tree connector lines (2 errors)
TreeLines.IsVisibletoShowLineson aSharpTreeViewancestor, and the binding was evaluated while the row content was not under one. The exact moment was not reproduced in the headless tests.ShowLinesis now an inherited property thatTreeLinesreads directly, so there is no ancestor lookup left to fail. TheDataGridHierarchicalPresenteruse ofTreeLineshas noSharpTreeViewabove it and keeps the default (lines shown).4. Background load sweep
CommandManager.InvalidateRequerySuggested()at its end. "Remove assemblies with load errors" was therefore not re-evaluated in the one case it exists for.LoadedAssemblyasHasLoadError), so the sweep always reaches the requery.Tests
StartupBindingErrorTestsboots the main window with a capturing Avalonia log sink and fails on any binding error. It was red for group 1 and, separately, for group 2 before the fixes.BackgroundLoadSweepTestsshows a list whose only assembly fails to load at a moment the test controls, and waits for the requery. It timed out before the fix.AssemblyTreeModel.ShowAssemblyList(AssemblyList)went from private to internal for it.SharpTreeViewTestsgained a case that rows follow the tree view'sShowLines. It does not reproduce the original "Ancestor not found" error.ILSpy.Testsrun: 1315 succeeded, 3 skipped, 0 failed.Not verified: a fresh "Start Debugging" session in VS Code to confirm the console is clean.
Assisted-by: Claude:claude-fable-5-1:Claude Code