Skip to content

Fix launch canKill inversion and tray bugs#711

Merged
SimonCropp merged 1 commit into
mainfrom
Fix-launch-canKill-inversion-and-tray-bugs
Jul 10, 2026
Merged

Fix launch canKill inversion and tray bugs#711
SimonCropp merged 1 commit into
mainfrom
Fix-launch-canKill-inversion-and-tray-bugs

Conversation

@SimonCropp

Copy link
Copy Markdown
Member
  • DiffRunner: the sync launch path passed tool.IsMdi instead of !tool.IsMdi as canKill on the already-running and max-instance paths, diverging from the async path. For MDI tools (VS Code, Cursor, Visual Studio, Araxis) this could make the tray kill the shared editor when a diff is accepted/discarded; for non-MDI tools it left diff windows orphaned. Compute canKill once so the paths can't drift.
  • Program.ReBindKeys: the "Accept Open" hotkey was registered under KeyBindingIds.AcceptAll, so configuring both it and "Accept All" silently disabled "Accept All". Route bindings through a single BuildKeyBindings mapping with the correct id.
  • SolutionDirectoryFinder: the cached-prefix match had no directory-separator boundary, so a file under "AppTests" resolved to a cached "App" solution. Add a boundary check, make it case-insensitive, and prefer the nearest enclosing directory.
  • PiperClient: the async sends accepted a cancellation token but never used it. Thread it through connect/write and let cancellation surface to the caller instead of being logged as a send failure.
  • ProcessEx.KillAndDispose: the error handlers read Id/MainModule after the kill, which can throw and escape the method. Capture the process description up front.
  • FileEx.SafeDeleteDirectory threw on a temp directory that contained only empty sub-directories (non-recursive delete). Delete recursively and rename the misleading IsEmptyDirectory (which only checked for files) to ContainsFiles.

Add regression tests for each.

- DiffRunner: the sync launch path passed `tool.IsMdi` instead of
  `!tool.IsMdi` as `canKill` on the already-running and max-instance
  paths, diverging from the async path. For MDI tools (VS Code, Cursor,
  Visual Studio, Araxis) this could make the tray kill the shared editor
  when a diff is accepted/discarded; for non-MDI tools it left diff
  windows orphaned. Compute `canKill` once so the paths can't drift.
- Program.ReBindKeys: the "Accept Open" hotkey was registered under
  KeyBindingIds.AcceptAll, so configuring both it and "Accept All"
  silently disabled "Accept All". Route bindings through a single
  BuildKeyBindings mapping with the correct id.
- SolutionDirectoryFinder: the cached-prefix match had no
  directory-separator boundary, so a file under "AppTests" resolved to a
  cached "App" solution. Add a boundary check, make it case-insensitive,
  and prefer the nearest enclosing directory.
- PiperClient: the async sends accepted a cancellation token but never
  used it. Thread it through connect/write and let cancellation surface
  to the caller instead of being logged as a send failure.
- ProcessEx.KillAndDispose: the error handlers read Id/MainModule after
  the kill, which can throw and escape the method. Capture the process
  description up front.
- FileEx.SafeDeleteDirectory threw on a temp directory that contained
  only empty sub-directories (non-recursive delete). Delete recursively
  and rename the misleading `IsEmptyDirectory` (which only checked for
  files) to `ContainsFiles`.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant