Skip to content

Merge train 175: #10162, #10157 - #10163

Merged
proggeramlug merged 5 commits into
mainfrom
train175
Sep 13, 2026
Merged

proggeramlug merged 5 commits into
mainfrom
train175

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Merge train 175: lands #10162 (fix for #10160, live self-namespace re-exports) at head 149c1a6589 and #10157 (fix for #10155, macOS TextField single-line) at head 9316513941, plus the workspace version bump to 0.5.1546.

The four commits were cherry-picked onto 8a058e2053, and each matches its PR commit by git patch-id --stable.

Local validation on macOS:

  • cargo fmt --all -- --check, check_file_size.sh, check_test_registration.py, and check_changeset_fragment.sh for 10162 and 10157
  • RUSTFLAGS=-Dwarnings cargo check -p perry-ui-macos and -p perry --bins
  • cargo test --release -p perry-codegen: 1984 passed
  • after building -p perry -p perry-runtime-static -p perry-stdlib-static -p perry-ui-macos: cargo test --release -p perry --test source_graph_export_regressions: 24 passed, including issue_10160::{self_namespace_reexport_is_defined_on_a_dynamic_import_namespace, self_namespace_reexport_is_defined_on_a_static_star_import, foreign_namespace_reexport_stays_intact_on_a_dynamic_import_namespace}
  • perry compile test-files/test_issue_10155_textfield_singleline.ts compiles and links against the native macOS UI

PR CI (runs 34738467784 for #10162 and 34739880996 for #10157): every red job fails identically on main at 8a058e2053 (run 34735295430). That covers the same lint/check/warnings steps with identical errors, the same cargo-test failing test on #10157 (green on #10162), the same four gated gap regressions with identical output, and the same single gc-stress failure. #10157's zizmor failure is main's own finding: one high dangerous-triggers in .github/workflows/gate-failure-watch.yml, which neither PR touches, and it is reported identically on main. e2e-scoped passes on both.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed macOS TextField controls wrapping onto multiple lines when text exceeds the available width. Text now remains on one line and scrolls horizontally.
    • Fixed dynamic namespace imports for self-referential namespace exports, preventing missing or undefined namespace entries.
  • Tests

    • Added regression coverage for macOS single-line text fields and namespace re-exports.

Ralph Küpper and others added 5 commits September 13, 2026 07:21
…0160)

`export * as Self from "./self"` lowered to a NestedNamespace entry whose
value was a plain load of the module's own `@__perry_ns_<prefix>` global —
inside the populator that builds that very namespace, before the global is
stored. The dynamic `import()` namespace therefore carried the key with an
`undefined` value while the static import path still resolved. OpenCode
uses this self re-export in 265 modules and reads it through dynamic
imports in its command bootstrap, so every real command failed with
`Cannot read properties of undefined (reading 'Service')`.

Self-referencing entries are now published like LocalVar/ForeignVar live
bindings: the populator marks them live and hands `js_create_namespace` a
getter singleton, and the getter wrapper loads the namespace global at read
time. Foreign `export * as` entries keep the direct load.

Claude-Session: https://claude.ai/code/session_01GixUo7gwcatEk4kibdeCWF
(cherry picked from commit 149c1a6)
macOS was the only backend where an editable TextField wrapped to
multiple lines when its text was wider than the field. AppKit's
textFieldWithString: returns a cell configured to wrap and grow, and
create() never overrode it, so a fixed-width field grew tall instead of
scrolling — misrendering single-line input like URLs, paths, and queries.

Configure the cell for single-line editing in create(), matching Android's
setSingleLine and the inherently single-line iOS/GTK4/Windows widgets:
usesSingleLineMode, scrollable, wraps=false, and a clipping line-break mode.
Multiline input keeps its own widget, TextArea.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xtg8NkGmpuLTNT959dJp6
(cherry picked from commit bf8de14)
…0157)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xtg8NkGmpuLTNT959dJp6
(cherry picked from commit 57469bc)
test_issue_10155_textfield_singleline imports perry/ui and needs
--target macos to link perry-ui-macos. The Linux compile-smoke's bare
`perry foo.ts -o out` path can't link those symbols, so add it to
SKIP_TESTS alongside the other macOS UI repros (640, 763).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xtg8NkGmpuLTNT959dJp6
(cherry picked from commit 9316513)
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 8d428707-6261-4612-890b-42f89e436dc8

📥 Commits

Reviewing files that changed from the base of the PR and between 8a058e2 and 20f91ac.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • .github/workflows/test.yml
  • CLAUDE.md
  • Cargo.toml
  • changelog.d/10157-macos-textfield-single-line.md
  • changelog.d/10160-self-namespace-dynamic-import.md
  • crates/perry-codegen/src/codegen/artifacts.rs
  • crates/perry-codegen/src/codegen/helpers.rs
  • crates/perry-ui-macos/src/widgets/textfield.rs
  • crates/perry/tests/source_graph_export_regressions.rs
  • crates/perry/tests/source_graph_export_regressions/issue_10160.rs
  • test-files/test_issue_10155_textfield_singleline.ts

📝 Walkthrough

Walkthrough

The pull request fixes self-referential namespace exports and configures macOS TextField controls for single-line horizontal scrolling. It adds regression coverage, changelog entries, compile-smoke configuration, and updates the workspace version to 0.5.1546.

Changes

Functional fixes

Layer / File(s) Summary
Self-referential namespace exports
crates/perry-codegen/src/codegen/artifacts.rs, crates/perry-codegen/src/codegen/helpers.rs, crates/perry/tests/source_graph_export_regressions.rs, crates/perry/tests/source_graph_export_regressions/issue_10160.rs, changelog.d/10160-self-namespace-dynamic-import.md
Namespace generation now uses live getter wrappers for self-referential nested namespaces. Regression tests cover dynamic imports, static star imports, and foreign re-exports.
macOS single-line text fields
crates/perry-ui-macos/src/widgets/textfield.rs, test-files/test_issue_10155_textfield_singleline.ts, .github/workflows/test.yml, changelog.d/10157-macos-textfield-single-line.md
The macOS text field cell now enables single-line mode and horizontal scrolling, disables wrapping, and clips line breaks. A fixed-width smoke test and compile-smoke configuration were added.

Release metadata

Layer / File(s) Summary
Version update
Cargo.toml, CLAUDE.md
The workspace package version and documented current version changed from 0.5.1545 to 0.5.1546.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: jdalton

Sequence Diagram(s)

sequenceDiagram
  participant DynamicImport
  participant NamespacePopulator
  participant js_create_namespace
  DynamicImport->>NamespacePopulator: load self-namespace export
  NamespacePopulator->>js_create_namespace: create namespace with live getter
  js_create_namespace-->>DynamicImport: store namespace and resolve export
Loading
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch train175

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.

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.

2 participants