Skip to content

build(deps): GPUI Kit 0.7.1 on gpui-fast v0.1.0; composer dictation via gpui-component speech - #598

Merged
Tryanks merged 3 commits into
mainfrom
feat/gpui-upgrade
Oct 6, 2026
Merged

Tryanks merged 3 commits into
mainfrom
feat/gpui-upgrade

Conversation

@Tryanks

@Tryanks Tryanks commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

Two things, one lock: GPUI Kit 0.7.1 requires gpui-pre 0.3.8, and the speech module that replaces crates/voice ships in gpui-component 0.7.1.

 Cargo.toml [patch.crates-io] gpui-pre* → git gpui-fast   (1b381adb → 3755a552 = v0.1.0, zed a1b7107)
 crates/ui/Cargo.toml
-  gpui-base 0.7.0, gpui-kit-assets 0.7.0, gpui-component-macros 0.7.0, gpui-wry 0.7.0
+  gpui-base 0.7.1, gpui-kit-assets 0.7.1, gpui-component-macros 0.7.1, gpui-wry 0.7.1
+  gpui-component 0.7.1 (features = ["speech"], optional)   # enabled by `voice` (desktop only)
-  voice = ["dep:tcode-voice"]            # macOS 26 only, Swift shim
+  voice = ["dep:gpui-component"]         # macOS 13+, Windows; Linux has no system recognizer
-crates/voice/                            # Rust + Swift SpeechAnalyzer shim, SDK-26 build.rs
+crates/app/Info.plist                    # usage descriptions embedded into the unbundled binary

Upstream API changes needed three call-site fixes: wrap_line gained an indent argument (markdown inline flow), RequestFrameOptions gained signal fields and WgpuRenderer::gpu_specs returns Option (iOS and Android backends).

gpui-fast v0.1.0 is now on crates.io, but gpui-kit still pins gpui-pre, and a [patch] cannot redirect to a differently named registry crate, so the git patch stays as gpui-fast's compat README documents; only the lock moves.

Composer dictation now runs on the kit's session state; Tcode keeps only editor bookkeeping:

mic click → SpeechState::toggle
  Started          focus textarea, anchor = cursor
  Partial / Final  replace anchor..anchor+last_len with the whole transcript
                   (abort if the editor value is not what we last wrote)
  Escape           stop (graceful, Final within the kit's 3 s timeout)
  typing / submit / destination switch / teardown
                   cancel at once, text already in the editor stays

The kit's SpeechButton/SpeechWaveform read gpui-component's theme global, which Tcode does not initialise, so the mic stays Tcode's own button over SpeechState::levels(); the site names that gap.

Evidence

  • Before: mic button only on macOS 26 with an SDK-26 toolchain; transcript_edit unit test owned the old chunk arithmetic.
    After: cargo nextest run --workspace --locked → 889 passed, 6 skipped. New dictation_revises_the_draft_and_cannot_overwrite_edits_or_submission drives the real composer through the kit's SpeechRecognizer/AudioInput seams: UTF-8 anchored insertion, longer/shorter/empty revisions, Final without duplication, typing cancels, Escape → Stopping, submit while Stopping ignores late results.
  • fmt, clippy -D warnings, machete, and RUSTFLAGS=-D warnings checks for iOS sim, wasm and Android NDK all pass locally; the mobile/web lock graphs contain no gpui-component, cpal or oboe.
  • Desktop app launched with a throwaway TCODE_DATA_DIR; mic button present and legible in both themes, wide and narrow. otool confirms __TEXT,__info_plist in the dev binary.
  • Not verified: live recognition on this Mac (the TCC prompt could not be accepted from automation), Windows and Linux runtime, and SFSpeechRecognizer vs SpeechAnalyzer quality. crates/voice stays in history and the kit's recognizer seam allows bringing it back if a real gap shows.

Merge Danger

Door: two-way

Revert restores the Swift engine and the previous lock. No data or protocol changes.

Blast Radius: desktop

Every desktop build takes gpui-component (+39 lock entries, cpal needs libasound2-dev on Linux, already in CI). Windows dictation sends audio to Microsoft's online service; macOS stays on-device. Any GPUI rendering difference from the 84 gpui-fast commits reaches all platforms; the full test suite and smoke launch showed none.

…ia gpui-component speech

Upgrade gpui-base, gpui-kit-assets, gpui-component-macros and gpui-wry to
0.7.1, the gpui-pre family to 0.3.8 and the gpui-fast patch to 3755a552
(v0.1.0, zed a1b7107). Three call sites follow upstream API changes:
wrap_line's indent argument, RequestFrameOptions' signal fields and the
optional WgpuRenderer gpu_specs on iOS and Android.

Replace the macOS-26-only SpeechAnalyzer shim (crates/voice) with
gpui-component's speech module: SpeechState with the system recognizer
(SFSpeechRecognizer on macOS 13+, Windows.Media.SpeechRecognition on
Windows; none on Linux, so the mic button is absent there) and the cpal
microphone. The composer keeps its own styled mic button over the kit
state and replaces the session's whole transcript at an anchor; user
edits, submit, destination switches and teardown cancel in place. The
desktop binary embeds the usage descriptions so cargo run can ask for
permission.
…types

gpui-base 0.7.1 pulls windows 0.58, which gpu-allocator 0.28 also accepts,
so the resolver unified it there; wgpu-hal 29 needs the 0.62 types (#555).
@Tryanks
Tryanks merged commit a563c9f into main Oct 6, 2026
7 checks passed
@Tryanks
Tryanks deleted the feat/gpui-upgrade branch October 6, 2026 08:39
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.

1 participant