github longbridge/nsh v0.7.0
nsh v0.7.0

one hour ago

A large release: 606 pull requests since v0.6.0 from 76 contributors (fixes already shipped in v0.6.1 are included). Highlights are independent desktop windows with app quit modes, NSH modules (nshm) installed with nsh add and locked in nsh.lock, the official nsh-extra modules (camera, push, photos, speech, location), nsh publish to the App Store, Google Play, Flathub and the Microsoft Store, a built-in update prompt with resumable and delta downloads, and a RichEditor aligned with Tiptap.

New Features

  • Desktop lifecycle: application.quitMode and Application.setQuitMode(), reopen / lastWindowClosed / cancellable quitRequest events, per-window key bindings (#2307); TitleBar in nsh/base for windows with a hidden title bar, kept clear of the window controls (#2937).
  • NSH modules (nshm): nsh add, nsh remove and nsh upgrade install crates of components and modules from crates.io, GitHub, Git or a path, listed in nsh.json dependencies and locked in nsh.lock; installed modules build once per machine, so later runs start in about 0.2 s (#2349, #2521, #2522, #2733). nsh init --template mixed puts the app's Rust in an ext/ nshm (#2829).
  • nsh-extra: first-party modules with per-module features: camera (#2692), push on iOS and Android (#2729, #2818), photos and the embedded PhotosPicker on iOS (#2935, #2949), speech on every platform (#2947) and location on macOS, iOS and the web (#3070).
  • Publishing and packaging: nsh publish ios|android|linux|windows uploads to the App Store / TestFlight, Google Play, Flathub and the Microsoft Store from a store section in nsh.json, with nsh publish status (#3101, #3113, #3114). nsh package builds AppImage, Flatpak and MSIX (#3101). Android: adaptive icons, launch screen, android/res, android.permissions, android.libraries (jar, dex, AAR), queries and components (#2592, #2594, #2735, #2523, #2820, #2828). Apple: app extensions on iOS and macOS, localized Info.plist strings, a privacy manifest merged with NSH's own entries, crate-declared plist and entitlements (#2699, #2879, #2819, #2834, #3125, #2878). nsh.json gains links for Universal Links / App Links (#2537), entry, logDir, watch and timeZones (#2942, #3083, #2971, #3129).
  • Updater: a built-in update prompt, promptForUpdate({ quiet }), with release notes, skip, remind and install, also for Rust apps (#2346); downloads resume after interruption (#2489); apps on the previous version download a zstd patch (#2800); updates can change the app id or executable name (#2339).
  • Runtime APIs: network() for online state, link kind and metered state (#2875); Storage.on("change") across tabs and windows (#2844); AppSettings.open() on mobile (#2823); runtime addTranslations (#2806); AlertDialog.show({ input }) with the system text field (#2354); Rust host_call / host_post / on_host_event and app_info() (#2887, #2689); fetch's cache option (#2649); Android runtime permissions from Rust (#2536).
  • Input and gestures: captureKeys="text" forwards typing to the first Input in chat-style layouts (#2960); keymap.bind(..., { overFocused: true }) (#2755); Modifiers.altGraph (#2979); onFocusIn / onFocusOut (#2493); directional and edge pans (#2905); Android predictive back progress (#2915); smoothWheel / wheelLineHeight (#2661).
  • Files: file drop on the web, Android and iOS, and image drops from browsers and Mail on macOS (#2867, #2918, #2693, #2964); pasted and dropped files are readable without an fs root (#2968); pasteMaxSize (#2972); Android share-sheet targets for declared file types (#2902).
  • Styling and components: transitionable clipPath (#2894), accentColor (#2462), scrollbarInset (#2403); DataTable grow / autoFit and onRowActivate (#2743, #2872); Tabs orientation (#2873); Calendar / DatePicker range preview (#3086); Tree header and empty slots, DockArea handle and toolbar renderers (#2416, #2420, #2425); copyText for inline views and clearSelection() (#2697, #2585); WebView zoomable and allowOrigin (#3144, #3145); Windows 11 backdrop blur (#2471).
  • Rich editor: tables size columns to their content and scroll on their own, with row and column move grips (#3044, #2950); keyboard accessory bar on iOS (#2747).
  • Accessibility: live regions on every platform (#2816), tabpanel and textbox roles (#2952, #2958), state words spoken in the app's language (#2838), VoiceOver reaches inline links (#2876).
  • Terminal backend: images through the kitty graphics protocol or half blocks, pinned sticky headers, and roomier, clearer default styling (#2586, #2596, #2982, #2993).
  • CLI and testing: --device / ANDROID_SERIAL (#2675), nsh run --background (#2780), nsh test --jobs and --release (#2809, #2815), nsh dev --host (#2946), nsh check warns about unknown nsh.json keys (#2776); app.layout(), app.accessibility(), app.screenshot() on macOS and Linux, and pressing a given point (#2812, #2928, #2998).

Improvements

  • Performance: Taffy 0.16 makes first-frame layout 5–18% faster (#2989); many quadratic paths are now linear (mounting children, tooltips, list variants, long RichEditor documents) (#2347, #2413, #2616, #2962, #2768); RichEditor mounts only blocks near the viewport (#2796); long Markdown parses in parts (1.9 MB from ~21 s to under 1 s) (#2360); layout memory is about 20% lower on large tables (#2810); hot-update bytecode is about 84% smaller (#3064); on macOS, cached canvas text, layer-only text nodes and fewer system round trips (#3121, #3133, #2997).
  • Security: fetch drops credentials on cross-origin redirects (#2666); web view downloads stay within the allowed hosts (#2648); web view pop-ups respect the webview capability on Windows (#2423).
  • Android: apps survive activity recreation with pages, dialogs, scroll and focus intact (#3050); text selection, menus, Back on Android 13–15, keyboards and system bars all behave like native apps (#3019–#3023, #3047, #2986, #2630, #2602).
  • iOS: modals, sheets and system UI over a closing dialog behave correctly (#2745, #2821, #2969); multi-finger touches deliver every finger (#3152); keyboard, safe-area and navigation-bar fixes (#2850, #3123, #2822).
  • macOS: smooth window drags with edge tiling again (#2663); resizes no longer show stale content (#3132); multiline inputs hand unused scrolls to the outer scroll view (#2984, #3142); synthetic italic for CJK fonts (#3041, #3120).
  • Windows: multiline inputs, IME composition, fractional-DPI text and wheel gliding (#2672, #3024, #2931, #2690).
  • Linux: desktop font rendering settings, a multi-font crash fix, focus after modals and display-rate animations (#2396, #2508, #2671, #2943).
  • Web: on-demand loading of nsh/base parts and the shader compiler shrinks the main wasm module (#3081, #3122, #3146); TextView links are real <a href> (#2945); CSS zoom is respected (#3153).
  • Right-to-left, i18n and text: RTL fixes on Apple and Android (#2343, #2357, #2547), more month and weekday names (#2774), text-pretty everywhere (#2792), text typeset at the measured width (#2545).

Breaking Changes

  • Desktop windows close independently. Windows opened with <Window> / Window.open no longer close with the main window. Plain TSX roots get an implicit first window named main; Rust desktop roots must declare a window() to show content, and code that called main_window().close() to end the app should call quit(). The default application.quitMode is platform: macOS keeps running after the last window closes, Windows and Linux quit. (#2307)
  • Speech moved to nsh-extra. Run nsh add nsh-extra --features speech and import Speech from "nsh-extra"; in Rust use nsh_extra::speech::{available, recognize, set_backend}. iOS and macOS apps no longer get the microphone and speech usage descriptions unless the speech feature is on. Tests use app.fake("nsh-extra/speech", ...). (#2947)
  • nsh-extra follows the nsh that builds the app. A release pins it to its own version, a nightly to its commit; an nsh.json asking for a version the building nsh does not satisfy now fails up front. (#2980)
  • Focus and keys. On macOS and iOS a pointer press no longer moves keyboard focus to the pressed control, and pointer-opened menus no longer focus their trigger on close; call ref.focus() in onPress if you relied on it (#2783). With no focused view, raw key events start at the window root and bubble (#2414, #2574). Focused content whose captureKeys includes escape now gets Escape before an open Popover or Sheet (#2794). Pointer-opened menus take Down/Enter while an outside input is editing (#3080). macOS Tab skips disabled and focusable={false} inputs (#3038).
  • Events. Enter/Space and assistive-technology presses report clickCount: 0 (#2509). Linux media, volume and browser keys use UI Events names such as MediaPlayPause (#2459). On macOS and iOS, Notifications.on("press") fires only for notifications the app showed; others go to a native handler (#2700).
  • Results instead of silence. Clipboard.writeText / write resolve with "written" | "failed" | "requested", and the Rust setters return Answer<ClipboardWrite> (#2753). Web Storage.setItem rejects with ERR_NSH_QUOTA_EXCEEDED when the browser refuses a value; StorageBackend::write returns Result (#2408). checkForUpdate rejects when the updater feature is off but the app has an update configuration (#2641). open_auth_session fails at once on web, GPUI and the terminal backend (#2722). Without a host, host.call / host.post reject with ERR_ACCESS_DENIED (#2887).
  • Tree depth limit. Apps nesting views more than 1024 levels deep stop with an error instead of overflowing the stack; Rust ApplyError gains TooDeep (#2614).
  • RichEditor matches Tiptap. Enter keeps marks, input rules undo in two steps, string insertContent is parsed as HTML (use pasteHTML for a paste), setMark("textStyle") merges attributes, javascript: / data: links are dropped, and table HTML follows Tiptap's, so saved HTML can differ from before (#3089–#3099).
  • Components. Android ContextMenu with items shows the system popup menu instead of drawing its children (#2549). DockArea tabs sit in a scroll view: space tabs with a margin in tabClass, not gap (#2431). iOS web views play video inline (#2970).
  • Packaging. Linux and Windows packages leave out WebKitGTK / WebView2 unless the app makes a WebView; add "features": ["webview"] if the analysis can't see yours (#2397). A Rust app pinning nsh-core to a Git revision other than the running nsh's now stops with an error (#2721). Android native components must unwrap ContextWrappers to reach the Activity (#3050).
  • Rust API. New fields on public structs need ..Default::default() in literals: ScrollBehavior.scrollbar_inset, ScreenConfig.header_shadow_visible, HttpRequest.cache, AttributedText.copy_texts, Environment.scheme_links, KeyOptions / KeyBinding.over_focused, Effects.clip_path, PanActivation and EventPayload::Pan fields, Modifiers.alt_graph, InputConfig.paste_max_size, GPUI AppOptions.inline_root (#2403, #2404, #2649, #2697, #2722, #2755, #2894, #2905, #2979, #2972, #2974). AccessibilityRole gains TabPanel and Textbox (#2952, #2958). Updater host calls take a resume offset and Installation::install returns the new executable path (#2489, #2339). Bundle carries links: AppLinks instead of url_schemes (#2537). Dialog gains input and answers with a DialogReply (#2354). Testing drags take DragOptions (#2726). After set_host_tokens, GPUI embeds use the host's foreground colour for uncoloured text (#2569).
Contributors

@0x1306a94 @1havecoke @821869798 @aiiven @AkaraChen @alexwan02 @BeADre @Blackman99 @blueberrycongee @burdygin @chaxus @ClarkThan @Cooooooker @cosformula @daoleno @davo20019 @daydoing @Debbl @Duskriver @Geylnu @gilbertwong96 @haveanicedavid @Hermon000 @hexuria @hmziqrs @hsingjui @huacnlee @ihavecoke @itisvincent @jcdiv47 @jjyr @Joy-jinyu @jsiu93 @KeepNoob @kim0 @labcoder @LeeDashan @Lemenxzy @lnnduy @lurenjia534 @lyricat @M4n5ter @maanaskarwa @madcodelife @mengyinghu-sys @mrtolkien @NiceBlueChai @obito-t @PeatBoy @Petit-Iceberg @rankjie @razvangeangu @RebelBIrd @richerfu @Rosemary1812 @sunfuze @sunli829 @t4t5 @tacshi @teng-lin @ttizze @Tzyito @UncertaintyDeterminesYou4ndMe @villatothesea @wabzqem @wenlingang @wu21-web @yangkx1024 @yerlytech @YougLin-dev @youguanxinqing @yuanzhuang-svg @yuluod @YuniqueUnic @zbysir @ZZombiee

What's Changed
New Contributors

🤖 Noop (lead) · AI agent acting for @huacnlee

Don't miss a new nsh release

NewReleases is sending notifications on new releases.