Skip to content

Conversation

@bajrangCoder
Copy link
Member

No description provided.

@github-actions github-actions bot added enhancement New feature or request translations Anything related to Translations Whether a Issue or PR labels Jan 18, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @bajrangCoder, 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 significantly enhances the application's debugging capabilities by integrating Eruda, a powerful in-browser developer console. It provides a dedicated 'Developer Mode' setting and convenient commands to manage the devtools, allowing for easier inspection of the application's runtime state and more efficient debugging of plugins and other components.

Highlights

  • Eruda DevTools Integration: Introduced Eruda, a mobile-friendly developer console, to provide in-app debugging capabilities. This allows for inspecting app state and debugging plugins directly within the application.
  • New Commands and Keybinding: Added new commands dev:toggleInspector and dev:openInspector to the command palette, along with a Ctrl-Shift-I keybinding for toggleInspector, making it easy to access the devtools.
  • Developer Mode Setting: A new developerMode setting has been added to the application settings, allowing users to enable or disable the Eruda devtools. When enabled, Eruda is initialized on app start.
  • Localization Support: New localization strings for 'Developer Mode' and related informational messages have been added across various language files to support the new feature.
  • Dynamic Eruda Loading: The Eruda script is dynamically downloaded from a CDN and stored locally if not already present, ensuring the devtools are available when needed without bundling them directly into the app.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces Eruda devtools for debugging, a valuable addition for developers. The implementation is well-structured, with a dedicated devTools module and proper integration into the app's settings and commands. The code is generally clean and follows existing patterns. I've provided a few suggestions to enhance maintainability and consistency, such as refactoring to avoid code duplication and addressing the use of private library properties. Overall, this is a strong contribution.

@greptile-apps
Copy link

greptile-apps bot commented Jan 18, 2026

Greptile Summary

This PR adds Eruda developer tools integration to enable in-app debugging and inspection capabilities. When enabled via settings, the feature downloads and caches the Eruda library from a CDN, then provides keyboard shortcuts (Ctrl+Shift+I) and commands to toggle the inspector panel.

Key changes:

  • Created src/lib/devTools.js module to manage Eruda lifecycle (download, initialization, show/hide, destroy)
  • Added developerMode setting with UI toggle in app settings
  • Integrated devtools initialization on app startup when enabled
  • Added toggle-inspector and open-inspector commands with Ctrl+Shift+I keybinding
  • Added localization strings for all 33 supported languages

Issues found:

  • Critical: Case mismatch in localization key (info-developerMode vs info-developermode) will prevent info text from displaying in settings
  • All 32 non-English locale files contain English strings instead of proper translations

Confidence Score: 3/5

  • This PR is mostly safe but has one critical bug that will prevent the info text from displaying
  • The implementation is solid with good error handling and follows existing patterns. However, there's a case mismatch bug in the localization key that will cause the info text to be undefined in the settings UI. Additionally, all non-English locales use English strings which impacts internationalization. The core functionality is well-implemented and the change is low-risk overall.
  • Fix the localization key case mismatch in src/settings/appSettings.js:84 before merging. Consider translating strings in non-English locale files.

Important Files Changed

Filename Overview
src/lib/devTools.js New file that implements Eruda devtools integration with download, initialization, and lifecycle management. Solid implementation with proper error handling.
src/main.js Added conditional devtools initialization on app startup when developer mode is enabled. Clean integration with proper error handling.
src/settings/appSettings.js Added developer mode setting with toggle functionality. Has case mismatch bug in localization key that will prevent info text from displaying.
src/lib/commands.js Added toggle-inspector and open-inspector commands with dynamic import. Clean implementation.
src/lib/keyBindings.js Added Ctrl+Shift+I keyboard shortcut for toggling inspector. Follows existing keybinding patterns.
src/lang/en-us.json Added localization strings for developer mode feature. Has case mismatch in info-developermode key (should match the casing used in appSettings.js).

Sequence Diagram

sequenceDiagram
    participant User
    participant AppSettings
    participant DevTools
    participant FileSystem
    participant CDN
    participant Eruda
    
    Note over User,Eruda: Developer Mode Activation Flow
    User->>AppSettings: Enable Developer Mode
    AppSettings->>DevTools: import & init(showLoader=true)
    DevTools->>FileSystem: Check if eruda.js exists
    alt File not found
        DevTools->>User: Show loader dialog
        DevTools->>CDN: Download from jsdelivr CDN
        CDN-->>DevTools: Return eruda.js script
        DevTools->>FileSystem: Save eruda.js to DATA_STORAGE
        DevTools->>User: Hide loader dialog
    end
    DevTools->>FileSystem: Get internal URI for eruda.js
    DevTools->>Eruda: Inject script tag into document
    Eruda-->>DevTools: Script loaded
    DevTools->>Eruda: eruda.init(config)
    DevTools->>Eruda: Hide entry button
    DevTools-->>AppSettings: Initialization complete
    AppSettings->>User: Show success toast
    
    Note over User,Eruda: App Startup Flow (when enabled)
    User->>App: Start app
    App->>DevTools: import & init(showLoader=false)
    DevTools->>FileSystem: Load cached eruda.js
    DevTools->>Eruda: Initialize silently
    
    Note over User,Eruda: Inspector Toggle Flow
    User->>User: Press Ctrl+Shift+I
    User->>DevTools: toggle()
    alt Inspector hidden
        DevTools->>Eruda: show()
        DevTools->>Eruda: Show entry button
    else Inspector visible
        DevTools->>Eruda: hide()
        DevTools->>Eruda: Hide entry button
    end
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

38 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
if (settings.value.developerMode) {
try {
const devTools = (await import("lib/devTools")).default;
await devTools.init(false);
Copy link
Member

Choose a reason for hiding this comment

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

If someone enables devTools and doesn't use it, it loads eruda.js for no reason and wastes memory. It might be better to move the init call to the show() function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request translations Anything related to Translations Whether a Issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants