Summary
Running hunk diff prints many Yoga layout warnings to the terminal:
Measure function returned an invalid dimension to Yoga: [width=nan, height=nan]
The UI still appears to render, but stderr/stdout gets spammed with the warning repeatedly.
Environment
- hunkdiff:
0.17.0
- OS: macOS 26.5.1 / Build 25F80
- Terminal: Ghostty 1.3.1
TERM=xterm-256color
COLORTERM=truecolor
- Node wrapper installed via npm global package (
hunk resolves to hunkdiff/bin/hunk.cjs)
Reproduction
In a git repo with a small working tree diff:
I can also reproduce with a minimal patch file:
cat >/tmp/minimal.patch <<'PATCH'
diff --git a/a.txt b/a.txt
index 0000000..1111111 100644
--- a/a.txt
+++ b/a.txt
@@ -1 +1 @@
-old
+new
PATCH
hunk patch /tmp/minimal.patch
Actual behavior
The terminal prints the warning many times, for example:
Measure function returned an invalid dimension to Yoga: [width=nan, height=nan]
Measure function returned an invalid dimension to Yoga: [width=nan, height=nan]
Measure function returned an invalid dimension to Yoga: [width=nan, height=nan]
...
Expected behavior
No Yoga invalid dimension warnings should be printed during normal rendering.
Notes
This happens both in a normal Ghostty terminal and in a nested/agent terminal environment. git diff itself works normally; the problem appears specific to Hunk's TUI rendering/layout path.
Summary
Running
hunk diffprints many Yoga layout warnings to the terminal:The UI still appears to render, but stderr/stdout gets spammed with the warning repeatedly.
Environment
0.17.0TERM=xterm-256colorCOLORTERM=truecolorhunkresolves tohunkdiff/bin/hunk.cjs)Reproduction
In a git repo with a small working tree diff:
I can also reproduce with a minimal patch file:
Actual behavior
The terminal prints the warning many times, for example:
Expected behavior
No Yoga invalid dimension warnings should be printed during normal rendering.
Notes
This happens both in a normal Ghostty terminal and in a nested/agent terminal environment.
git diffitself works normally; the problem appears specific to Hunk's TUI rendering/layout path.