Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-windows-scroll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hunkdiff": patch
---

Prevent Windows crashes when scrolling to the end of a diff and suppress Yoga NaN warning spam in Apple Silicon npm installs by upgrading OpenTUI to 0.4.3.
30 changes: 15 additions & 15 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 33 additions & 33 deletions nix/bun.lock.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,45 +21,45 @@
"@hunk/session-broker-bun" = copyPathToStore ../packages/session-broker-bun;
"@hunk/session-broker-core" = copyPathToStore ../packages/session-broker-core;
"@hunk/session-broker-node" = copyPathToStore ../packages/session-broker-node;
"@opentui/core-darwin-arm64@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-darwin-arm64/-/core-darwin-arm64-0.4.2.tgz";
hash = "sha512-is+O+sS/l3E9cZXyM9pRF1WhqnE+hYSPYoZkbseR9CthJcaWPGi3R3jUJa1cLj325252jWgxVupnDqFUtKg36w==";
"@opentui/core-darwin-arm64@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-darwin-arm64/-/core-darwin-arm64-0.4.3.tgz";
hash = "sha512-p5+7AAxpxGuDGagyQfewKtmTFnN7THvTVY4FyKqUtJomNaHdQXPHztapNNzMx0DGWbwOUbVKzpL+yc3CZY3chQ==";
};
"@opentui/core-darwin-x64@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-darwin-x64/-/core-darwin-x64-0.4.2.tgz";
hash = "sha512-ACi42h81DurSeybUAD1XyKT6xmXZcKeTxS54lZFi0CVZh46w0g99vNj8PlQzIFXvvFLT0e0IlRS//eWSWS2zGQ==";
"@opentui/core-darwin-x64@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-darwin-x64/-/core-darwin-x64-0.4.3.tgz";
hash = "sha512-+fh0vEUE0lwVC7RW5ijYLRlTLp5NfvCRj8SzxDVd7IL2j2ssB6YXcfIbXq2EW7UGnrejwPRXf1tgUrIXW9KmOw==";
};
"@opentui/core-linux-arm64-musl@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-arm64-musl/-/core-linux-arm64-musl-0.4.2.tgz";
hash = "sha512-heNciL2ngPU+kq1h01PHLsxn6Fr8iqTFtbxSdVbhaY3XihuIjkuXyEhFeuoa1lsXY7Bb2gpWnX5EQVWnZsAuDQ==";
"@opentui/core-linux-arm64-musl@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-arm64-musl/-/core-linux-arm64-musl-0.4.3.tgz";
hash = "sha512-8p8g8/AEq/xFGpQ7XcIFKcAqjc0QwsZcv+Ll9RbCDpUA56FGH6jfLDir0KYTNTgYXJTIrBIENI9K46VuxMUMQA==";
};
"@opentui/core-linux-arm64@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-arm64/-/core-linux-arm64-0.4.2.tgz";
hash = "sha512-RjOx2HcjLRtGSy9WrAGSdr5M9SpJuPifPORpImx6Mciovw0ltnE0uoYjIyor82uf6/LExWC7YA2AcAl+YBxayA==";
"@opentui/core-linux-arm64@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-arm64/-/core-linux-arm64-0.4.3.tgz";
hash = "sha512-gl6qA5QJy6u8Cbt7gOtHbhhfMZ4qQDb0kEwFXHcMGmbnKzz4OHoq74D6tNjyvSQB9saoC7C6C0tvn2DcJOuNog==";
};
"@opentui/core-linux-x64-musl@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-x64-musl/-/core-linux-x64-musl-0.4.2.tgz";
hash = "sha512-Cjv6Bv7l3p/KLNJr5RyqCS0FmRlAGJnkA2IK3S+HkHhCOv/O02S1G+DBUY6POnyjp1eNy95vauustApobhdbig==";
"@opentui/core-linux-x64-musl@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-x64-musl/-/core-linux-x64-musl-0.4.3.tgz";
hash = "sha512-/QiFpCrpU2O7vy8QYmLIQYbvAtKDgmqcVjR7dGtqSzkiQk3ktNJoo5RozG7ueXnjung1Wp0nKldKxo2Csg/OrA==";
};
"@opentui/core-linux-x64@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-x64/-/core-linux-x64-0.4.2.tgz";
hash = "sha512-9s0s/ooK+AhWP306By3gu+XhzcVEThC2sqKMPK1nQmGDujQhd+xOrtbtfCVcJSx62UzAovC2VNqypvP8vHByOg==";
"@opentui/core-linux-x64@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-linux-x64/-/core-linux-x64-0.4.3.tgz";
hash = "sha512-dXpJitiZdYE3hq2Pvx6e9I0uPQSOcnaLLp1pDgWAHv+3kvKSHEX//9Yr/pV/Ua6qqT7p+2D/K4vXNap/NKVo2w==";
};
"@opentui/core-win32-arm64@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-win32-arm64/-/core-win32-arm64-0.4.2.tgz";
hash = "sha512-mfJZrJ0TNPFRZUzXNsxAPe1YdiWsy/vbTl93+yeXGHPI1B8Qnk9V5hpzSxxEyBGhlTHSfGNtgiO+VrrdRC3kZA==";
"@opentui/core-win32-arm64@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-win32-arm64/-/core-win32-arm64-0.4.3.tgz";
hash = "sha512-Mx2zuOjrhm/z2SDS6RExIyjP/SnN/8QhhagxURUw0jQi/NssGSeAllu1cBAFFnhobJL5QLTE4FU4CRhUK9svgg==";
};
"@opentui/core-win32-x64@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-win32-x64/-/core-win32-x64-0.4.2.tgz";
hash = "sha512-P2oguG3ng3OMjAdasFSA3GhHaQXtzDUsIRDGbzWFOimpZ/zMemidp+JQ0V8V6XwK6Utk5G0aQ03oBaRCoLyYDw==";
"@opentui/core-win32-x64@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core-win32-x64/-/core-win32-x64-0.4.3.tgz";
hash = "sha512-NuoqvWKGXaYnmlqvu7Gg2lLI6yVMnS9OfWBvxp+7Q+McSgHFSTQmYBXaPpvQ8HikpQXE1nCeMPtuSG4PdZHe2w==";
};
"@opentui/core@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core/-/core-0.4.2.tgz";
hash = "sha512-ulx6RMqftf2fm7Itf9e81GcCDMNY6NAhmnKYhllDOMYD+PxYXR+vomy2bxQNV5ow31RE7s8WQFnb7hWTRUbx2g==";
"@opentui/core@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/core/-/core-0.4.3.tgz";
hash = "sha512-rrJfAk13tALDqldYjhc78eWQ+aKq1iknJgffIOg3OwyZoqQo+p6gtuqyhmWvXIfQzlNUbpgpCPcxbXlhMnlaHQ==";
};
"@opentui/react@0.4.2" = fetchurl {
url = "https://registry.npmjs.org/@opentui/react/-/react-0.4.2.tgz";
hash = "sha512-SsteuclEw72gUBzp/mZjADSNS1jJJr4htB89euicn+Atl62ZvO22wuLE9hBFDCpumtgG3sbSe+7XtV6vW1orXA==";
"@opentui/react@0.4.3" = fetchurl {
url = "https://registry.npmjs.org/@opentui/react/-/react-0.4.3.tgz";
hash = "sha512-HtC/+lMURaZlifiJNVsn84YqKMywXQmkeSNbUTlbbeS6YM6reahaacnZEYZdnEUgklO6+r/J1tG8UBhqO26X7Q==";
};
"@oven/bun-darwin-aarch64@1.3.14" = fetchurl {
url = "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.3.14.tgz";
Expand Down Expand Up @@ -405,9 +405,9 @@
url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz";
hash = "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==";
};
"bun-ffi-structs@0.2.3" = fetchurl {
url = "https://registry.npmjs.org/bun-ffi-structs/-/bun-ffi-structs-0.2.3.tgz";
hash = "sha512-pgJiXP+hEgFo9qG51J6ItfY4ocs3vniwNzJ9WhoakB3QB2GdzQxX2EXssentPYlB2hOfJrTjO6iIQkWYzUodpg==";
"bun-ffi-structs@0.2.4" = fetchurl {
url = "https://registry.npmjs.org/bun-ffi-structs/-/bun-ffi-structs-0.2.4.tgz";
hash = "sha512-AJzsqoVFs1KBbJbWHIYrVZLDC3NhTqqh25awRXqzoLzmBAKr5oqk6+CwuYHAekKx+VBCYVohBoKuRq40dV+TYg==";
};
"bun-types@1.3.14" = fetchurl {
url = "https://registry.npmjs.org/bun-types/-/bun-types-1.3.14.tgz";
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
"@hunk/session-broker-bun": "workspace:*",
"@hunk/session-broker-core": "workspace:*",
"@hunk/session-broker-node": "workspace:*",
"@opentui/core": "^0.4.2",
"@opentui/react": "^0.4.2",
"@opentui/core": "^0.4.3",
"@opentui/react": "^0.4.3",
"@types/bun": "1.3.14",
"@types/react": "^19.2.14",
"@types/shell-quote": "1.7.5",
Expand All @@ -121,8 +121,8 @@
"typescript": "^5.9.3"
},
"peerDependencies": {
"@opentui/core": "^0.4.2",
"@opentui/react": "^0.4.2",
"@opentui/core": "^0.4.3",
"@opentui/react": "^0.4.3",
"react": "^19.2.4"
},
"simple-git-hooks": {
Expand Down
43 changes: 43 additions & 0 deletions test/pty/scroll.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,49 @@ describe("PTY scrolling", () => {
}
});

test("repeated mouse-wheel input remains stable at the end of the review stream", async () => {
const fixture = harness.createScrollableFilePair();
const session = await harness.launchHunk({
args: ["diff", fixture.before, fixture.after, "--mode", "split"],
cols: 220,
rows: 12,
});

try {
await session.waitForText(/View\s+Navigate\s+Agent\s+Help/, {
timeout: 15_000,
});

await session.scrollDown(30);
const bottom = await harness.waitForSnapshot(
session,
(text) => text.includes("line18 = 118"),
5_000,
);
expect(bottom).not.toContain("line01 = 101");

// Keep sending wheel events after the scrollbox has clamped at EOF. This exercises the
// culling/unmount path that previously crashed OpenTUI's Windows native renderer.
await session.scrollDown(12);
const overscrolled = await harness.waitForSnapshot(
session,
(text) => text.includes("line18 = 118"),
5_000,
);
expect(overscrolled).toContain("line18 = 118");

await session.scrollUp(30);
const restored = await harness.waitForSnapshot(
session,
(text) => text.includes("line01 = 101"),
5_000,
);
expect(restored).toContain("line01 = 101");
} finally {
session.close();
}
});

test("the first mouse-wheel step still advances content under the always-pinned file header above a collapsed gap", async () => {
const fixture = harness.createCollapsedTopRepoFixture();
const session = await harness.launchHunk({
Expand Down