Date: 2026-02-06 Scope: Window management, workspace persistence/management, snapshot flow, launch flow, performance, and correctness.
WindowManagertracks top-level windows through WinEvent hooks and updatesWindowInfosnapshots.- Destroy semantics are strict: only explicit destroy events trigger
WindowDestroyedunbind behavior. - Location updates use lightweight bounds/visibility refresh paths.
- Definitions:
%LOCALAPPDATA%\\TopToolbar-Standalone\\config\\workspaces.json. - Provider config/buttons:
%LOCALAPPDATA%\\TopToolbar-Standalone\\Providers\\WorkspaceProvider.json. - Both stores now use:
- cross-process sidecar lock files,
- version-checked compare-and-retry writes,
- temp-file replace writes.
WorkspaceProvider.SnapshotAsync->WorkspacesRuntimeService->WorkspaceSnapshotter.- Snapshot filter includes visibility, cloaking, current virtual desktop, excluded classes/titles/tool windows.
- AFH fallback process-path resolution now ignores hidden/cloaked/off-desktop candidates.
WorkspaceLauncherphases:- Ensure apps alive (existing-window claim pass, then launch pass).
- Resize/arrange windows in parallel with post-settle validation.
- Minimize extraneous windows on current virtual desktop (when
MoveExistingWindows=true).
LastLaunchedTimeis updated on successful launch.
- Scored matcher implemented (
AUMID > package > PWA > path > process > titlewith weighted scoring).
Services/Workspaces/WorkspaceWindowMatcher.cs
- Existing-window claim now uses candidate ranking by:
- identity score,
- distance to saved app position,
- window area.
Services/Workspaces/WorkspaceLauncher.Ensure.cs
- Title-only ambiguity hardening:
- unresolved tied title-only candidates are no longer claimed,
- launch falls back to pass-2 instead of risky mis-assignment.
Services/Workspaces/WorkspaceLauncher.Ensure.cs
- Indexed candidate lookup for pass-1 existing-window assignment.
- Built once per launch pass and queried per app, reducing broad scans.
Services/Workspaces/WorkspaceLauncher.csServices/Workspaces/WorkspaceLauncher.Ensure.cs
- Added
FileConcurrencyGuardshared lock/version utilities.
Services/Storage/FileConcurrencyGuard.cs
- Workspace definition store now uses compare-and-retry writes for all mutations.
Services/Workspaces/WorkspaceDefinitionStore.cs
- Provider config store now merges on detected concurrent edits (instead of blind overwrite), with retry-safe writes.
Services/Providers/WorkspaceProviderConfigStore.cs
- Display snapshot now captures stronger monitor
InstanceIdfromEnumDisplayDevices(DeviceID)when available.
Services/Display/DisplayManager.cs
- Window-destroy lifecycle unbind bug fix retained.
- Minimize/maximize restore without saved rect retained.
- Snapshot virtual desktop/cloak safety retained.
- Monitor rect fallback mapping retained.
- Pass-1 candidate indexing can be extended further with precomputed PWA token maps to reduce fallback checks.
- Optional: add interactive conflict UX for config edits (currently merge-and-retry is automatic and logged).
- Optional: cache expensive identity fields even more aggressively for non-location WinEvents.
- Build:
dotnet build .\\TopToolbar.csproj -c Debug -r win-arm64 -p:Platform=arm64
- Result:
- Success, 0 warnings, 0 errors.