[codex] Fix OpenTUI native render lowering#4183
Merged
proggeramlug merged 1 commit intoJun 3, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the remaining generic Perry-native OpenTUI render smoke blocker after #4150 by correcting three scoped lowering/runtime-shape issues exercised by the render path:
Arraystatic types to use array receiver loweringobj.arrayProp[index] = valuethrough the existingIndexSetfast path when target and receiver property paths matchsuper()in a derived constructor fail when the constructor was reached through a closure-creatednew Cache()pathThis is scoped to generic OpenTUI render/input/update/clean-teardown evidence. It does not claim actual OpenCode native completion.
#4176 comparison
I compared #4176 (
addf0430271e2efa97a2e7ceea7d8f8d144e9065,crates/perry-runtime/src/proxy.rs) against the previously validated safe OpenTUI patch. #4176 is only a subset and was not sufficient for the generic OpenTUI lane:ReferenceError: identifier is not definedSo this PR keeps the complete scoped compiler-side fix instead of the unsafe exploratory PutValue route.
Validation
cargo fmtcargo build --release -p perrycargo build --release -p perry-runtimecargo build --release -p perry-stdlibPERRY_RUNTIME_DIR=/tmp/perry-opentui-render-pr/target/release tests/test_issue_4150_array_property_index_set.shPERRY_RUNTIME_DIR=/tmp/perry-opentui-render-pr/target/release tests/test_issue_4150_new_array_index_set.shPERRY_RUNTIME_DIR=/tmp/perry-opentui-render-pr/target/release tests/test_issue_4150_derived_constructor_arrow_new.shrepro-perry-renderlib-drawtext.tsreached expectedbefore/aftervisible buffer textcd /Users/andrew/Documents/opentui/packages/core PERRY_BIN=/tmp/perry-opentui-render-pr/target/release/perry \ OTUI_PERRY_NATIVE_SMOKE_DIAGNOSTICS=1 \ bun scripts/perry-native-smoke.ts --compile-timeout-ms 120000 --keep-tempObserved output: