AppKit puts the title bar container and window buttons back at their defaults on every
live resize step, title change and fullscreen exit. Correcting them from window notifications
ran after that layout had been drawn, so the buttons bounced between the two positions, and
stayed at the defaults when no notification followed.
Correct the frames in a main run loop observer that runs after AppKit's layout and before
the Core Animation commit. Create project windows hidden so the buttons are placed before the
first frame, and skip repeated height updates from the toolbar.
IDE zoom changed the toolbar height while the macOS window buttons stayed at a fixed vertical position. The buttons are now centred in the title bar using its measured height and the zoom, and repositioned after AppKit layout updates. Zooming out keeps enough room for them so they do not cover the project icon, and compact mode follows the same alignment.
Windows align from the saved zoom and compact setting when they are built, so the buttons do not move once the page loads. The height uses the zoom the webview applies, so an out-of-range setting cannot misplace them.