Skip to content

feat(desktop): notify renderer when GPU acceleration is disabled due to remote display - #49310

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-22e59357
Jun 19, 2026
Merged

feat(desktop): notify renderer when GPU acceleration is disabled due to remote display#49310
teknium1 merged 1 commit into
mainfrom
hermes/hermes-22e59357

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Surfaces the already-computed REMOTE_DISPLAY_REASON to the renderer so users on remote displays learn why GPU acceleration is disabled, instead of just seeing degraded rendering with no explanation.

#37932 (merged) detects RDP/SSH/X11 and disables hardware acceleration to stop Chromium compositor flicker — but the only feedback was a main-process console.log. This adds the user-facing layer #37932 lacked.

Changes

  • electron/main.cjs: hermes:get-remote-display-reason IPC handler returning REMOTE_DISPLAY_REASON (or null)
  • electron/preload.cjs: expose getRemoteDisplayReason() on window.hermesDesktop
  • src/global.d.ts: type declaration
  • src/components/remote-display-banner.tsx: dismissible <Alert> banner, renders only when reason is non-null
  • src/app/desktop-controller.tsx: render at shell root in the overlays block
  • src/i18n/{en,zh,zh-hant,ja}.ts + types.ts: banner strings

In a normal local session REMOTE_DISPLAY_REASON is null → banner never renders, zero overhead.

Validation

  • Premise confirmed on current main (main.cjs:142-149): detection works, feedback was console.log-only.
  • Desktop-only, no core files touched. Imports (alert, codicon, Info) resolve; matches existing getVersion IPC + overlay-block patterns.
  • node --check on both .cjs files clean; npx tsc --noEmit clean (full root install).

Salvaged from #49284 by @sprmn24, cherry-picked onto current main with authorship preserved.

Infographic

remote-display-banner

…to remote display

Remote displays (RDP/SSH/X11) silently disable GPU hardware acceleration with
only a console.log, leaving the user unaware that software rendering is
active. Expose the detected reason over IPC and surface a dismissible banner
in the renderer.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-22e59357 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11217 on HEAD, 11217 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5879 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have labels Jun 19, 2026
@teknium1
teknium1 merged commit 8ebe37f into main Jun 19, 2026
35 checks passed
@teknium1
teknium1 deleted the hermes/hermes-22e59357 branch June 19, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants