5 Commits
Author SHA1 Message Date
Aleksander DygońandClaude Opus 5.5 03c2ff34c2 Remove code comments and add the no-comments rule (#12604)
* Remove code comments and add the no-comments rule

Remove the comments from first-party code and configuration files:
TS/JS, JSX, CSS, SQL migrations, Swift, Kotlin, Gradle, shell,
Docker, systemd, Nix, YAML, TOML, JSONC and GritQL.

Keep only what a tool reads: license headers, shebangs, compiler
and lint directives, JSDoc types in plain .js files, generated file
headers, GritQL scope lines, the install-server.sh help text and the
openbot-boat-pre-stop marker. Vendored code, fixtures and released
schemas keep their comments.

Add the rule to AGENTS.md, and change the docs that asked for
comments. Add two i18n keys that only comments named to
RELEASED_SOURCE_KEYS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep comments that are data in strings

The benchmark task files in opencode-free-models-bench.ts tell the
model what each function must do. The sample file and HTML page in
the two stories are display content. Put their comments back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep released migrations and mobile native inputs unchanged

check:migrations compares each released migration with v0.73.0 byte
for byte, so restore src/backend/migrations. A change to a native
build input of apps/mobile makes a new runtime version, so restore
those files and the extra fingerprint sources.

List these files and the comment markers that a tool reads in
AGENTS.md. Remove the last requests for comments in
src/renderer/AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 12:19:28 +01:00
Aleksander DygońandClaude Opus 5.5 a73bb38688 Keep OpenBot open when the Linux GPU process stops with software rendering (#12534)
* Keep OpenBot open when the Linux GPU process stops with software rendering

With software rendering, Chromium has no GPU mode left to fall back to.
After three recent GPU process exits it ended the whole app ("GPU process
isn't usable. Goodbye."), also when Linux killed the GPU process for
memory during a browser takeover. The takeover sign-in was then lost.

A start with software rendering now sets disable-gpu-process-crash-limit,
so Chromium starts the GPU process again. Ten GPU process exits in 60 s
show a GPU process that cannot start: OpenBot then quits through its
normal teardown, and does not restart it forever. A start with hardware
acceleration keeps the limit, so Chromium still falls back to software.

The Linux GPU fallback e2e covers three exits and the restart loop.

Fixes #12520

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Use a monotonic clock for the GPU restart loop window

A clock that goes back, for example after a time sync at wake, must not
keep old GPU process exits in the 60 s window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 06:45:50 +01:00
Aleksander Dygoń 8a7e5d72f8 Try the GPU again after a Linux start that stopped with no crash (#8842)
* Try the GPU again after a Linux start that stopped with no crash

A start that stopped in its first 30 seconds kept software rendering on
until the next Chromium major version, also after a kill or a power loss.
The #992 crash writes a Crashpad dump. Thus a start file with no dump
since it was written now gives the GPU one more start, which marks its
own file `retried`. A second stop in a row, or a dump, keeps software
rendering on.

Fixes #6208

* Count GPU start crash dumps with no upper time limit

A clock that goes back after a reboot must not hide a dump. The e2e
harness now uses the default crashDumps path, as the app does, and the
e2e reuses countCrashDumps.
2026-11-13 12:28:18 +01:00
Aleksander Dygoń 52f1784807 Keep WebGL in the browser of a Linux server (#6823)
* Keep WebGL in the browser of a Linux server

A server called app.disableHardwareAcceleration(), which also turns off
WebGL in Electron 44. Sites such as the Figma editor then stopped.
A server now composites on the CPU with disable-gpu-compositing and keeps
WebGL on SwiftShader with enable-unsafe-swiftshader, as Playwright does
for Electron on computers with no GPU. Desktop GPU fallbacks do not change.

Fixes #6404

* Record a GPU crash on a server and keep its opt-out

A server now keeps hardware acceleration for WebGL, so a GPU process
crash must not stop it at each start. A server records the crash in
gpu-crash.json and turns off hardware acceleration at the next start, as
a desktop does. It writes no start file. OPENBOT_DISABLE_GPU=1 turns off
hardware acceleration on a server again. The E2E reports the WebGL
renderer and checks the server crash and opt-out steps.
2026-11-10 15:43:37 +01:00
4607005848 Use the GPU on Linux until it fails on this computer (#2308)
* Use the GPU on Linux until it fails on this computer

#1046 turned off hardware acceleration for all Linux computers (#992), so
surfaces with a blurred backdrop render on the CPU also where the GPU works.

Hardware acceleration now stays on. A GPU process crash (gpu-crash.json) or
a start that stops before it is confirmed (gpu-start.json, for the SIGTRAP
case where main stops first) turns on software rendering at later starts
with the same Electron version. OPENBOT_DISABLE_GPU=1 or 0 overrides it.

scripts/linux-gpu-fallback-e2e.ts runs the real Electron and crashes the
real GPU process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep software rendering on Linux servers, and key GPU failures on the Chromium major version

- A server (`OPENBOT_SERVER=1` or a hosted server) runs under Xvfb with no GPU. It keeps software
  rendering, as before #2308, and writes no start file.
- A failure record keeps the Chromium major version, not the Electron version. An Electron patch
  release keeps Chromium's major version, so it does not make a failing computer stop again.
- Only `configureLinuxGpu` and its option and result types are exported (knip).
- The E2E test has a server step. docs/TROUBLESHOOTING.md tells how to try the GPU again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Confirm the GPU start when a quit starts, not after the teardown

`will-quit` fires only after the teardown. The teardown can take longer than a stop allows: the
shutdown deadline ends with `app.exit`, and `dev:stop` sends SIGKILL after a few seconds. Then a
normal quit in the first 30 s left `gpu-start.json`, and later starts used software rendering.
`before-quit` fires when the quit starts.

A second instance can read the start file of a first instance that is still new. It no longer logs
that the GPU failed before.

The E2E test has a step that kills the app during a teardown that does not end. With `will-quit`,
this step fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the GPU on Linux after a GPU context loss

When the GPU context is lost, for example after suspend and resume, Chromium stops the GPU process on
purpose with exit code 34 (`viz::ExitCode::RESULT_CODE_GPU_EXIT_ON_CONTEXT_LOST`) and starts it
again. Electron reports this exit as `abnormal-exit`, so one context loss wrote `gpu-crash.json`, and
all later starts used software rendering until a new Chromium major version. This exit no longer
counts as a GPU failure.

The E2E test sends this exit to the handler and checks that no crash file is written. Without the
fix, this step fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Natan Pimentel <natanpimentel@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: NB😈 <norbertbodziony@gmail.com>
2026-10-16 19:25:59 +02:00