NavigationHistory.Record's 0.5s debounce collapsed ANY two selections inside the
window -- including two DIFFERENT nodes -- so a navigation whose decompile finished
quickly (cheap targets, or a fast machine) never pushed the previous node onto the
back stack, silently losing history. Its real purpose is only to swallow the
double-fire a single click produces (SelectedItems.CollectionChanged + SelectedItem
PropertyChanged, same node) and tree-refresh re-selects, so gate the collapse on the
rapid entry being equal to the current one; a distinct node now records normally.
The view-state/navigation tests navigate between two cheap namespace nodes (a C#
namespace decompiles to just its "// Some.Name.Space" line) instead of decompiling
CoreLib types in full -- fast enough for the headless 15s budget on slow CI runners,
and a direct regression test for the collapse bug above.
Assisted-by: Claude:claude-opus-4-8:Claude Code
To audit what each UI test actually exercises, every step now snapshots the
live window to <TestFixtureName>/<TestName>_<NN>_<ShortDescription>.png: a
booted frame (emitted automatically by TestHarness.BootAsync), one after each
state-changing action, and one before each assertion. Flip ILSPY_TESTS_VISIBLE=1
to render the filmstrip; it lands under %TEMP%/ilspy-test-captures (overridable
via ILSPY_TEST_CAPTURES).
The step number and fixture/test name are derived automatically so inserting a
breakpoint never renumbers the rest. The identity is recorded up front from the
real ITest in an ITestAction hook rather than read live: NUnit's
TestContext.CurrentContext does not flow onto async continuations, so a capture
after an await would otherwise collide under the ad-hoc context. And when
rendering is off the whole call is a true no-op -- not even a dispatcher pump --
so instrumenting a test can never perturb the navigation/tab timing it asserts
on. Full headless suite stays green.
Nearly every headless UI test opened with the same four-line prologue
(resolve the shared MainWindow, show it, cast its DataContext, wait for the
assembly list), then repeated the corelib lookup, the EnsureLazyChildren +
Children.OfType<T>().Single() drill, the registry single-by-header lookups,
and the open-an-assembly-and-wait dance. The duplication made the intent of
each test hard to see and every signature tweak a suite-wide edit.
Collapse those into TestHarness (BootAsync, OpenAssemblyAsync, GetCommand,
GetEntry) and TreeNavigation extensions (FindCoreLib, GetChild<T>, Expand<T>),
then apply them across the suite. Net ~865 lines of boilerplate removed with
no change in behaviour; the full headless suite stays green.
Capture the editor's caret, scroll offset, and expanded foldings on
demand when a navigation record is written -- the model exposes a
CaptureViewState delegate the view sets and DockWorkspace invokes --
instead of pushing every caret/scroll event onto the view-model. The
push mistook AvaloniaEdit's programmatic caret-to-end on text replace for
a user move and recorded it, poisoning the captured position. Back /
Forward restores through a single PendingViewState channel the editor
consumes once the document Text lands.
AvaloniaEdit 12.0.0's ScrollToVerticalOffset is a no-op, so the editor's
ScrollViewer.Offset is set directly (TODO: drop once AvaloniaEdit #594
ships and the package is bumped).
Assisted-by: Claude:claude-opus-4-8:Claude Code
Compare opens a structural side-by-side diff of two assemblies --
it's an analytical operation, not navigation between existing
documents. With Compare in Navigate it sat next to "Decompile to
new tab", which is genuinely navigational; users reading the menu
top-to-bottom had to mentally split the group.
Move it into Analyze (matching the resource string already used by
"Search Microsoft Docs") and place it at Order 220 so it sits
immediately above Search in the rendered menu. The two Analyze
entries now form a single coherent group of "tell me more about
this code" actions, and the Navigate group is left to actions that
actually navigate.
Assisted-by: Claude:claude-opus-4-7:Claude Code
Sweep-up commit. The dotnet-format pre-commit hook keeps re-ordering
these usings on every other commit; landing them once stops the hook
from grumbling at unrelated diffs going forward.
Assisted-by: Claude:claude-opus-4-7:Claude Code
Foldings persistence rounds out the view-state work that landed in 185e0551d
(caret + scroll). Mirrors WPF's DecompilerTextViewState.SaveFoldingsState /
RestoreFoldings semantics verbatim — including the layout-checksum gate that
refuses restoration when the new document's foldings don't match the captured
layout, so a stale snapshot can't accidentally expand random regions of a
shifted document.
Assisted-by: Claude:claude-opus-4-7:Claude Code
Closes two tracker items in one commit:
- `BrowseForwardCommand` was already wired end-to-end (command, toolbar
button, Alt+Right key binding). New test pins the wiring so a future
regression to any of the three surfaces is caught.
- `ViewState (caret + scroll persistence across navigation)` was missing.
Navigating back to a previously-visited node landed the caret at offset
0 / scroll at top instead of where the user was looking before they
moved away.