feat(input): make three-finger IME gesture optional - #97
Conversation
📝 WalkthroughWalkthroughChanges三指输入法设置
原生库构建更新
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nativelib/src/main/cpp/moonlight-common-c`:
- Line 1: 更新 moonlight-common-c 子模块的 gitlink,替换当前不可获取的提交为
qiin2333/moonlight-common-c 中可用且包含 CursorStream.c 的提交;确认其符号接口与现有 CMakeLists.txt
及 ArkTS 原生桥接兼容。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 17dae4fe-93f4-46bf-94d4-21ebb35db14b
📒 Files selected for processing (5)
entry/src/main/ets/pages/SettingsPageV2.etsentry/src/main/ets/pages/StreamPage.etsentry/src/main/ets/service/SettingsService.etsnativelib/src/main/cpp/CMakeLists.txtnativelib/src/main/cpp/moonlight-common-c
| @@ -1 +1 @@ | |||
| Subproject commit 2b913d47a4d29b0825c3fe748493fd336d80a241 | |||
| Subproject commit 7bfa0c1e79d55871c519287c441a629b9eeed045 | |||
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
submodule='nativelib/src/main/cpp/moonlight-common-c'
expected='7bfa0c1e79d55871c519287c441a629b9eeed045'
actual="$(git ls-tree HEAD "$submodule" | awk '{print $3}')"
test "$actual" = "$expected"
git -C "$submodule" ls-tree -r --name-only "$expected" \
| grep -E '(^|/)CursorStream\.c$'
rg -n 'MOONLIGHT_COMMON_SOURCES|CursorStream\.c' nativelib/src/main/cppRepository: AlkaidLab/moonlight-harmony
Length of output: 337
🏁 Script executed:
#!/bin/bash
set -u
echo "== submodule entries =="
git ls-files -s | grep '160000 nativelib/src/main/cpp/moonlight-common-c' || true
echo "== repo remotes / objects =="
git remote -v || true
git cat-file -t 7bfa0c1e79d55871c519287c441a629b9eeed045 2>&1 || true
git cat-file -p 7bfa0c1e79d55871c519287c441a629b9eeed045 2>&1 | head -n 20 || true
git cat-file -t HEAD:nativelib/src/main/cpp/moonlight-common-c 2>&1 || true
git ls-tree HEAD nativelib/src/main/cpp/moonlight-common-c || true
echo "== submodule config / lockfiles =="
git config -f .gitmodules --get-regexp path || true
git config -f .gitmodules --get-regexp nativelib/src/main/cpp/moonlight-common-c || true
git config -f .git/config --get-regexp core || true
git config -f .git/config --get-regexp submodule || true
for f in .gitmodules .git/config; do
echo "--- $f"
[ -f "$f" ] && sed -n '1,220p' "$f"
done
echo "== native build references =="
rg -n 'moonlight-common-c|MOONLIGHT_COMMON_SOURCES|CursorStream\.c|cursor-protocol-golden-tests' .Repository: AlkaidLab/moonlight-harmony
Length of output: 7411
🏁 Script executed:
#!/bin/bash
set -euo pipefail
git config --get remotes.origin.fetch
git fetch origin refs/heads/master:refs/remotes/origin/master --quiet 2>/dev/null || true
git fetch origin --quiet 2>/dev/null || true
expected='7bfa0c1e79d55871c519287c441a629b9eeed045'
echo "== submodule commit availability =="
git cat-file -t "$expected" || true
if git cat-file -t "$expected" >/dev/null 2>&1; then
echo "== commit type =="
git cat-file -t "$expected"
echo "== submodule head sha from current commit =="
git ls-tree HEAD nativelib/src/main/cpp/moonlight-common-c
echo "== submodule tree contents around CursorStream =="
git ls-tree -r "$expected" -- nativelib/src/main/cpp/moonlight-common-c \
| sed -n '1,80p'
git ls-tree -r "$expected" -- | grep -E '(^|/)CursorStream\.c$' || true
echo "== upstream moonlight-common-c refs for branch m..."
git ls-remote https://github.com/qiin2333/moonlight-common-c.git | grep -E 'refs/(heads|tags)/mic|7bfa0c1e79d55871c519287c441a629b9eeed045' || true
else
echo "== object unavailable locally; show diffstat for submodule path =="
git diff --stat HEAD^..HEAD -- nativelib/src/main/cpp/moonlight-common-c || true
git diff -- nativelib/src/main/cpp/moonlight-common-c | sed -n '1,160p' || true
fi
echo "== native CMake source entries =="
sed -n '105,160p' nativelib/src/main/cpp/CMakeLists.txtRepository: AlkaidLab/moonlight-harmony
Length of output: 165
🌐 Web query:
github qiin2333 moonlight-common-c gitlink 7bfa0c1e79d55871c519287c441a629b9eeed045 CursorStream.c
💡 Result:
The file CursorStream.c does not exist in the official moonlight-stream/moonlight-common-c repository [1][2]. Moonlight-common-c is a core library for Nvidia's GameStream protocol, and its source files are primarily dedicated to stream management, networking, and platform-specific abstractions (e.g., AudioStream.c, Connection.c, VideoStream.c) [3]. The GitHub user qiin2333 maintains forks (e.g., moonlight-vplus and moonlight-qt) that include modifications related to cursor handling [4][5][6]. Specifically, the repository qiin2333/moonlight-vplus includes a CursorServiceManager.java file, which was introduced to manage cursor operations, but this is a Java/Kotlin component for the Android client, not a C file within the common library [4][6]. The git hash provided (7bfa0c1e79d55871c519287c441a629b9eeed045) does not correspond to any known commit in the official moonlight-stream/moonlight-common-c repository or major associated forks. It appears to be an unrelated alphanumeric string, potentially resembling a truncated blockchain transaction ID [7][8][9].
Citations:
- 1: https://github.com/moonlight-stream/moonlight-common-c
- 2: https://github.com/moonlight-stream/moonlight-common-c/blob/master/CMakeLists.txt
- 3: https://github.com/moonlight-stream/moonlight-qt/blob/0e50a9d4/moonlight-common-c/moonlight-common-c.pro
- 4: qiin2333/moonlight-vplus@6616f4f
- 5: Add: 添加远程首选项:本地光标是否可见(ctrl+shift+alt+c) qiin2333/moonlight-qt#3
- 6: qiin2333/moonlight-vplus@658c0df
- 7: https://gnosisscan.io/address/0x7bfa80959eb5c7d034f74410c97a9c529486b843
- 8: https://www.walletexplorer.com/txid/7bfae27968c9916d0649e15799d5df517bb7a666b4d0a7235b96c941029b02c6
- 9: https://optimistic.etherscan.io/address/0xb79fa07f28eafc6f259a863649d419397007f058
修复缺失的 moonlight-common-c 子模块提交。
当前环境无法获取 7bfa0c1e79d55871c519287c441a629b9eeed045,该 gitlink 会导致 nativelib/src/main/cpp/CMakeLists.txt 引用的 ${MOONLIGHT_COMMON_PATH}/src/CursorStream.c 无法被解析和编译。重新指向可用的 qiin2333/moonlight-common-c 提交,并确认该版本包含 CursorStream.c、符号接口与原有 ArkTS 原生桥接兼容。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@nativelib/src/main/cpp/moonlight-common-c` at line 1, 更新 moonlight-common-c
子模块的 gitlink,替换当前不可获取的提交为 qiin2333/moonlight-common-c 中可用且包含 CursorStream.c
的提交;确认其符号接口与现有 CMakeLists.txt 及 ArkTS 原生桥接兼容。
Source: Path instructions
改了啥呀
7bfa0c1,同步 HEVC SEI 保留和本地光标形状协议CursorStream.c纳入 HarmonyOS 原生构建,收拾掉漏接源文件导致的杂鱼链接错误为啥要改
三指唤出输入法对需要键盘输入的场景很方便,但也可能与主机端三指操作冲突。现在保留原有默认行为,同时让不需要它的用户可以明确关闭;关闭后不会再吞掉这一组触摸。
common-c 已经增加了本地光标形状协议,主工程又是手工维护源文件列表,所以同步子模块时也必须把新增实现加入构建,不然只更新 gitlink 会在链接阶段缺符号啦。
验证
npm run checkgit diff --checkDEVECO_SDK_HOME=/Applications/DevEco-Studio.app/Contents/sdk JAVA_HOME=/Applications/DevEco-Studio.app/Contents/jbr/Contents/Home PATH=/Applications/DevEco-Studio.app/Contents/jbr/Contents/Home/bin:/Users/mac/.nvm/versions/node/v20.20.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin node hvigorw.js assembleApp --mode project -p product=default -p buildMode=debug --no-daemoncursor-protocol-golden-tests:1/1 通过Summary by CodeRabbit