Skip to content

feat(menu): add reload and force reload to View menu#1256

Merged
arnestrickmann merged 1 commit intomainfrom
emdash/bring-back-cmd-r-3hg
Mar 3, 2026
Merged

feat(menu): add reload and force reload to View menu#1256
arnestrickmann merged 1 commit intomainfrom
emdash/bring-back-cmd-r-3hg

Conversation

@arnestrickmann
Copy link
Contributor

Summary

Adds Reload and Force Reload menu items to the View menu, restoring standard Electron menu entries that allow users to refresh the renderer process.

Changes

  • Added reload and forceReload role entries to the View submenu in src/main/app/menu.ts

Test plan

  • Launch the app and verify the View menu shows "Reload" and "Force Reload" entries above "Toggle Developer Tools"
  • Confirm the keyboard shortcuts (Cmd+R / Cmd+Shift+R on macOS, Ctrl+R / Ctrl+Shift+R on other platforms) work as expected

@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Building Building Preview, Comment Mar 3, 2026 4:45pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 3, 2026

Greptile Summary

This PR restores two standard Electron menu roles — reload and forceReload — to the View submenu in src/main/app/menu.ts. The additions follow the canonical Electron View menu layout (Reload → Force Reload → Toggle Dev Tools → separator → zoom controls → separator → fullscreen), so no structural changes are required.

  • Added { role: 'reload' as const } and { role: 'forceReload' as const } above toggleDevTools in the View submenu.
  • The keyboard shortcuts (Cmd/Ctrl+R and Cmd/Ctrl+Shift+R) and labels are provided automatically by Electron's role system, consistent with how all other roles in this menu are configured.
  • No separator is added between the reload entries and toggleDevTools, which is intentional and matches Electron's own default View menu template.

Confidence Score: 5/5

  • This PR is safe to merge — it adds two standard Electron menu roles with no custom logic or edge cases.
  • The two-line change mirrors Electron's own default View menu template exactly. Both reload and forceReload are well-defined built-in roles with no custom logic. The placement, ordering, and absence of a separator before toggleDevTools all match the canonical Electron pattern. No regressions are introduced.
  • No files require special attention.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User clicks View menu] --> B{Menu Item Selected}
    B --> C[Reload\nCmd/Ctrl+R]
    B --> D[Force Reload\nCmd/Ctrl+Shift+R]
    B --> E[Toggle DevTools\nCmd/Ctrl+Shift+I]
    B --> F[Zoom Controls]
    B --> G[Toggle Fullscreen]
    C --> H[webContents.reload\nreloads renderer with cache]
    D --> I[webContents.reloadIgnoringCache\nreloads renderer, bypasses cache]
    E --> J[Opens/closes Chrome DevTools]
Loading

Last reviewed commit: 951380b

@arnestrickmann arnestrickmann merged commit 0a05ea5 into main Mar 3, 2026
5 checks passed
@arnestrickmann arnestrickmann deleted the emdash/bring-back-cmd-r-3hg branch March 3, 2026 20:21
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