Repository navigation
Revert "Fix McBopomofo Bopomofo candidate opening" - #3845
Conversation
This reverts commit d8a6f2a.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR refactors IME candidate-opening logic from Bopomofo to Zhuyin input source detection. Helper functions, predicates, and state flags are renamed and repurposed to support Traditional Zhuyin composition instead of Bopomofo, with corresponding test updates. ChangesZhuyin IME Candidate Handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR reverts #3836 ("Fix McBopomofo Bopomofo candidate opening"), restoring the input-source detection for the synthetic-space candidate-open path to Apple's TCIM Zhuyin only. As part of the revert, the helpers and state variable are renamed from the "Bopomofo" namespace to "Zhuyin" to better reflect their narrowed scope.
Confidence Score: 4/5Safe to merge — this is a focused revert with consistent renaming; the only stray item is a single stale "Bopomofo" string in a test assertion message. The production logic change is intentional and internally consistent. All call sites that previously used the Bopomofo-keyed names have been updated to the Zhuyin-keyed equivalents, and the state lifecycle (set on candidate open, cleared on unmarkText and focus loss) is preserved. One test assertion message at line 419 still reads "Bopomofo candidate arrows" after everything else was renamed to Zhuyin, which is a minor leftover from the rename sweep. cmuxTests/CJKIMEMarkedSelectionTests.swift — contains the stale assertion message; the two production Swift files look clean. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[keyDown event] --> B{markedTextBefore?}
B -- No --> Z[Forward to Ghostty]
B -- Yes --> C{isTraditionalZhuyinInputSource?}
C -- No --> Z
C -- Yes --> D{shouldOpenZhuyinCandidatesWithSyntheticSpace?}
D -- Yes --> E[Inject synthetic Space event, zhuyinCandidateOpenRequested = true]
D -- No --> F{shouldRememberZhuyinCandidateInteraction?}
F -- Yes --> G[zhuyinCandidateOpenRequested = true]
F -- No --> H[zhuyinCandidateOpenRequested = false]
E --> I[syncPreedit]
|
Reverts #3836
Note
Medium Risk
Touches macOS IME key handling and candidate-window heuristics; could regress candidate opening/navigation for non-Apple Zhuyin/Bopomofo input sources while improving correctness for the built-in Traditional Chinese Zhuyin IME.
Overview
Reverts the prior expansion of the Zhuyin/Bopomofo candidate-opening workaround by scoping it only to Apple’s Traditional Chinese Zhuyin input source (
com.apple.inputmethod.TCIM.Zhuyin).Renames the internal state/helpers from Bopomofo to Zhuyin and updates detection to match
TCIM.Zhuyinspecifically, which stops triggering the synthetic-space candidate-open path for third-party Bopomofo IMEs. The test suite is updated accordingly by removing the McBopomofo coverage and renaming related debug/test accessors.Reviewed by Cursor Bugbot for commit 808e1a9. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Reverts the McBopomofo candidate-opening logic and restores handling to only support Apple's Traditional Zhuyin (
TCIM.Zhuyin). Removes the McBopomofo test and renames internal bopomofo identifiers to zhuyin to match the scope.Written for commit 808e1a9. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests