Skip to content

🐛 Fix terminal rendering issues on iOS Safari via DOM renderer#1035

Open
owine wants to merge 1 commit intohassio-addons:mainfrom
owine:fix/ttyd-ios-dom-renderer
Open

🐛 Fix terminal rendering issues on iOS Safari via DOM renderer#1035
owine wants to merge 1 commit intohassio-addons:mainfrom
owine:fix/ttyd-ios-dom-renderer

Conversation

@owine
Copy link
Copy Markdown

@owine owine commented Apr 15, 2026

What

Add --client-option rendererType=dom to the ttyd options in the run script.

Why

xterm.js defaults to WebGL → Canvas → DOM renderer order. On iOS Safari, the WebGL and Canvas renderers produce garbled, unreadable terminal output. Pinning to the DOM renderer fixes this.

This is a separate issue from the theme color change in #1033/#1034. That PR addressed unreadable text contrast; this addresses the renderer producing garbled output on iOS.

Closes #1016
Closes #1026
Closes #1027

Summary by CodeRabbit

  • Chores
    • Switched the web terminal client to DOM-based rendering. This may change visual appearance, text/emoji rendering, and performance characteristics in the in-browser terminal display.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 21a09b22-1a1c-4783-91c5-4b22b9152a4d

📥 Commits

Reviewing files that changed from the base of the PR and between 147859f and 929555a.

📒 Files selected for processing (1)
  • ssh/rootfs/etc/s6-overlay/s6-rc.d/ttyd/run
✅ Files skipped from review due to trivial changes (1)
  • ssh/rootfs/etc/s6-overlay/s6-rc.d/ttyd/run

Walkthrough

Added a ttyd startup option to force xterm.js to use DOM rendering by appending --client-option rendererType=dom to the ttyd options array in the s6 service run script.

Changes

Cohort / File(s) Summary
ttyd service configuration
ssh/rootfs/etc/s6-overlay/s6-rc.d/ttyd/run
Appended --client-option rendererType=dom to the ttyd command options to set xterm.js renderer type to dom; no other command construction or control flow changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 I hopped into run, tweaked one small line,
Told ttyd’s xterm.js to draw with DOM fine.
No canvas blur, just clearer text in view,
A tiny change — a rabbit’s joy for you. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions fixing terminal rendering issues on iOS Safari via DOM renderer, which aligns with the change of adding DOM renderer option to ttyd configuration.
Linked Issues check ✅ Passed The code change forces DOM renderer for xterm.js, which directly addresses the rendering corruption reported in iOS/iPad Safari (issues #1026, #1027) and Firefox color issues (#1016).
Out of Scope Changes check ✅ Passed The PR only modifies the ttyd startup command to add a single client option flag, which is directly scoped to fixing the rendering issues identified in linked issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Switch ttyd's xterm.js renderer from the default WebGL/Canvas to the
DOM renderer using --client-option rendererType=dom.

WebGL rendering on iOS Safari is unreliable — it silently falls back or
produces garbled/invisible output. The DOM renderer trades a small
amount of rendering performance for broad browser compatibility.

Fixes hassio-addons#1016, hassio-addons#1026, hassio-addons#1027
@owine owine force-pushed the fix/ttyd-ios-dom-renderer branch from 147859f to 929555a Compare April 20, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal rendering broken on iPad Safari (v23.0.6) Unreadable text in terminal on HA 2026.04 Firefox colors do not display.

1 participant