Skip to content

feat: add GNOME 47–50 to supported shell versions - #9

Open
tito10047 wants to merge 10 commits into
joaocandre:mainfrom
tito10047:main
Open

feat: add GNOME 47–50 to supported shell versions#9
tito10047 wants to merge 10 commits into
joaocandre:mainfrom
tito10047:main

Conversation

@tito10047

@tito10047 tito10047 commented Jun 11, 2026

Copy link
Copy Markdown

Hi,
Your extension looks pretty good. but its not working on fedora. Im try fix that with claude, and its work. now is working on newest fedota. try if Im not broken something on your machine.

Im detailed cooperated coaude. and now i will do detailed codereview. so now its only draft

Fix #2 #5

image

tito10047 and others added 9 commits June 11, 2026 14:07
Extension only declared compatibility with GNOME 46. Fedora 44 ships
GNOME Shell 50.2, which refuses to load extensions not listed in
shell-version. API audit confirmed no breaking changes between 46 and 50
for the APIs used (bgManagers, backgroundActor._backgroundMenu, panel
boxes, PanelMenu.Button).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The function signature declared (handler_id, instance) but all call
sites passed (GObject, numeric_id). The body called instance.disconnect()
where instance was the numeric ID — always threw a TypeError caught
silently. Result: signals were never actually disconnected, causing
signal handler accumulation on each enable/disable cycle.

Fixed by aligning the parameter names with actual usage: (instance, handler_id).
Call sites are already correct and need no changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two bugs in safe_disconnect:

1. Wrong operand order in body: original called instance.disconnect(handler_id)
   which resolved to numeric_id.disconnect(GObject) — always a TypeError,
   silently caught, so signals were never disconnected. Signal handlers
   accumulated on every enable/disable cycle.
   Fixed to handler_id.disconnect(instance) = GObject.disconnect(numeric_id).

2. Wrong guard condition: if (handler_id) checked the GObject, which is
   always truthy. The meaningful check is if (instance) — numeric handler
   ID is 0 when the signal was never connected and disconnect must be skipped.

Parameter names are kept as-is (misleading but harmless) to avoid a
noisy rename across all call sites. A comment in the body explains the
inversion for future readers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gnal teardown

Two bugs fixed in BackgroundMenuOverride:

1. screenShield null crash: Main.screenShield is initialized to null in
   GNOME main.js and stays null in sessions without a lock screen (common
   on Fedora/GNOME 50 Wayland). enable() called .connect() on it
   unconditionally, crashing on extension load. Guarded all three
   screenShield.connect() calls with if (Main.screenShield).
   revert() mirrors the same guard for safe_disconnect.

2. Update cycle broken after revert: revert() disconnected ALL signal
   listeners including the settings-change listener. When called from
   _update() (not disable()), subsequent settings changes could no
   longer trigger _update(), making the menu permanently stuck.
   This bug was previously hidden because safe_disconnect never worked
   (see previous commit). Extracted _removeMenuItems() which only removes
   the injected items without touching listeners. _update() now calls
   _removeMenuItems(), while revert() (called only from disable()) calls
   _removeMenuItems() then disconnects all signals.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AppInfo['version'] called get_version() -> execute() -> GLib.spawn_command_line_sync()
at import time, blocking the entire GNOME Shell main loop. If the Flatpak runtime
was slow or hit a D-Bus timeout the shell would freeze permanently with no recovery.

The 'version' field was only used in prefs.js (About page). Moved: get_version() is
now an exported function called directly from prefs.js, which runs in a separate
process where a blocking subprocess call is acceptable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
communicate_utf8_finish() already ensures the process has finished before
the callback fires — proc.wait(null) after it was redundant and blocked
the GLib main loop on every subprocess call (launch, new note, kill).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_bgManagers[0] was accessed without a bounds check. During shell startup
or between monitor changes the array can be empty, causing a TypeError
inside handlers connected to monitors-changed and startup-complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tito10047
tito10047 marked this pull request as ready for review June 12, 2026 07:05
…ndings

Three bugs caused GNOME Shell to crash on indicator interaction:
1. _onScroll called null bindings directly (e.g. scroll action set to None),
   crashing the shell with a TypeError in a Clutter event handler.
2. All _sticky_notes and _settings signal connections were never disconnected;
   after destroy() disposed the St.Label/St.Icon actors, any subsequent
   notify::n-windows or settings change fired _updateLabel/_updateIcon on
   already-disposed objects, producing a flood of C-level assertion failures.
3. openPreferences() promise had no .catch() handler, causing unhandled
   promise rejections in the GNOME Shell log.

Fix: track all external signal IDs in _stickySignalIds/_settingsSignalIds,
disconnect them in a new destroy() override before super.destroy(), use
optional-chaining (?.) for scroll bindings, and add .catch() to openPreferences.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tito10047

Copy link
Copy Markdown
Author

Hi @joaocandre . is this project live and have you time to look at this merge request. Im not gnome developer so I dont understand API. som you must validate it. but Im try it on my newest fedora and everything seems to work. Im get one time totaly crash system and one logout. but that is fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error in Gnome 46

1 participant