Skip to content

fix(wpf): make navigation lifecycle-safe - #8

Draft
nicolasestrem wants to merge 1 commit into
feat/wpf-timeline-shellfrom
codex/wpf-lifecycle-navigation
Draft

fix(wpf): make navigation lifecycle-safe#8
nicolasestrem wants to merge 1 commit into
feat/wpf-timeline-shellfrom
codex/wpf-lifecycle-navigation

Conversation

@nicolasestrem

Copy link
Copy Markdown
Owner

What changed

  • Adds explicit Timeline and Advanced history destinations to the WPF command bar.
  • Cancels and clears an active comparison before user-driven navigation, including same-snapshot reopen flows.
  • Disables workspace navigation while backup or restore work is active.
  • Prevents the last WPF window from closing during an active run and explains how to exit safely.
  • Reads the Advanced history catalog away from the UI thread and marshals collection updates back to its dispatcher.
  • Extends async commands with external availability checks and adds focused lifecycle regression tests.

Why

The WPF shell could trap users in Compare, hide an active progress workspace behind Settings or About, and terminate a running operation when the sole window closed. Advanced history also existed without a route and performed its catalog read on the UI thread.

Impact

Navigation now preserves operation visibility and comparison ownership. The active-run close guard prevents accidental termination while keeping normal close behavior unchanged. Advanced history is reachable without blocking rendering on catalog I/O.

This is a stacked draft based on feat/wpf-timeline-shell and should be reviewed after PR #7. It does not merge or modify PR #7.

Validation

  • dotnet build src\WinRestoreKit.Tests\WinRestoreKit.Tests.csproj -c CodexVerify: 0 warnings, 0 errors
  • dotnet test src\WinRestoreKit.Tests\WinRestoreKit.Tests.csproj -c CodexVerify --no-build: 990 passed, 0 failed
  • Focused WPF lifecycle suite: 16 passed, 0 failed
  • dotnet format ... --verify-no-changes --include <changed C# files>: 0 files require formatting
  • Added em dash scan: 0 matches

The isolated CodexVerify configuration was used because the user's active Debug session intentionally remained running and retained its executable lock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant