Skip to content

chore(nsh): sync upstream through a901baa2e (0.7.2) - #7325

Merged
M4n5ter merged 1 commit into
mainfrom
chore/sync-nsh-upstream
Nov 27, 2026
Merged

M4n5ter merged 1 commit into
mainfrom
chore/sync-nsh-upstream

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Synchronize third-party/nsh with upstream longbridge/nsh from 3f8ecd8b3 (0.7.0) through a901baa2e (0.7.2 + post-0.7.2 fixes), remove local patches now implemented upstream, migrate Maka consumers to upstream canonical APIs, and fix a Windows RichEdit caret-alignment regression surfaced during native desktop verification.

Upstreamed Local Patches Removed & Consumers Migrated

  • Caller-scoped Host events (#3357): Removed Maka's local HostChannel::send_to_caller, caller_detached, and Message::CallerHostEvent in nsh-engine; migrated products/maka/ios-shell/src/bridge.rs to upstream HostCall::sender() -> HostSender (HostSender::send, HostSender::closed()).
  • iOS AppOptions::host & touch gesture fix (#3354, #3420): Adopted upstream AppOptions::host, restoring nsh-ios-host to upstream and keeping only AppOptions::runtime in nsh-platform-ios, and removed the local touch.rs patch now upstreamed in #3420.
  • TextView renderImage & terminal images (#3359, #3260, #3372, #3290): Adopted upstream InContext<Image, TextViewImageContext> two-argument renderImage(image, context), terminal block images, loadable()/alt_text() fallback, and merge_styles; migrated MarkdownBody.tsx, BotReply.tsx, and spec/components.tsx.
  • Bundler unresolved-import errors (#3425): Removed the local fail_on_unresolved_imports knob in nsh-bundler, nsh-cli, and tools/ui-build now that upstream errors on unresolved imports by default.
  • Touch selection & Windows IME association (#3380, #3411): Removed superseded local patches in nsh-core/src/core/components.rs and nsh-platform-windows/src/richedit.rs.
  • List display: none retention (#3193) & misc cleanups: Removed unreachable local list_hidden branches in nsh-core, duplicate serve_files in nsh-cli/src/dev.rs, dead read_uris in nsh-platform-macos/src/file_drop.rs (#3385), redundant sight::moved() in nsh-platform-macos/src/mount.rs (#3386), and duplicate .auto_focus(...) in RichEditor.
  • RichEditor onReadonlyInput (#3371): Preserved upstream default behavior (keeping the hidden sink editable so onReadonlyInput works) and added opt-in readonly_sink used by products/maka/workbench/src/composer_input.rs so embedded hosts withhold IME admission for read-only composers.
  • Windows RichEdit caret alignment on small layout shifts: Upstream #3411 follows the view's window position during draw(), updating RichEdit's client rectangle on layout shifts. When a focused field shifts by less than its own height, RichEdit does not re-issue TxSetCaretPos on TXTBIT_CLIENTRECTCHANGE or TxDrawD2D, leaving the cached caret offset by the shift. Translate the cached caret in Editor::shift_caret whenever the client rectangle moves (covered by a new a_small_move_keeps_the_caret_aligned_in_the_field unit test).
  • Provenance & notices: Updated LICENSE, third-party/nsh/{upstream.json,SOURCE.md}, lockfiles, and regenerated products/maka/cli/{DEPENDENCIES.rust.tsv,THIRD_PARTY_NOTICES.txt,notices.json}.

Verification

  • Repo checks: just fmt-check, just licenses, just migrations, just i18n, just typecheck, just test-js all pass.
  • macOS & iOS: cargo check --workspace --tests, cargo check -p maka-ios-shell --target aarch64-apple-ios-sim; nsh-core, nsh-base, nsh-js --all-features, nsh-engine --all-features, nsh-bundler, nsh-platform-tui, nsh-platform-macos (lib + native AppKit tests), nsh-testing --features bundle; maka-workbench, maka-desktop-shell, maka-terminal-shell --lib, maka-ios-shell, and maka-cli --features desktop-tests --test native-desktop (22/22 passed).
  • Linux: nsh-platform-linux --lib (261 passed, 0 failed), maka-desktop-shell (15 passed, 0 failed), maka-terminal-shell --lib (70 passed, 0 failed).
  • Windows: nsh-platform-windows --features terminal --lib (text_input::tests 29/29 including the new small-move caret test, richedit::tests + terminal::tests 10/10, and full non-headless-DComp suite passing), maka-desktop-shell (31 passed, 0 failed), and maka-cli --features desktop-tests --test native-desktop composer tests (desktop_composer_previews_markdown_and_sends_its_source, desktop_composer_click_and_ime_follow_the_text_after_a_mention, desktop_composer_large_paste_keeps_controls_on_screen, plus TOC/session/room/file-gesture tests) all passing.

@github-actions github-actions Bot added the effort/XXL Over 2500 readable lines label Nov 26, 2026
@M4n5ter M4n5ter changed the title chore(nsh): sync upstream through 708105de3 (0.7.1) chore(nsh): sync upstream through a901baa2e (0.7.2) Nov 27, 2026
Sync vendored third-party/nsh from 3f8ecd8b3 (0.7.0) through
a901baa2e (0.7.2 + post-0.7.2 fixes):

- Remove superseded local patches now provided upstream and migrate
  consumers to upstream canonical APIs:
  - nsh-engine / ios-shell: HostCall::sender() -> HostSender (#3357)
  - nsh-ios-host / nsh-platform-ios: AppOptions::host (#3354) and
    touch.rs gesture cancel fix (#3420)
  - TextView renderImage(image, context) & terminal images (#3359,
    #3260, #3372, #3290)
  - nsh-bundler / nsh-cli / ui-build: default unresolved-import errors
    (#3425)
  - nsh-core: list display: none retention (#3193) and touch-selection
    (#3380)
  - nsh-platform-macos: file_drop (#3385) and mount (#3386) cleanups
  - nsh-platform-windows: richedit.rs window-specific IME association
    (#3411)
- Preserve upstream RichEditor onReadonlyInput behavior (#3371) with
  opt-in readonly_sink for Maka's embedded composer.
- Fix a Windows RichEdit caret-alignment regression introduced with
  follow-on-draw (#3411): translate the cached caret when the client
  rectangle shifts (with a regression unit test).
- Update third-party/nsh provenance (upstream.json, SOURCE.md),
  Cargo.lock files, LICENSE, and CLI dependency notices.

Generated-by: Maka (Gemini)
@M4n5ter
M4n5ter force-pushed the chore/sync-nsh-upstream branch from f3c7dc0 to afc9793 Compare November 27, 2026 04:54
@M4n5ter
M4n5ter merged commit a4dbeb3 into main Nov 27, 2026
3 checks passed
@M4n5ter
M4n5ter deleted the chore/sync-nsh-upstream branch November 27, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XXL Over 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants