You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the current behavior of Perry's perry/ui TextField where macOS input method "pre-editing/candidate hints (marked text)" display is incomplete: Chinese input can be committed normally, but during the input process, the system's "underline pre-editing + candidate hint floating window/tab" does not display as fully as in native apps
Thanks for the detailed report and the uUhat repro — that helped a lot. I tried to reproduce on my end and want to compare notes before fixing, because what I see doesn't match Figure 1.
Tested both your pre-built uUhat binary AND a fresh rebuild against current main (v0.5.224)
What I see
With the same wen input that produced your Figure 1, the candidate window shows up correctly with all 8 candidates (1.问 2.文 3.闻 4.👃 5.温 6.纹 7.稳 8.吻) and the paging chevron — both in your search TextField (popup appears below the field) and in the message TextArea (popup appears below the caret line, inside the view body — matches native NSTextView behavior).
I also tested a longer sequence (nihao) and it shows segmented marked text plus 1.你好 2.👋 3.你好吗 4.你号 ... correctly.
(Happy to attach side-by-side screenshots — they look indistinguishable from your Figure 2.)
Two hypotheses, can you help me narrow down?
Crop: Figure 1 is 958×218 — just tall enough to show the marked-text line. On macOS the candidate panel appears below the caret line, which inside a multi-line TextArea falls within the view's bounds (not below the whole view). If your screenshot was cropped right after the marked text, the popup might be just outside the visible region. A wider screenshot (say 300 px taller) would settle this.
Different IME: I only tested Apple SCIM. If you're on Sogou (搜狗), Rime, Squirrel, or another third-party IME, they sometimes use stricter coordinate queries (firstRectForCharacterRange:actualRange:) and a perry/ui bug there is plausible. Apple SCIM is more forgiving.
Could you share:
sw_vers output (macOS version)
Which input method — Apple SCIM Pinyin, or third-party? If third-party, which one + version
A wider screenshot showing ~200-300 px below the marked text — full window if possible
Whether the issue happens on the small TextField (the search box at the top of uUhat) too, or only on the TextArea (the message input at the bottom)
If it's third-party IME, I'll set that up here and trace the IME-protocol calls. With Apple SCIM I just can't reproduce on main.
At present, it is still very difficult to develop applications using this library with AI, possibly due to insufficient data and insufficient knowledge of AI big models
Thanks for the detailed report and the uUhat repro — that helped a lot. I tried to reproduce on my end and want to compare notes before fixing, because what I see doesn't match Figure 1.
Tested both your pre-built binary AND a fresh rebuild against current (v0.5.224)uUhat``main
What I see With the same input that produced your Figure 1, the candidate window shows up correctly with all 8 candidates (1.问 2.文 3.闻 4.👃 5.温 6.纹 7.稳 8.吻) and the paging chevron — both in your search (popup appears below the field) and in the message (popup appears below the caret line, inside the view body — matches native behavior).wen``TextField``TextArea``NSTextView
I also tested a longer sequence () and it shows segmented marked text plus correctly.nihao``1.你好 2.👋 3.你好吗 4.你号 ...
(Happy to attach side-by-side screenshots — they look indistinguishable from your Figure 2.)
Two hypotheses, can you help me narrow down?
Crop: Figure 1 is 958×218 — just tall enough to show the marked-text line. On macOS the candidate panel appears below the caret line, which inside a multi-line falls within the view's bounds (not below the whole view). If your screenshot was cropped right after the marked text, the popup might be just outside the visible region. A wider screenshot (say 300 px taller) would settle this.TextArea
Different IME: I only tested Apple SCIM. If you're on Sogou (搜狗), Rime, Squirrel, or another third-party IME, they sometimes use stricter coordinate queries () and a perry/ui bug there is plausible. Apple SCIM is more forgiving.firstRectForCharacterRange:actualRange:
Could you share:
sw_vers output (macOS version)
Which input method — Apple SCIM Pinyin, or third-party? If third-party, which one + version
A wider screenshot showing ~200-300 px below the marked text — full window if possible
Whether the issue happens on the small (the search box at the top of ) too, or only on the (the message input at the bottom)TextField``uUhat``TextArea
If it's third-party IME, I'll set that up here and trace the IME-protocol calls. With Apple SCIM I just can't reproduce on .main
I am using the input method that comes with my Apple laptop
Thanks for confirming Apple's built-in IME, macOS Tahoe 26.4.1, M5 — that helps narrow it.
I tried to reproduce on my end across every environment variant I can flip:
macOS 26.4 (one point release behind you), Apple Silicon (not M5)
Light mode AND dark mode
Single built-in display AND with secondary monitors
Large centered window AND small window with input near the screen edge
Both a 20-line minimal repro AND your own pre-built uUhat binary
In every case the candidate panel shows up correctly with all 8 candidates. So the failure is bound to either (a) macOS 26.4.1 specifically, (b) the M5 chip, or (c) something in your entry/desktop.ts (which isn't in the public repo, so I can't inspect it).
Could you run this 20-line minimal repro on your machine? It'll tell us which of (a)/(b)/(c) it is.
Then with Pinyin active, click the TextArea (multi-line), type wen, and screenshot.
Three possible outcomes:
Candidate window also missing in this minimal repro → it's macOS 26.4.1 + M5, not Perry. We'll dig into the IME-protocol layer.
Candidate window appears here but not in uUhat → something in your entry/desktop.ts setup is breaking the input context. Sharing that file (or the relevant App({...}) block) would unblock the diagnosis.
Both work in this minimal repro AND in uUhat after cargo update && perry compile → maybe a stale build artifact. Worth ruling out.
Side note: I noticed error messaging the mach p…LoopWakeUpReliable in your terminal output. Probably unrelated noise (it's an IOPMAssertion log), but if the candidate window is missing AND that error fires every time you type, let me know — that combination would point at a different angle.
Perfect — that rules out macOS 26.4.1 + M5 entirely, and confirms perry/ui TextArea + IME works correctly in isolation on your exact hardware. So the bug is bound to something specific in your uUhat setup.
The next step is figuring out which part of your real app breaks it. Could you incrementally evolve the minimal repro toward your real uUhat shape and report which step kills the candidate window? Stop as soon as it breaks — that's the trigger.
Take the working ime_min.ts from the previous test and modify the TextArea step by step. After each step, recompile + run + type wen into the TextArea and check if the candidate window still appears:
import{ ...,setCornerRadius,widgetSetEdgeInsets}from"perry/ui";// after creating ta:setCornerRadius(ta,6);widgetSetEdgeInsets(ta,10,10,10,10);
Step 2 — wrap the TextArea in an HStack with a Button beside it (matches your inputRow = HStack(8, [field, sendBtn])):
import{ ...,HStack,Button,buttonSetBordered}from"perry/ui";constsendBtn=Button("发送",()=>{});buttonSetBordered(sendBtn,1);constinputRow=HStack(8,[ta,sendBtn]);// then put inputRow in the body instead of ta
Step 3 — add a ForEach driven by State above the input (matches your chat list):
import{ ...,ForEach}from"perry/ui";constitems=State<number[]>([1,2,3,4,5]);constlist=VStack(0,[ForEach(State(5),(i: number)=>Text(`row ${i}`))]);// body becomes: VStack(12, [list, lbl2, inputRow])
Step 4 — share your entry/desktop.ts (or the relevant App({...}) block). It's not in the public repo so I can't see what's different about your top-level setup.
If any of steps 1-3 break the candidate window, that's the smoking gun and we have a fix target. If they all work, step 4 is the answer — your app-level setup is doing something unusual.
Activity
WREQI commentedon Apr 25, 2026
WREQI commentedon Apr 25, 2026
WREQI commentedon Apr 25, 2026
Figure 1 shows the development process, while Figure 2 shows a normal prompt when entering text into any input box
WREQI commentedon Apr 25, 2026
https://github.com/WREQI/uUhat
proggeramlug commentedon Apr 25, 2026
Thanks for the detailed report and the
uUhatrepro — that helped a lot. I tried to reproduce on my end and want to compare notes before fixing, because what I see doesn't match Figure 1.My setup
com.apple.inputmethod.SCIM.ITABC) — Apple's built-inuUhatbinary AND a fresh rebuild against currentmain(v0.5.224)What I see
With the same
weninput that produced your Figure 1, the candidate window shows up correctly with all 8 candidates (1.问 2.文 3.闻 4.👃 5.温 6.纹 7.稳 8.吻) and the paging chevron — both in your searchTextField(popup appears below the field) and in the messageTextArea(popup appears below the caret line, inside the view body — matches nativeNSTextViewbehavior).I also tested a longer sequence (
nihao) and it shows segmented marked text plus1.你好 2.👋 3.你好吗 4.你号 ...correctly.(Happy to attach side-by-side screenshots — they look indistinguishable from your Figure 2.)
Two hypotheses, can you help me narrow down?
Crop: Figure 1 is 958×218 — just tall enough to show the marked-text line. On macOS the candidate panel appears below the caret line, which inside a multi-line
TextAreafalls within the view's bounds (not below the whole view). If your screenshot was cropped right after the marked text, the popup might be just outside the visible region. A wider screenshot (say 300 px taller) would settle this.Different IME: I only tested Apple SCIM. If you're on Sogou (搜狗), Rime, Squirrel, or another third-party IME, they sometimes use stricter coordinate queries (
firstRectForCharacterRange:actualRange:) and a perry/ui bug there is plausible. Apple SCIM is more forgiving.Could you share:
sw_versoutput (macOS version)TextField(the search box at the top ofuUhat) too, or only on theTextArea(the message input at the bottom)If it's third-party IME, I'll set that up here and trace the IME-protocol calls. With Apple SCIM I just can't reproduce on
main.WREQI commentedon Apr 25, 2026
At present, it is still very difficult to develop applications using this library with AI, possibly due to insufficient data and insufficient knowledge of AI big models
WREQI commentedon Apr 25, 2026
WREQI commentedon Apr 25, 2026
I am using the input method that comes with my Apple laptopmain
@
proggeramlug commentedon Apr 25, 2026
Thanks for confirming Apple's built-in IME, macOS Tahoe 26.4.1, M5 — that helps narrow it.
I tried to reproduce on my end across every environment variant I can flip:
uUhatbinaryIn every case the candidate panel shows up correctly with all 8 candidates. So the failure is bound to either (a) macOS 26.4.1 specifically, (b) the M5 chip, or (c) something in your
entry/desktop.ts(which isn't in the public repo, so I can't inspect it).Could you run this 20-line minimal repro on your machine? It'll tell us which of (a)/(b)/(c) it is.
Save as
ime_min.ts:Compile + run:
Then with Pinyin active, click the TextArea (multi-line), type
wen, and screenshot.Three possible outcomes:
uUhat→ something in yourentry/desktop.tssetup is breaking the input context. Sharing that file (or the relevantApp({...})block) would unblock the diagnosis.uUhataftercargo update && perry compile→ maybe a stale build artifact. Worth ruling out.Side note: I noticed
error messaging the mach p…LoopWakeUpReliablein your terminal output. Probably unrelated noise (it's anIOPMAssertionlog), but if the candidate window is missing AND that error fires every time you type, let me know — that combination would point at a different angle.WREQI commentedon Apr 25, 2026
proggeramlug commentedon Apr 25, 2026
Perfect — that rules out macOS 26.4.1 + M5 entirely, and confirms
perry/uiTextArea + IME works correctly in isolation on your exact hardware. So the bug is bound to something specific in youruUhatsetup.The next step is figuring out which part of your real app breaks it. Could you incrementally evolve the minimal repro toward your real
uUhatshape and report which step kills the candidate window? Stop as soon as it breaks — that's the trigger.Take the working
ime_min.tsfrom the previous test and modify the TextArea step by step. After each step, recompile + run + typeweninto the TextArea and check if the candidate window still appears:Step 1 — add corner radius + insets (matches your
setCornerRadius(field, 6); widgetSetEdgeInsets(field, 10, 10, 10, 10)):Step 2 — wrap the TextArea in an HStack with a Button beside it (matches your
inputRow = HStack(8, [field, sendBtn])):Step 3 — add a ForEach driven by State above the input (matches your chat list):
Step 4 — share your
entry/desktop.ts(or the relevantApp({...})block). It's not in the public repo so I can't see what's different about your top-level setup.If any of steps 1-3 break the candidate window, that's the smoking gun and we have a fix target. If they all work, step 4 is the answer — your app-level setup is doing something unusual.
WREQI commentedon Apr 26, 2026
Yesterday didn't work, but today I opened and ran it, and it worked fine on its own. It's really a strange problem.
proggeramlug commentedon Apr 26, 2026
@WREQI I did release a new version a few hours ago that might have "accidentally" fixed it.
I'm closing this for now but I'll keep this in memory in case anything like this pops up again.