Skip to content

Move to PlatformHeads 0.12.0 and drop the copies it now holds - #1025

Merged
SimonCropp merged 2 commits into
mainfrom
platformheads-0.12
Nov 4, 2026
Merged

SimonCropp merged 2 commits into
mainfrom
platformheads-0.12

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

PlatformHeads 0.12.0 (PlatformHeads#13) now has the macOS tray's flat menu, the update report and the menu renderer that DiffEngine kept copies of. This moves the seven pins to 0.12.0 and deletes the copies.

Pins. All seven move to 0.12.0 together, and claude.md says so.

macOS tray menu. The ABI is unchanged: detray.h's structs and DETRAY_VERSION stay as they are, and the header now notes that its flags are PlatformHeads' values.

  • MacTray.Send hands the menu over as TrayMenuItem.Flatten writes it, with (int) item.Flags as the DETRAY_* bits, which have the same values. MacTray.Flatten, MacTray.Flags and Detray's flag constants are deleted.
  • MenuItems.read (Swift) now reads the array through StatusMenuItem.tree. detray_describe writes with StatusMenuItem.describe.
  • MacTrayTests.EachItemFollowsTheItemWhoseSubmenuItIsIn is deleted, since it now tested PlatformHeads' own Flatten. TheLibraryRebuildsTheMenuItWasHanded stays: it hands the menu across the real library and reads it back, on the macOS job.
  • The Swift source changed, so build-native should propose rebuilt diffengine_tray binaries into this branch.

Update.

  • TrayUpdate.CloseOwningViewer now asks ToolUpdate.WindowsScriptStops whether the update would stop the viewer. That makes TrayUpdate.Stops redundant, so it's deleted. The test that checks DiffEngine's own layout, with the viewer inside the tray's store, now asks WindowsScriptStops.
  • TrayUpdate.Report goes through ToolUpdateOutcome.Report with the same words and the same log lines. Its tests are unchanged.

Viewer context menu. ViewerMenu uses PaletteMenuRenderer(MenuTheme.Colours), and MenuTheme now holds only the palette. The old table set the same members PlatformHeads' does, to the same colours, so the ContextMenuTests snapshots haven't changed.

Tests. Locally on Windows, the Release build had no errors. Of 3,845 tests in the whole solution, 3,793 passed, 49 were skipped and 3 failed. The three are the ListenerTable tests that always fail on this machine's Windows build (10.0.26300), and they don't touch anything this PR changes. The Swift and the macOS round trip run only on CI.

SimonCropp and others added 2 commits November 4, 2026 18:02
The seven pins move together to 0.12.0, which shares the macOS tray's
flat menu, the update report and the menu renderer.

The macOS tray hands its menu over as TrayMenuItem.Flatten writes it,
with TrayMenuItem.Flags as the DETRAY_* bits, which have the same
values, and the library reads it back with StatusMenuItem.tree and
writes it with StatusMenuItem.describe. The ABI does not change.

TrayUpdate asks ToolUpdate.WindowsScriptStops which viewer the update
would stop, and reports through ToolUpdateOutcome.Report, in the words
it used. The viewer's context menu is drawn by PaletteMenuRenderer in
the colours it had.
Co-authored-by: SimonCropp <122666+SimonCropp@users.noreply.github.com>
@SimonCropp
SimonCropp merged commit 924cec0 into main Nov 4, 2026
18 checks passed
@SimonCropp
SimonCropp deleted the platformheads-0.12 branch November 4, 2026 10:10
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