CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-electron-debug

Adds useful debug features to your Electron app

86

1.19x
Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "This evaluation assesses how well the engineer uses Electron's async app initialization and global shortcut APIs to implement a keyboard shortcut manager. The focus is on proper use of app.whenReady() for handling async initialization and the globalShortcut API for registering keyboard shortcuts.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "app.whenReady() usage",
      "description": "Uses app.whenReady() to ensure the Electron app is fully initialized before registering global shortcuts. The function should be called and awaited (or use .then()) to handle the asynchronous app initialization properly.",
      "max_score": 30
    },
    {
      "name": "globalShortcut.register() calls",
      "description": "Uses globalShortcut.register() to register both the reload shortcut (CommandOrControl+R) and DevTools shortcut (F12) with the correct accelerator strings.",
      "max_score": 25
    },
    {
      "name": "BrowserWindow.getFocusedWindow()",
      "description": "Uses BrowserWindow.getFocusedWindow() in both shortcut handlers to get the currently focused window, enabling the shortcuts to target the correct window.",
      "max_score": 20
    },
    {
      "name": "Window existence check",
      "description": "Checks if the focused window exists (is not null/undefined) before attempting to operate on it, ensuring shortcuts safely handle the no-focused-window case.",
      "max_score": 10
    },
    {
      "name": "Reload with cache bypass",
      "description": "Uses webContents.reloadIgnoringCache() method for the reload shortcut to bypass the cache, rather than a simple reload().",
      "max_score": 10
    },
    {
      "name": "DevTools toggle logic",
      "description": "Implements proper toggle logic for DevTools using webContents.isDevToolsOpened() to check state and webContents.openDevTools()/closeDevTools() or toggleDevTools() to change state.",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-electron-debug

tile.json