Skip to content

Discoveries Testing

Jace edited this page Nov 4, 2026 · 4 revisions

Part of Discoveries.

Dev notifications

With devTools on, com.diapatches.dev.set flips a tweak, and com.diapatches.dev.dump writes every window's view tree to views.txt beside the dylib.

Tab layout without clicking

It's saved per window in the persistedWindowData default, as "tabLayoutStyle":{"sidebar":{}} or {"tabStrip":{}}. Up to Dia 1.55 you could edit it while Dia was quit; Dia 1.56 ignores the edit.

View → Show Tabs in Sidebar switches the front window while Dia runs, and its checkmark (AXMenuItemMarkChar) says which layout that window has. Clicked while a new window's command bar is still open, it does nothing. New windows, and windows restored after a relaunch, take the layout last chosen, so switch a throwaway window back to the sidebar when you're done.

Driving Dia from a script

  • Test in a new window of your own, and check it's in front before every keystroke. A window that's open at the start is someone's real tabs.
  • System Events' ⌘T doesn't open a new tab in a second window. Clicking File → New Tab does.
  • With several windows open, read state from the key window only. The first window in NSApp.windows is often another one.
  • Tooltips and hover hints only come up for real mouse-moved events. Warping the pointer moves it without one, so post kCGEventMouseMoved events along a path instead.
  • A window closed just before Dia quits can come back at the next launch. Check the window list after a relaunch.
  • A window's position doesn't tell yours from a test window. A new window opens at the same spot as a full-size one. Count windows before and after, and remember the new window's ID.
  • The Settings window has no title. Pick a pane with System Events' set selected of row N of table 1 of scroll area 1 of splitter group 1. Its scroll bar isn't exposed, so scroll with pixel scroll-wheel events.
  • A page waiting on an image the server answers after a few seconds keeps loading that long, which is enough to see loading progress.

Catching a one-frame glitch

Screenshots in a loop are too slow. Record the window alone with ScreenCaptureKit at 120 fps, compare frames to the resting one, and always record stock Dia (tweak off) as well. Several glitches turned out to be Dia's own.

Installing a build

Copy the dylib to a new file, then mv it over the installed one. Copying over it in place makes Dia die with "Code Signature Invalid".

The number of scenarios moves

make test's pairwise scenarios are picked greedily in Settings order, so moving a tweak to another section changes how many there are. Every pair is still covered.

Clone this wiki locally