From 25686feebfb258c4f91c51e601f032d01509e19d Mon Sep 17 00:00:00 2001 From: alt-glitch Date: Sun, 14 Jun 2026 13:53:11 +0530 Subject: [PATCH] opentui(v6): bump @opentui 0.4.0 -> 0.4.1 + openConsoleOnError:false (W5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump the three @opentui pins (core/keymap/solid) 0.4.0 -> 0.4.1 + lockfile. The headline upstream change is native-yoga (#1126); per the locked spec decision D11 this is NOT a memory-floor lever at typical sizes, and a fresh bench on this branch confirms it — OpenTUI capped VmHWM is within run-to-run noise across mem50/100/300 (0.4.0: 193/200/220 vs 0.4.1: 192/218/217 MB). The value is tail-session layout wins + upstream alignment, not the floor. D14 (ffiSafe re-verify): the FFI signatures ffiSafe.ts clamps (OptimizedBuffer fillRect/drawText/setCell/setCellWithAlphaBlending/drawChar + TextBufferView setViewport) are byte-identical across 0.4.0->0.4.1 (still u32, still crash on negatives under node:ffi), so the shim stays as-is and remains load-bearing. Verified live: scrolled a 300-msg transcript with syntax-highlighted code + tool cards past the viewport top (the negative-y fillRect trigger) on 0.4.1 — no ERR_INVALID_ARG_VALUE loop, clean render. Also pick up openConsoleOnError:false (public createCliRenderer option): stops core's uncaught-error handler from calling the ALLOCATING console.show(), which exit-7-masks the original error under native-handle exhaustion (the bench mem3000 postmortem). guardRendererErrorHandlers stays as belt-and-suspenders. Gate: npm run check OK (768 tests). Determinism gate green both engines. --- ui-opentui/package-lock.json | 108 ++++++++++++++-------------- ui-opentui/package.json | 6 +- ui-opentui/src/boundary/renderer.ts | 9 +++ 3 files changed, 64 insertions(+), 59 deletions(-) diff --git a/ui-opentui/package-lock.json b/ui-opentui/package-lock.json index c074064f0c6..fe59bfd573d 100644 --- a/ui-opentui/package-lock.json +++ b/ui-opentui/package-lock.json @@ -8,9 +8,9 @@ "name": "@hermes/ui-opentui", "version": "0.0.0", "dependencies": { - "@opentui/core": "0.4.0", - "@opentui/keymap": "0.4.0", - "@opentui/solid": "0.4.0", + "@opentui/core": "0.4.1", + "@opentui/keymap": "0.4.1", + "@opentui/solid": "0.4.1", "effect": "4.0.0-beta.78", "fuzzysort": "^3.1.0", "solid-js": "1.9.12" @@ -29,6 +29,9 @@ "typescript": "^5", "typescript-eslint": "^8", "vitest": "^4.1.8" + }, + "engines": { + "node": ">=26.3" } }, "node_modules/@ampproject/remapping": { @@ -1290,36 +1293,35 @@ } }, "node_modules/@opentui/core": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core/-/core-0.4.0.tgz", - "integrity": "sha512-G3TmJmaPoxD6SadwevZNE30H/pMZsr/qneVaKc7bmFBxA+uHgxFSAsMoFYaEqcFJM1dGt22kMJb+YY2ZahzqVw==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core/-/core-0.4.1.tgz", + "integrity": "sha512-ejlunoFCGLcghYGdfamI/DlWHsgCTLbuoL2JeOmFuLsN+DM5phje3CQbGR4tpl24cadCgHJQFomjoQ9Htvin+Q==", "license": "MIT", "dependencies": { "bun-ffi-structs": "0.2.3", "diff": "9.0.0", "marked": "17.0.1", "string-width": "7.2.0", - "strip-ansi": "7.1.2", - "yoga-layout": "3.2.1" + "strip-ansi": "7.1.2" }, "optionalDependencies": { - "@opentui/core-darwin-arm64": "0.4.0", - "@opentui/core-darwin-x64": "0.4.0", - "@opentui/core-linux-arm64": "0.4.0", - "@opentui/core-linux-arm64-musl": "0.4.0", - "@opentui/core-linux-x64": "0.4.0", - "@opentui/core-linux-x64-musl": "0.4.0", - "@opentui/core-win32-arm64": "0.4.0", - "@opentui/core-win32-x64": "0.4.0" + "@opentui/core-darwin-arm64": "0.4.1", + "@opentui/core-darwin-x64": "0.4.1", + "@opentui/core-linux-arm64": "0.4.1", + "@opentui/core-linux-arm64-musl": "0.4.1", + "@opentui/core-linux-x64": "0.4.1", + "@opentui/core-linux-x64-musl": "0.4.1", + "@opentui/core-win32-arm64": "0.4.1", + "@opentui/core-win32-x64": "0.4.1" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "node_modules/@opentui/core-darwin-arm64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-darwin-arm64/-/core-darwin-arm64-0.4.0.tgz", - "integrity": "sha512-t7VGLn2LyCGWSrhYdQ2xnq0L0sjg6VOdM6OyFxrZC3HU69m+PXqIhWMpGw/m8V6W7//uM1RX2GQrB/mgJ1Ce0Q==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-darwin-arm64/-/core-darwin-arm64-0.4.1.tgz", + "integrity": "sha512-ocs73hj9n0zLArOTpUWIXCWU6ERThG+3wQzO78EvfaR4hb5FRrDHGKWTzXpr6ukSKsUtKdztK5XYTPsJ5e3vww==", "cpu": [ "arm64" ], @@ -1330,9 +1332,9 @@ ] }, "node_modules/@opentui/core-darwin-x64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-darwin-x64/-/core-darwin-x64-0.4.0.tgz", - "integrity": "sha512-/3goEuLFxn9df4fsLw9MSzbp8T3Rcs0NltCS3k73LcCb27pBmHH2FFNDKIj96m5ktK2JIWglEXcX85/i1qy4ug==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-darwin-x64/-/core-darwin-x64-0.4.1.tgz", + "integrity": "sha512-YogRtDBfxGeOkcSHDMsGkKFBIt3cWPMPGNu2AmEN6a5KKjDYwAZCudwbDJaUbZDCJjfAUHz9iXjhJVXJBXs9vQ==", "cpu": [ "x64" ], @@ -1343,9 +1345,9 @@ ] }, "node_modules/@opentui/core-linux-arm64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-linux-arm64/-/core-linux-arm64-0.4.0.tgz", - "integrity": "sha512-KBv05c0e+FRUpPKRqrE5bDmmIhiJsho43EDXJuYOUYJAuGsTii8J8ws0Q4GYBIxZa/atG1Wv3rEKR7+RSd29lA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-linux-arm64/-/core-linux-arm64-0.4.1.tgz", + "integrity": "sha512-sBZTS1eEGeVSQ8fAmDALKQcT7FckrhK64oHfEO7W0lJ+lXapfJuOKtTM33na54V56GAM9guk4RD4cbPeTXEh4g==", "cpu": [ "arm64" ], @@ -1356,9 +1358,9 @@ ] }, "node_modules/@opentui/core-linux-arm64-musl": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-linux-arm64-musl/-/core-linux-arm64-musl-0.4.0.tgz", - "integrity": "sha512-8SL+HCpXc1Ott4MYfPzBdNM6XUhknBlqAKOmdDnTxkFSnnadJxhBJo+JYX1jxQP/lkd3jKUpEKDc51k9wud4tg==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-linux-arm64-musl/-/core-linux-arm64-musl-0.4.1.tgz", + "integrity": "sha512-Eps9qB+vQ/Lel4ZYqMH87Um9oiU17Vu4oWzvRi40Yf+69vA1a3R4D7KUCeY3OxKWnRnwAHkMU9TxNnjKngPH/w==", "cpu": [ "arm64" ], @@ -1372,9 +1374,9 @@ ] }, "node_modules/@opentui/core-linux-x64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-linux-x64/-/core-linux-x64-0.4.0.tgz", - "integrity": "sha512-n2aZdF2vkzXyV0C0JL9Ok3EDImtWqewZVcFutMkCRK+EQk3a4oa+bl2Y07XpxGN8FZyJxS+R/HWSoDbKBNKDAg==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-linux-x64/-/core-linux-x64-0.4.1.tgz", + "integrity": "sha512-9/xjYGzX5RdUl0qmGQY0OCayjJ4VffDhsBmApQdseUkMT6LGL3RumI4zPK3Y9vo1fuy6ffLnriLFOktOgutXDg==", "cpu": [ "x64" ], @@ -1385,9 +1387,9 @@ ] }, "node_modules/@opentui/core-linux-x64-musl": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-linux-x64-musl/-/core-linux-x64-musl-0.4.0.tgz", - "integrity": "sha512-EpBHP5S8O83VgI4YIM/CPZTUVIGJjYyk+dcYJl76phtRYF4CwZTvomQqyHb0lzXGZ7LwSDoQxsWtLs/hEOVyPA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-linux-x64-musl/-/core-linux-x64-musl-0.4.1.tgz", + "integrity": "sha512-UYcp8XGX4DZXN+VYUVuCrJkbFMJ0L+VUVu0t5KqqaeJ74fI4NZ+DmwNqPPg1+C+EIzoW4QChlEUdhlZRdiEQiA==", "cpu": [ "x64" ], @@ -1401,9 +1403,9 @@ ] }, "node_modules/@opentui/core-win32-arm64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-win32-arm64/-/core-win32-arm64-0.4.0.tgz", - "integrity": "sha512-nUoKrHTHDMyqDGSqN7XfKvjaevgS460Pd99tzLCY4rTZcyDTdEUDfnLgEQrkURRCfUsBbwB1lNnq1aP4u+GeZQ==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-win32-arm64/-/core-win32-arm64-0.4.1.tgz", + "integrity": "sha512-hkIbpUJcKd4iLetTygPlFS45teOBTto49aXuxNeafYQUNd3ehiSwJENNBlAGULLfq+KP3dMJoWUiOcbuPVOQRA==", "cpu": [ "arm64" ], @@ -1414,9 +1416,9 @@ ] }, "node_modules/@opentui/core-win32-x64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/core-win32-x64/-/core-win32-x64-0.4.0.tgz", - "integrity": "sha512-3uHjGfgjhw+tyxDoF6bs11Gbrt+8VP7k6vAMm9Qyvd8cExDFaNcR1E5Tf/6yR7oxGfh9E951ALue8M7h6l/lLQ==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/core-win32-x64/-/core-win32-x64-0.4.1.tgz", + "integrity": "sha512-s1kGBcloy4ksl3wFCMqqOUFtXWlTTpzxe6pkLFhFhzgqKsMXHE9pwebiS3pzJkkFUxah5MYG+kbcn2Dw2Gdncg==", "cpu": [ "x64" ], @@ -1427,16 +1429,16 @@ ] }, "node_modules/@opentui/keymap": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/keymap/-/keymap-0.4.0.tgz", - "integrity": "sha512-RAa+cN4EYNVXmCFlngAGzs5rA69M9aIR7F2uLDk9q/NVKsSy7r0p+hnaHhFc5G28aNtaTk6/OrnFmCk6YXVk4g==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/keymap/-/keymap-0.4.1.tgz", + "integrity": "sha512-4Wds3HynfTPURawkdlO8CjrzfSvxSF5RO2jlpv6etT+JTQjKSKdVrBcza6N77qWqKy0Qi0D/u2yuN6aTUJ0Z7Q==", "license": "MIT", "dependencies": { - "@opentui/core": "0.4.0" + "@opentui/core": "0.4.1" }, "peerDependencies": { - "@opentui/react": "0.4.0", - "@opentui/solid": "0.4.0", + "@opentui/react": "0.4.1", + "@opentui/solid": "0.4.1", "react": ">=19.2.0", "solid-js": "1.9.12" }, @@ -1456,14 +1458,14 @@ } }, "node_modules/@opentui/solid": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@opentui/solid/-/solid-0.4.0.tgz", - "integrity": "sha512-tWzJ5PSi7txgbG+4h6vZ3FuTpa/gujQ4D0B4G9LmXddKUq/8lcUBJMHSSEdzSTcIO9fJAOSke2HKK9lsYZ0/fQ==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@opentui/solid/-/solid-0.4.1.tgz", + "integrity": "sha512-CD3M3mlUFwy2r8fd43MFY8kR7bFO+CfL1LHjV6+adp7T4jpadb9zuhfKKJpMzSdgAqQof+F5ifGMx6RljiCmwQ==", "license": "MIT", "dependencies": { "@babel/core": "7.28.0", "@babel/preset-typescript": "7.27.1", - "@opentui/core": "0.4.0", + "@opentui/core": "0.4.1", "babel-plugin-module-resolver": "5.0.2", "babel-preset-solid": "1.9.12", "entities": "7.0.1", @@ -4912,12 +4914,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/yoga-layout": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz", - "integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==", - "license": "MIT" } } } diff --git a/ui-opentui/package.json b/ui-opentui/package.json index 21604f0bbe4..f8c638efceb 100644 --- a/ui-opentui/package.json +++ b/ui-opentui/package.json @@ -20,9 +20,9 @@ "dev": "node scripts/build.mjs && node --experimental-ffi --no-warnings dist/main.js" }, "dependencies": { - "@opentui/core": "0.4.0", - "@opentui/keymap": "0.4.0", - "@opentui/solid": "0.4.0", + "@opentui/core": "0.4.1", + "@opentui/keymap": "0.4.1", + "@opentui/solid": "0.4.1", "effect": "4.0.0-beta.78", "fuzzysort": "^3.1.0", "solid-js": "1.9.12" diff --git a/ui-opentui/src/boundary/renderer.ts b/ui-opentui/src/boundary/renderer.ts index 0411a495352..35db77b8d7f 100644 --- a/ui-opentui/src/boundary/renderer.ts +++ b/ui-opentui/src/boundary/renderer.ts @@ -82,6 +82,15 @@ export const acquireRenderer = Effect.fn('Renderer.acquire')(function* (options: // scrollbox clips growing output → no terminal-scrollback corruption (gotcha §8 #2). externalOutputMode: 'passthrough', targetFps: 60, + // Don't let core's uncaught-error handler call the ALLOCATING + // `console.show()` (0.4.1 public option; defaults true-in-dev). That + // call needs a native handle, so under handle-table exhaustion — the + // very condition being reported — it throws and exit-7-masks the + // original error (the bench mem3000 postmortem). Disabling it removes + // that failure mode at the source; `guardRendererErrorHandlers` below + // stays as belt-and-suspenders (honest logging if any core handler + // still throws), but is no longer load-bearing for the exit-7 mask. + openConsoleOnError: false, // prompts own Ctrl+C → deny/cancel (gotcha §8 #6); the global quit is gated on !blocked. exitOnCtrlC: false, // OpenTUI's default exitSignals include SIGPIPE + SIGBUS, and its handler