Skip to content

Conversation

@cristian1991
Copy link

Summary

Adds a setting to disable hardware acceleration on Windows, which may help fix crashes and conflicts with other GPU-using apps (like Chrome video playback issues).

Problem

Solution

  • Added "Disable hardware acceleration" toggle in Settings > General > Advanced (Windows only)
  • Passes --disable-gpu-compositing flag to WebView2 at startup
  • Requires app restart to take effect (button shown after toggle)

Changes

  • packages/desktop/src-tauri/src/lib.rs - Read setting at startup, pass browser args
  • packages/desktop/src/index.tsx - Platform methods for get/set
  • packages/app/src/context/platform.tsx - Type definitions
  • packages/app/src/components/settings-general.tsx - UI toggle
  • packages/app/src/i18n/en.ts - Translations

Testing

  1. Open OpenCode desktop on Windows
  2. Go to Settings > General > Advanced
  3. Toggle "Disable hardware acceleration"
  4. Click "Restart now"
  5. App should restart with GPU compositing disabled

- Add file tree explorer with expand/collapse folders
- Add Monaco editor with syntax highlighting for 25+ languages
- Add theme integration (syncs with OpenCode themes including preview)
- Add Ctrl+S save, file polling for external changes
- Add Tauri backend commands: read_directory, read_file, write_file, get_project_root
- Add editor toggle button in session header
- Add editor poll interval setting
- Add i18n translations for all 14 languages
- Wrap ExplorerPanel with Show when={platform.readDirectory}
- Wrap EditorPanel with Show when={platform.readFile}
- Wrap editor toggle button with Show when={platform.readFile}
- Add openFile(path) method to editor context
- Review panel now shows on the right side on web (not inline above chat)
- Header layout icons now correctly show 2-panel layout on web
- File Editor settings section hidden on web (no file system support)

The issue was that editorCtx.panelVisible() defaults to true, but the
editor panel can't render on web since platform.readFile is undefined.
Added platform.readFile checks to conditions so the UI correctly falls
back to non-editor mode on web.
- Active tab always prompts user when file changes on disk (never auto-reload)
- Background tabs auto-reload by default (for AI-edited files)
- Added setting: Auto-reload background files to control behavior
- When setting is off, user is prompted when switching to affected tabs
- Add 'Disable hardware acceleration' setting in Settings > General > Advanced
- Only shown on Windows where WebView2 is used
- Passes --disable-gpu flags to WebView2 when enabled
- Requires app restart to take effect
- May fix crashes and conflicts with other GPU-using apps like Chrome

Related issues: anomalyco#10248, anomalyco#9385, anomalyco#9151, anomalyco#7046
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@jsrcode
Copy link

jsrcode commented Jan 24, 2026

Memory leaks have nothing to do with this windowscli leak

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants