Skip to content

Fix web panel badge initialization before native rendering - #199

Merged
aminought merged 1 commit into
masterfrom
codex/fix-web-panel-badge-ready
Sep 6, 2026
Merged

Fix web panel badge initialization before native rendering#199
aminought merged 1 commit into
masterfrom
codex/fix-web-panel-badge-ready

Conversation

@aminought

Copy link
Copy Markdown
Owner

Web panel buttons can exist before Firefox renders their internal badge stack, particularly when a saved button has no toolbar placement or belongs to an unopened popup. Initializing the sound and notification icons at that point throws badgeStackXUL is null and leaves them unattached.

Wait for the native badge stack with a one-shot MutationObserver, and use the same readiness helper when applying container colors. Cancel pending readiness timers and observers when a widget is removed or its window closes.

Validation:

  • ESLint, Prettier on both changed files, and git diff --check pass.
  • Deterministic regression checks reproduce the previous failure and pass with the fix, including delayed rendering and cleanup before readiness.
  • Firefox 155.0.1 on Windows: normal startup passes with no FSS/fx-autoconfig console errors; 150 deployed files match the commit and loader files remain unchanged.
  • Fourteen headless runtime checks pass for detached buttons, delayed popup rendering, notification/sound state, container colors, moving/removing widgets, and the same widget UUID in two windows. Temporary diagnostic scripts and test widgets were removed afterward.

@aminought
aminought merged commit ba561db into master Sep 6, 2026
3 checks passed
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.

1 participant