Skip to content

fix: move Electron help menu links to default app only - #50629

Merged
dsanders11 merged 5 commits into
electron:mainfrom
ZeenatLawal:fix/remove-default-help-menu-items
Apr 9, 2026
Merged

dsanders11 merged 5 commits into
electron:mainfrom
ZeenatLawal:fix/remove-default-help-menu-items

Conversation

@ZeenatLawal

@ZeenatLawal ZeenatLawal commented Apr 1, 2026 •

Copy link
Copy Markdown
Contributor

Description of Change

Moves the Electron-specific help menu items (Learn More, Documentation, Community Discussions, Search Issues) from the default application menu to the default_app only. Previously, these items were hidden behind app.isPackaged, but some third-party apps ship with app.isPackaged returning false, causing Electron's own links to appear in their menus.

The help menu items are now only shown when Electron is started without a consumer app (i.e. the default app), and are no longer part of the global default menu.

Also updates the API documentation to remove the reference to the Help menu from the default menu description.

Fixes #50602

Checklist

Release Notes

Notes: Moved Electron-specific help menu links to the default app only; unpackaged apps will no longer see these items in their default menu.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Apr 1, 2026
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR contains unsigned commits. This repository enforces commit signatures
for all incoming PRs. To get your PR merged, please sign those commits
(git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch
(git push --force-with-lease)

For more information on signing commits, see GitHub's documentation on Telling Git about your signing key.

@github-actions github-actions Bot added the needs-signed-commits Currently some or all of the commits in this PR are not signed label Apr 1, 2026
@ZeenatLawal
ZeenatLawal force-pushed the fix/remove-default-help-menu-items branch 3 times, most recently from 4f221bd to 3ce899f Compare April 1, 2026 20:04
Comment thread lib/browser/default-menu.ts Resolved
@ZeenatLawal
ZeenatLawal requested a review from nmggithub April 2, 2026 20:48
@ZeenatLawal
ZeenatLawal force-pushed the fix/remove-default-help-menu-items branch from 5071480 to ece608a Compare April 2, 2026 21:01
@mlaurencin

Copy link
Copy Markdown
Member

Rather than outright deleting this, I think a better path forward might be to explore alternative locations for this code. It is at least worth a discussion. The default_app directory might make for a good new home?

@mlaurencin mlaurencin removed the needs-signed-commits Currently some or all of the commits in this PR are not signed label Apr 2, 2026
@nmggithub

Copy link
Copy Markdown
Contributor

Rather than outright deleting this, I think a better path forward might be to explore alternative locations for this code. It is at least worth a discussion. The default_app directory might make for a good new home?

The original motivation for this, I believe was to hide Electron-specific menu items, as they seem to be popping up in some distributed apps and we got issues filed here for those specific apps. Would this resolve that?

@nikwen

nikwen commented Apr 2, 2026

Copy link
Copy Markdown
Member

We could move it to the default app. But honestly, I'm not sure if it's worth the effort. I don't think many people run the default app, and I think it's even less likely that they'll dig into the menu items there. I'd probably just remove the code.

@ZeenatLawal

Copy link
Copy Markdown
Contributor Author

Happy to update the PR with whatever direction is decided, whether that's removing it entirely or moving it to default_app.

549830718 added a commit to 549830718/electron that referenced this pull request Apr 7, 2026
The default help menu included links to electronjs.org documentation,
community discussions, and search functionality. These links are
Electron-specific development resources that may not be relevant
to end-user applications built with Electron.

Remove the helpMenu from the default application menu template
and remove unused imports (shell, app) that were only needed
for the help menu functionality.

Fixes electron#50629
549830718 added a commit to 549830718/electron that referenced this pull request Apr 7, 2026
The default help menu included links to electronjs.org documentation,
community discussions, and search functionality. These links are
Electron-specific development resources that may not be relevant
to end-user applications built with Electron.

Remove the helpMenu from the default application menu template
and remove unused imports (shell, app) that were only needed
for the help menu functionality.

Fixes electron#50629
@mlaurencin

Copy link
Copy Markdown
Member

The original motivation for this, I believe was to hide Electron-specific menu items, as they seem to be popping up in some distributed apps and we got issues filed here for those specific apps. Would this resolve that?

That should resolve it as the default app is only run when Electron is started without a consumer app (mentioned here)

But honestly, I'm not sure if it's worth the effort

I might be missing something, but my understanding is that a few changes would just have to be made to default_app.ts and main.ts to include the help information. It would be a nice feature for the default app in my opinion.

@ZeenatLawal would you be able to implement this?

@ZeenatLawal

Copy link
Copy Markdown
Contributor Author

@mlaurencin Thanks for the context! I'll look into both files for the changes needed and update the PR.

@ZeenatLawal
ZeenatLawal force-pushed the fix/remove-default-help-menu-items branch from 10ce329 to fa5fc03 Compare April 8, 2026 09:11
@ZeenatLawal

Copy link
Copy Markdown
Contributor Author

@mlaurencin I've moved the help menu items to default_app.ts.

@mlaurencin mlaurencin added semver/patch backwards-compatible bug fixes target/40-x-y PR should also be added to the "40-x-y" branch. target/41-x-y PR should also be added to the "41-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 8, 2026
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Apr 8, 2026

@dsanders11 dsanders11 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this locally and confirmed that the "Help" menu is there for the default app, but not when used otherwise (tested via Fiddle). Thanks again @ZeenatLawal!

@dsanders11
dsanders11 merged commit 62e6372 into electron:main Apr 9, 2026
66 checks passed
@welcome

welcome Bot commented Apr 9, 2026

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk

release-clerk Bot commented Apr 9, 2026

Copy link
Copy Markdown

Release Notes Persisted

Moved Electron-specific help menu links to the default app only; unpackaged apps will no longer see these items in their default menu.

trop Bot added a commit that referenced this pull request Apr 9, 2026
* fix: remove Electron links from default help menu

* fix: remove help menu entirely from default menu

* fix: move Electron help menu links to default app

* docs: update default menu items list in menu.md

Co-authored-by: Zeenat Lawal <[email protected]>
trop Bot added a commit that referenced this pull request Apr 9, 2026
* fix: remove Electron links from default help menu

* fix: remove help menu entirely from default menu

* fix: move Electron help menu links to default app

* docs: update default menu items list in menu.md

Co-authored-by: Zeenat Lawal <[email protected]>
trop Bot added a commit that referenced this pull request Apr 9, 2026
* fix: remove Electron links from default help menu

* fix: remove help menu entirely from default menu

* fix: move Electron help menu links to default app

* docs: update default menu items list in menu.md

Co-authored-by: Zeenat Lawal <[email protected]>
@trop

trop Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "41-x-y", please check out #50859

@trop trop Bot added the in-flight/41-x-y label Apr 9, 2026
@trop

trop Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "40-x-y", please check out #50860

@trop trop Bot removed the target/41-x-y PR should also be added to the "41-x-y" branch. label Apr 9, 2026
@trop

trop Bot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "42-x-y", please check out #50861

@trop trop Bot added in-flight/40-x-y in-flight/42-x-y and removed target/40-x-y PR should also be added to the "40-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 9, 2026
dsanders11 pushed a commit that referenced this pull request Apr 9, 2026
fix: move Electron help menu links to default app only (#50629)

* fix: remove Electron links from default help menu

* fix: remove help menu entirely from default menu

* fix: move Electron help menu links to default app

* docs: update default menu items list in menu.md

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zeenat Lawal <[email protected]>
@trop trop Bot added merged/41-x-y PR was merged to the "41-x-y" branch. and removed in-flight/41-x-y labels Apr 9, 2026
dsanders11 pushed a commit that referenced this pull request Apr 9, 2026
fix: move Electron help menu links to default app only (#50629)

* fix: remove Electron links from default help menu

* fix: remove help menu entirely from default menu

* fix: move Electron help menu links to default app

* docs: update default menu items list in menu.md

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zeenat Lawal <[email protected]>
@trop trop Bot added merged/42-x-y PR was merged to the "42-x-y" branch. and removed in-flight/42-x-y labels Apr 9, 2026
dsanders11 pushed a commit that referenced this pull request Apr 9, 2026
fix: move Electron help menu links to default app only (#50629)

* fix: remove Electron links from default help menu

* fix: remove help menu entirely from default menu

* fix: move Electron help menu links to default app

* docs: update default menu items list in menu.md

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Zeenat Lawal <[email protected]>
@trop trop Bot added merged/40-x-y PR was merged to the "40-x-y" branch. and removed in-flight/40-x-y labels Apr 9, 2026
MarshallOfSound pushed a commit that referenced this pull request Sep 24, 2026
Regression test for #50629, which moved the Electron project links out of
the menu every app gets by default and into the default app. The
default-menu fixture gains a --print-items mode that prints the roles and
labels of the top-level items, and the spec asserts the window menu is
there but no Help menu is.

Verified against Linux release builds: fails on 43.0.0-nightly.20260408,
passes on 43.0.0-nightly.20260413.
MarshallOfSound added a commit that referenced this pull request Sep 24, 2026
* test: cover app.disableHardwareAcceleration() adding --disable-gpu

Regression test for #51817, where disableHardwareAcceleration() stopped
appending the --disable-gpu switch. A small fixture app calls it before
ready and reports whether app.commandLine has the switch once ready.

Verified against Linux release builds: fails on 45.0.0-nightly.20260716,
passes on 45.0.0-nightly.20260720.

* test: check the default menu has no Help menu

Regression test for #50629, which moved the Electron project links out of
the menu every app gets by default and into the default app. The
default-menu fixture gains a --print-items mode that prints the roles and
labels of the top-level items, and the spec asserts the window menu is
there but no Help menu is.

Verified against Linux release builds: fails on 43.0.0-nightly.20260408,
passes on 43.0.0-nightly.20260413.

* test: check an unopened Menu can be garbage collected

Regression test for #50806, where a Menu that was built but never opened
was kept alive forever. The spec drops the last reference, holds a WeakRef
and requests async GCs until it clears.

Verified against Linux release builds: fails on 43.0.0-nightly.20260408,
passes on 43.0.0-nightly.20260413.

* test: check openDevTools() ignores an unknown dock mode

Regression test for #50646, where the dock mode string was spliced into a
script evaluated in the DevTools frontend. The spec passes a mode that
would break out of the string literal and set a global, waits for the
frontend host to round-trip, and asserts the global was never set. Uses
its own session partition so the dock state it leaves behind does not leak
into other DevTools tests.

Verified against Linux release builds: fails on 43.0.0-nightly.20260402,
passes on 43.0.0-nightly.20260406.

* test: check DevTools reopens in its last dock state

Regression test for #50807, where calling openDevTools() without a mode
always docked to the right instead of restoring the previous dock state.
The spec opens DevTools undocked, closes it, reopens with no options and
reads currentDockState back from the frontend preferences.

Verified against Linux release builds: fails on 43.0.0-nightly.20260408,
passes on 43.0.0-nightly.20260413.

* test: check a running app keeps serving its original asar after replacement

Regression test for #52283. File contents used to be re-read from whatever
file was at the archive's path using offsets from the header read at
startup, so replacing app.asar under a running app (as updaters do) served
the wrong bytes or failed. A fixture app loads a file from a temporary
asar in a BrowserWindow, renames a different archive over it, loads the
same file again and reports both results; the spec expects them to match
the original archive. Skipped on Windows, which does not allow renaming
over an archive that is held open.

Verified against Linux release builds: fails on 45.0.0-nightly.20260706,
passes on 45.0.0-nightly.20260716.

* test: check zygote children get their own process title on Linux

Regression test for #50509, where processes forked from the zygote kept
the zygote's command line as their process title, so ps and friends
showed every child as --type=zygote. The spec reads /proc/<pid>/cmdline
for the GPU, renderer and utility processes reported by getAppMetrics()
and expects each to carry its own --type switch, tolerating processes
that exit in the meantime.

Verified against Linux release builds: fails on 43.0.0-nightly.20260323,
passes on 43.0.0-nightly.20260402.

* test: check losing the X server exits the app instead of crashing

Regression test for #52603, where losing the display server connection
went straight to LOG(FATAL). The spec starts a private Xvfb (skipping if
none is available), launches a fixture app on it that logs when its window
is ready, kills the X server and expects the app to exit with a normal
exit code rather than die on a signal. Either Ozone (the app.exit(0) path
the fix added) or GTK (_exit(1)) can be the first to notice the dead
connection, so both codes are accepted. The X server is started inside the
test so mocha's in-job retries get a fresh one.

Verified against Linux release builds: the app dies with SIGTRAP on
45.0.0-nightly.20260805 and exits cleanly on 45.0.0-nightly.20260808.

* test: check a fully transparent titleBarOverlay color on Linux

Regression test for #51017, where a fully transparent overlay colour was
treated as unset and replaced with the default opaque one. Adds
captureDisplayPixels()/expectDisplayPixelsEventually() screen helpers that
read the primary display back through desktopCapturer and retry a set of
assertions until the compositor catches up, then uses them to show a red
page under a transparent overlay and assert that nearly all of the overlay
strip shows the page (only the caption glyphs differ).

The page carries a marker square so the check cannot pass on an unpainted
or stale surface, and colours are compared against each other rather than
constants because CI's 16-bit Xvfb screen quantises them. X11 only:
Wayland has no portal-free capture and other platforms draw native
caption buttons. Tagged serial since it reads the real screen.

Verified against Linux release builds: fails on 44.0.0-nightly.20260529,
passes on 44.0.0-nightly.20260701.

* test: check titleBarOverlay draws its background and buttons on Linux

Regression test for #52577, where the caption button container was not
shown at all on Linux. Using the same capture helpers, the spec shows a
red page with a blue overlay and white symbols and asserts that the
overlay strip is mostly not the page colour and that a second colour (the
button glyphs) is present within it.

Verified against Linux release builds: fails on 45.0.0-nightly.20260731,
passes on 45.0.0-nightly.20260803.

* test: check transparent frameless windows draw no border on Linux

Regression test for #50541, where the frame painted an opaque border
around transparent frameless windows on Linux. The spec puts a blue
backdrop window across the work area, shows a transparent frameless
window with two marker squares over it, captures the screen and asserts
that the only colours in and just around the window bounds are the
backdrop, the see-through area and the two markers, i.e. no frame, border
or shadow pixels. X11 only, tagged serial with the rest of the
"transparent" suite.

Verified against Linux release builds: fails on 43.0.0-nightly.20260323,
passes on 43.0.0-nightly.20260402.

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/40-x-y PR was merged to the "40-x-y" branch. merged/41-x-y PR was merged to the "41-x-y" branch. merged/42-x-y PR was merged to the "42-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Electron GitHub issues link from application menu

5 participants