Context
The GNOME focus extension's ListWindows() guards the enumeration call with a ternary:
const actors = typeof global.get_window_actors === "function"
? global.get_window_actors()
: (typeof global.display.get_window_actors === "function"
? global.display.get_window_actors()
: []);
The final : [] fallback is exactly what hid the stage-2 (#126) bug fixed in e166242: the code called the method on the wrong receiver (global.display instead of global), the guard swallowed the missing method, and ListWindows silently returned [] on every real GNOME 50 session. The running-windows list showed "no running programs" and looked like an honest empty state rather than a broken API call.
Ask
Decide whether a missing enumeration API should fail loudly instead of degrading to an empty list. Options:
- Keep the empty-list fallback but
log() a one-time warning when neither global.get_window_actors nor global.display.get_window_actors is a function, so the journal shows the API drift.
- Or drop the silent fallback entirely and let the method throw (the daemon's
watch_windows already logs gdbus failures at debug and sleeps through them — a thrown error there is visible, an empty list is not).
The distinction matters: "no windows open" and "the enumeration API moved" are different states that today look identical to the user.
Discovered while verifying #127.
Context
The GNOME focus extension's
ListWindows()guards the enumeration call with a ternary:The final
: []fallback is exactly what hid the stage-2 (#126) bug fixed in e166242: the code called the method on the wrong receiver (global.displayinstead ofglobal), the guard swallowed the missing method, andListWindowssilently returned[]on every real GNOME 50 session. The running-windows list showed "no running programs" and looked like an honest empty state rather than a broken API call.Ask
Decide whether a missing enumeration API should fail loudly instead of degrading to an empty list. Options:
log()a one-time warning when neitherglobal.get_window_actorsnorglobal.display.get_window_actorsis a function, so the journal shows the API drift.watch_windowsalready logs gdbus failures at debug and sleeps through them — a thrown error there is visible, an empty list is not).The distinction matters: "no windows open" and "the enumeration API moved" are different states that today look identical to the user.
Discovered while verifying #127.