Skip to content

Take the kernel from PlatformHeads.Core - #959

Merged
SimonCropp merged 1 commit into
mainfrom
platformheads-core
Oct 14, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
platformheads-core

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

The viewer's managed plumbing was written here and copied into BuildMonitor, and the copies drifted. PlatformHeads 0.2.0 has one copy as PlatformHeads.Core, made from both, which BuildMonitor took in SimonCropp/BuildMonitor#53. This is layer 2, after the build and packaging in #954.

What changes

  • SessionHost, ScreenCache, WindowPlacement and NativeResolver go. Directory.Build.props names the generic SessionHost, ScreenCache and OpenWindow for the viewer's state, screen and window, and DiffEngineViewer.Benchmarks.csproj does again, since it imports nothing above it.
  • IViewerWindow derives from IHeadWindow. Deview.Resolve registers the library by name.
  • SessionHost.Mutate now throws when a mutation mutates again, which silently undid the outer one. Nothing here does: the whole suite passes.
  • All four pins move to 0.2.0: the workflow's uses:, GIT_TAG, PlatformHeads and the new PlatformHeads.Core. Nothing in the build package, the CMake module or the workflow changed.

One fix that comes with it

Copying handed the text to the window from inside the mutation, and the WinForms head swallowed the refusal of a clipboard another process held, so the copy was lost while the status line said it had been made. A copy now waits in SessionState.Clipboard, and the loop offers it through the kernel's ClipboardPump for a few frames, then says "Could not copy …: another program is holding the clipboard." SetClipboard answers whether it took the text; the native heads always do. ClipboardCopyTests covers it, and the copy tests read the copy from the state rather than from the window.

Checked

  • Debug suite: 3,762 tests, 61 skipped, none failed.
  • Release build with no errors, and Packaging.Tests 20/20. The one change on record is PlatformHeads.Core.dll beside each head: six in the bundled viewer, two in the tray, one in each tool package.

SessionHost, ScreenCache, the window contract, WindowPlacement and
NativeResolver were written here and copied into BuildMonitor, and the
copies drifted: each held fixes the other lacked. PlatformHeads 0.2.0
has one copy of them, made from both, which BuildMonitor took in
SimonCropp/BuildMonitor#53, and this takes it:

- SessionHost.cs, ScreenCache.cs, WindowPlacement.cs and
  NativeResolver.cs go. Directory.Build.props names SessionHost,
  ScreenCache and OpenWindow for the viewer's state, screen and window,
  and DiffEngineViewer.Benchmarks.csproj again, since it imports nothing
  above it.
- IViewerWindow derives from IHeadWindow. Deview.Resolve registers the
  library by name.
- SessionHost now throws when a mutation mutates again, which silently
  undid the outer one. Nothing here does: the whole suite passes.

And one fix that comes with it. Copying handed the text to the window
from inside the mutation, and the WinForms head swallowed the refusal
of a clipboard another process held, so the copy was lost while the
status line said it had been made. A copy now waits in
SessionState.Clipboard, and the loop offers it through the kernel's
ClipboardPump for a few frames, then says it could not copy.
SetClipboard answers whether it took the text; the native heads always
do.

The packages carry PlatformHeads.Core.dll beside each head, which is the
one change to the entries Packaging.Tests has on record. All four pins
move to 0.2.0 together; nothing in the build package, the CMake module
or the workflow changed.
@SimonCropp
SimonCropp merged commit d8a1c12 into main Oct 14, 2026
20 checks passed
@SimonCropp
SimonCropp deleted the platformheads-core branch October 14, 2026 11:07
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