Record: a second handler window, and existing integrations that were being taken over

Outcome

Two reports were fixed. Opening the handler on a second AppImage now opens a window for that AppImage, and an existing integration is detected and offered as a choice instead of being silently replaced.

A Second Handler Window Showed the First File

The handler is a Gtk.Application, and GTK’s default is single-instance: the second launch forwarded its file to the first process, whose window still showed the first AppImage.

Fix: Gio.ApplicationFlags.NON_UNIQUE (line 607), so each launch is its own application instance with its own window and its own file. tests/95-handler-ui.sh asserts the flag is present.

Existing Integrations Were Detected but Thrown Away

explain --json already reported conflicts, but the handler’s conflicts() filtered out every entry whose upgrade flag was set, so a launcher this tool had written looked like nothing at all and Integrate went straight to install. Install then rewrote that launcher in place.

Fixes:

A Different AppImage Was Still a Silent Takeover

detect_application_conflicts treated any launcher this tool owned at the target identifier as an in-place upgrade. Two different AppImages of one application share the embedded desktop file name, so the second silently took the identifier from the first — which is exactly what the FreeCAD pair on this host did, leaving two records claiming one launcher.

Fixes, in sources/integration/appimage_integrator.cpp:

Tests

State on This Host After the Fix

explain now reads the real FreeCAD pair correctly: the weekly AppImage is told that org.freecad.FreeCAD.desktop runs FreeCAD_1.1.3-… (this tool (a different AppImage for the same identifier), version 1.1.3), so integrating it is an explicit choice. The stable 1.1.3 is still an in-place upgrade of its own file.

audit no longer mislabels this tool’s own launchers as AppImageLauncher’s, and it reports the one unrelated leftover: an AppImageLauncher-era icon in a 0x0 size directory.

Verification

Verified 2026-09-23 with make test; all fifteen test scripts passed. The updated tool and handler were installed to ~/.local/bin, and the conflict output above was read from the real ~/.local/share/applications and ~/Applications.

Commits