fix: prevent Ctrl+R page reload and show platform-aware shortcuts (#58)#66
Conversation
…tt1398#58) Intercept Ctrl+R/Cmd+R in before-input-event to prevent Electron's default page reload. Replace hardcoded macOS shortcut symbols with platform-aware helpers that show Ctrl+ on Windows/Linux.
Summary of ChangesHello @Psypeal, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses two key areas to improve the application's responsiveness and user interface consistency. It prevents the default browser-like page reload when Ctrl+R or Cmd+R is pressed, enabling custom application behavior for this shortcut. Concurrently, it standardizes the display of keyboard shortcuts across platforms, ensuring that users see the correct modifier keys for their operating system. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request effectively addresses the stated goals of preventing Ctrl+R page reload in Electron and introducing platform-aware shortcut displays. The formatShortcut utility is a good addition for improving UX across different operating systems. The changes are well-implemented and follow good practices.
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughImplements cross-platform keyboard shortcut formatting by introducing platform-aware utilities that dynamically format shortcuts based on the operating system (macOS vs. Windows/Linux), then applies these utilities across UI components and main process event handling to replace hard-coded keyboard symbols. Changes
Suggested labels
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
Summary
Fixes #58
Changes
Test plan
Summary by CodeRabbit
New Features
Bug Fixes