Skip to content

fix(features): enable ImeMarkedText on macOS regardless of release_bundle#10547

Open
spalagu wants to merge 1 commit into
warpdotdev:masterfrom
spalagu:fix/oss-enable-ime-marked-text
Open

fix(features): enable ImeMarkedText on macOS regardless of release_bundle#10547
spalagu wants to merge 1 commit into
warpdotdev:masterfrom
spalagu:fix/oss-enable-ime-marked-text

Conversation

@spalagu
Copy link
Copy Markdown

@spalagu spalagu commented May 9, 2026

Summary

Without FeatureFlag::ImeMarkedText, setMarkedText: callbacks from the macOS input system are short-circuited inside the terminal view (set_marked_text_on_terminal early-returns) and no IME preedit is ever drawn. That breaks text input for any user typing through an IME — CJK pinyin / wubi, Japanese kana / romaji, Korean hangul, dead-key Latin (French / German / Spanish / Vietnamese), macOS auto-correct candidates, emoji candidate windows, etc.

Visible symptom: typing pinyin shows no Latin preedit characters in the input box; the only thing that appears is the final committed Chinese after picking a candidate. Effectively, CJK users can't type at all in OSS macOS builds.

Why this only affects OSS

Stable / Preview macOS get this flag via RELEASE_FLAGS because they build with cfg!(feature = "release_bundle") — so the rendering code path is well-exercised and stable. The OSS distribution simply doesn't pass that cargo feature when running cargo bundle --bin warp-oss --features gui, so is_release_bundle() returns false, RELEASE_FLAGS is never extended, and macOS OSS users lose IME entirely.

Repro (before this patch)

cargo bundle --bin warp-oss --features gui --release
cp -R target/release/bundle/osx/WarpOss.app /Applications/
open /Applications/WarpOss.app

Type pinyin into any TUI input (zsh, vim, Claude Code, etc.) inside WarpOss.

  • Expected: Latin letters of the in-progress pinyin appear inline (typically underlined).
  • Actual: nothing appears until a Chinese candidate is committed.

Fix

Insert FeatureFlag::ImeMarkedText unconditionally for macOS in enabled_features(), after the release-bundle gate. Matches the existing #[cfg(target_os = "macos")] guard in RELEASE_FLAGS so behavior on Linux / Windows is unchanged (their marked-text paths are separate and gated by their own platform-specific work, e.g. #9602 for Linux/Wayland IME enable).

9 lines added, no other changes.

Verification

  • cargo check -p warp --bin warp-oss --features gui clean (0 errors).
  • Manual repro on a re-built bundle: IME preedit now renders inline correctly across pinyin / Japanese / Korean test cases.

Notes

This is functionally equivalent to passing --features release_bundle at build time, but scoped to just the IME rendering flag rather than also turning on Autoupdate / Changelog / CrashReporting / SshRemoteServer (each of which has its own cargo-feature dependencies and may not be desired for OSS bundles).

Linux / Windows are unaffected by this change. Their respective IME paths are tracked elsewhere — Linux/Wayland enable in #9602, Windows IMM32/TSF would need a separate implementation.

…ndle

Without this flag, `setMarkedText:` callbacks from the macOS input system
are short-circuited inside the terminal view (`set_marked_text_on_terminal`
returns early) and no IME preedit is ever drawn. That breaks text input
for any user typing through an IME — CJK pinyin / wubi, Japanese kana /
romaji, Korean hangul, dead-key Latin (French / German / Spanish /
Vietnamese), macOS auto-correct candidates, emoji candidate windows, etc.
Visible symptom: typing pinyin shows no Latin preedit characters in the
input box; the only thing that ever appears is the final committed Chinese
characters after picking a candidate. Effectively, CJK users can't type at
all in OSS macOS builds.

Stable / Preview macOS already get this flag via `RELEASE_FLAGS` because
they build with `cfg!(feature = "release_bundle")` — so the rendering code
path is well-exercised and stable. The OSS distribution simply doesn't pass
that cargo feature when running `cargo bundle --bin warp-oss --features
gui`, so `is_release_bundle()` returns false, `RELEASE_FLAGS` is never
extended, and macOS OSS users lose IME entirely.

Fix: insert `FeatureFlag::ImeMarkedText` unconditionally for macOS in
`enabled_features()`, after the release-bundle gate. This matches the
existing `#[cfg(target_os = "macos")]` guard in `RELEASE_FLAGS` so the
behavior on Linux / Windows is unchanged (their marked-text paths are
separate and gated by their own platform-specific work, e.g. warpdotdev#9602 for
Linux/Wayland IME enable).

## Repro (before this patch)

`cargo bundle --bin warp-oss --features gui --release`, install /Applications,
launch in macOS, type pinyin into any TUI input (zsh, vim, Claude Code, etc.).
Expected: Latin letters of the in-progress pinyin appear inline (often
underlined). Actual: nothing appears until a Chinese candidate is committed.

## Verification

`cargo check -p warp --bin warp-oss --features gui` clean. Manual repro on
a re-built bundle: IME preedit now renders inline correctly.

## Notes

This is functionally equivalent to passing `--features release_bundle` at
build time, but scoped to just the IME rendering flag rather than also
turning on `Autoupdate` / `Changelog` / `CrashReporting` / `SshRemoteServer`
(which all have their own cargo-feature dependencies and may not be desired
for OSS bundles).
@cla-bot cla-bot Bot added the cla-signed label May 9, 2026
@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 9, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 9, 2026

@spalagu

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR enables FeatureFlag::ImeMarkedText for macOS builds regardless of the release_bundle feature, preserving the existing release-bundle behavior while restoring IME marked-text rendering for OSS macOS bundles.

Concerns

  • No blocking correctness or security concerns found in the changed hunk.
  • No single eligible bare-login reviewer could be selected from the provided stakeholder rules for app/src/lib.rs; the only matching rule is the catch-all team owner.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested review from a team and peicodes and removed request for a team May 9, 2026 04:18
@spalagu spalagu closed this May 9, 2026
@spalagu spalagu deleted the fix/oss-enable-ime-marked-text branch May 9, 2026 09:58
@spalagu spalagu restored the fix/oss-enable-ime-marked-text branch May 9, 2026 10:11
@spalagu spalagu reopened this May 9, 2026
@spalagu
Copy link
Copy Markdown
Author

spalagu commented May 9, 2026

Sorry — the source branch was accidentally deleted during a downstream cleanup, which auto-closed this PR. Branch is restored to the same head SHA f165a9f6 and the PR is reopened. No content has changed; please continue review where it left off.

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 9, 2026

@spalagu

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR enables FeatureFlag::ImeMarkedText unconditionally for macOS in enabled_features(), so macOS OSS builds get the same IME marked-text rendering path that release bundles already receive through RELEASE_FLAGS.

Concerns

  • No blocking correctness or security concerns found in the annotated diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested a review from a team May 9, 2026 10:15
@vkodithala vkodithala requested review from abhishekp106 and removed request for a team and peicodes May 11, 2026 18:50
Copy link
Copy Markdown
Contributor

@abhishekp106 adding you here since you have the most context re: IME!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants