Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 24, 2025

Plan: Configure Different Shortcut for Hot Reload on ChromeOS/Windows

The current hot reload shortcut Ctrl+Shift+R conflicts with Chrome's default "Reload without cache" shortcut on ChromeOS and Windows.

Checklist:

  • Understand the issue and current implementation
  • Revert previous changes to maintain backwards compatibility
  • Add ChromeOS detection function in platform.ts
  • Update editor.ts to use Alt+Shift+R for ChromeOS only
  • Keep Ctrl+Shift+R for Windows/Linux (backwards compatible)
  • Keep Cmd+Shift+R for macOS (no conflicts)
  • Update documentation with keyboard shortcuts
  • Refactor to reduce code duplication
  • Extract keyboard shortcut logic into shouldReload() method for better readability
  • Run code review
  • Run security scan with CodeQL

Summary

Changes Made:

  1. Platform Detection (mesop/web/src/utils/platform.ts):

    • Added isChromeOS() function using navigator.userAgent.includes('CrOS')
  2. Keyboard Shortcuts (mesop/web/src/editor/editor.ts):

    • MacOS: Cmd + Shift + R (unchanged)
    • ChromeOS: Alt + Shift + R (new - avoids browser hard reload conflict)
    • Windows/Linux: Ctrl + Shift + R (unchanged - maintains backwards compatibility)
    • Extracted keyboard shortcut logic into dedicated shouldReload() method with explicit platform checks
    • Added JSDoc documentation for keyboard shortcut mappings
  3. Documentation (docs/getting-started/quickstart.md):

    • Added keyboard shortcut reference for all platforms in hot reload section

Security Summary:

  • CodeQL scan completed with no security vulnerabilities found

Code Quality:

  • Improved readability by separating concerns
  • Explicit platform-specific logic in shouldReload() method
  • Proper documentation of keyboard shortcuts
Original prompt

This section details on the original issue you should resolve

<issue_title>Configure a different shortcut for Hot Reload on ChromeOS</issue_title>
<issue_description>Right now, the hot reload shortcut for ChromeOS is "Ctrl + Shift + R", but this is configured by default by the OS/Browser as Reload without cache. We should find a different shortcut.

  • Note: need to check the shortcut key for windows</issue_description>

Comments on the Issue (you are @copilot in this section)

@wwwillchen Note: after #1135 - this removed the hot reload shortcut support

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Configure a different shortcut for hot reload on ChromeOS Change hot reload shortcut to Ctrl+Alt+R for non-Mac platforms Dec 24, 2025
Copilot AI requested a review from richard-to December 24, 2025 19:49
Copilot AI changed the title Change hot reload shortcut to Ctrl+Alt+R for non-Mac platforms Use Alt+Shift+R for ChromeOS only, maintain backwards compatibility for other platforms Dec 24, 2025
Copilot AI requested a review from richard-to December 24, 2025 20:01
@richard-to richard-to marked this pull request as ready for review December 24, 2025 21:47
@richard-to richard-to merged commit c96ab3f into main Dec 24, 2025
4 checks passed
richard-to pushed a commit that referenced this pull request Dec 24, 2025
ChromeOS only, maintain backwards compatibility for other platforms (#1328)
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.

Configure a different shortcut for Hot Reload on ChromeOS

2 participants