Conversation
Reviewer's Guide重构了多个全局导航与识别流水线以复用新的共享识别节点,引入更加模块化的滑块和 OCR 颜色检测方案,增加显式的加载与沙盒识别辅助节点,并将 OCR 模型路径从 ppocr_v4 更新为 ppocr_v5,同时对部分资源与 ignore 文件进行了小幅调整。 Global.json 中共享导航识别节点的流程图flowchart TD
subgraph HomePageRecognition
Global_ResetHomePage_Start[Global_ResetHomePage_Start]
Global_ResetHomePage_End[Global_ResetHomePage_End]
Global_ToSandBox2_HomeSelect[Global_ToSandBox2_HomeSelect]
Rec_HomePage_GA_Ocr[Rec_HomePage_GA_Ocr]
Rec_HomePage_GA_Clr[Rec_HomePage_GA_Clr]
Sub_HomePage_GA_Bright_Clr[Sub_HomePage_GA_Bright_Clr]
end
subgraph BackButtonHub
Global_ToHomePage_Reset[Global_ToHomePage_Reset]
Global_ToSandBox_Reset[Global_ToSandBox_Reset]
Global_BackPageHub_Once[Global_BackPageHub_Once]
end
subgraph SandBoxRecognition
Global_ToSandBox_Enter[Global_ToSandBox_Enter]
Global_BackToPve2_FinBackMapPage[Global_BackToPve2#_FinBackMapPage]
Global_BackToQC1_Fin[Global_BackToQC1_Fin]
Rec_SandBox_Pin_Tpl[Rec_SandBox_Pin_Tpl]
Rec_SandBox_Run_Tpl[Rec_SandBox_Run_Tpl]
Rec_SandBox_Pin3_Tpl[Rec_SandBox_Pin3_Tpl]
Sub_SandBox_Pin3_Bright_Clr[Sub_SandBox_Pin3_Bright_Clr]
end
subgraph LoadingRecognition
Global_WaitingForLoading[Global_WaitingForLoading]
Rec_Wait_01[Rec_「Global_WaitingForLoading」_01]
Rec_Wait_02[Rec_「Global_WaitingForLoading」_02]
Rec_Wait_03[Rec_「Global_WaitingForLoading」_03]
Rec_Wait_04[Rec_「Global_WaitingForLoading」_04]
Rec_Wait_05[Rec_「Global_WaitingForLoading」_05]
Rec_Wait_06[Rec_「Global_WaitingForLoading」_06]
end
%% Home page uses shared OCR + color
Global_ResetHomePage_Start --> Rec_HomePage_GA_Ocr
Global_ResetHomePage_Start --> Rec_HomePage_GA_Clr
Global_ResetHomePage_End --> Rec_HomePage_GA_Ocr
Global_ResetHomePage_End --> Rec_HomePage_GA_Clr
Global_ToSandBox2_HomeSelect --> Rec_HomePage_GA_Ocr
Global_ToSandBox2_HomeSelect --> Rec_HomePage_GA_Clr
Sub_HomePage_GA_Bright_Clr --> Rec_HomePage_GA_Ocr
%% Back button hub reused across resets
Global_ToHomePage_Reset --> Global_BackPageHub_Once
Global_ToSandBox_Reset --> Global_BackPageHub_Once
%% Sandbox navigation reuses shared pin/run recognizers
Global_ToSandBox_Enter --> Rec_SandBox_Pin_Tpl
Global_ToSandBox_Enter --> Rec_SandBox_Run_Tpl
Global_BackToPve2_FinBackMapPage --> Rec_SandBox_Pin_Tpl
Global_BackToPve2_FinBackMapPage --> Rec_SandBox_Run_Tpl
Global_BackToQC1_Fin --> Rec_SandBox_Pin_Tpl
Global_BackToQC1_Fin --> Rec_SandBox_Run_Tpl
Sub_SandBox_Pin3_Bright_Clr --> Rec_SandBox_Pin3_Tpl
%% Loading wait uses six helper recognizers
Global_WaitingForLoading --> Rec_Wait_01
Global_WaitingForLoading --> Rec_Wait_02
Global_WaitingForLoading --> Rec_Wait_03
Global_WaitingForLoading --> Rec_Wait_04
Global_WaitingForLoading --> Rec_Wait_05
Global_WaitingForLoading --> Rec_Wait_06
模块化滑块与 OCR 颜色检测的流程图flowchart TD
subgraph SliderSwitch
Anc_SliderSwitch_GryOff_Clr[Anc_SliderSwitch_GryOff_Clr]
Anc_SliderSwitch_YewOn_Clr[Anc_SliderSwitch_YewOn_Clr]
Anc_SliderSwitch_Gry_TurnOn_Clr[Anc_SliderSwitch_Gry_TurnOn_Clr]
Anc_SliderSwitch_Yew_TurnOff_Clr[Anc_SliderSwitch_Yew_TurnOff_Clr]
Anc_SliderSwitch_Act_Turn[Anc_SliderSwitch_Act_Turn]
Global_SliderSwitch_End[Global_SliderSwitch_End]
end
subgraph OcrButtonAnchors
Anc_Ocr_Enable_Clr[Anc_Ocr_Enable_Clr]
Anc_Ocr_Unable_Clr[Anc_Ocr_Unable_Clr]
end
subgraph OcrButtonSubs
Sub_Ocr_Enable_Clr[Sub_Ocr_Enable_Clr]
Sub_Ocr_Unable_Clr[Sub_Ocr_Unable_Clr]
end
%% Slider logic: detect state, click, re-check
Anc_SliderSwitch_Gry_TurnOn_Clr --> Anc_SliderSwitch_GryOff_Clr
Anc_SliderSwitch_Gry_TurnOn_Clr --> Anc_SliderSwitch_Act_Turn
Anc_SliderSwitch_Act_Turn --> Anc_SliderSwitch_YewOn_Clr
Anc_SliderSwitch_Yew_TurnOff_Clr --> Anc_SliderSwitch_YewOn_Clr
Anc_SliderSwitch_Yew_TurnOff_Clr --> Anc_SliderSwitch_Act_Turn
Anc_SliderSwitch_Act_Turn --> Anc_SliderSwitch_GryOff_Clr
Anc_SliderSwitch_GryOff_Clr --> Global_SliderSwitch_End
Anc_SliderSwitch_YewOn_Clr --> Global_SliderSwitch_End
%% OCR button color checks: anchor vs sub nodes
Anc_Ocr_Enable_Clr --> Sub_Ocr_Enable_Clr
Anc_Ocr_Unable_Clr --> Sub_Ocr_Unable_Clr
文件级变更
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 以:
Getting HelpOriginal review guide in EnglishReviewer's GuideRefactors several global navigation and recognition pipelines to reuse new shared recognition nodes, introduces a more modular slider and OCR color-detection scheme, adds explicit loading and sandbox recognition helpers, and updates the OCR model path from ppocr_v4 to ppocr_v5 while adding minor asset and ignore-file adjustments. Flow diagram for shared navigation recognition nodes in Global.jsonflowchart TD
subgraph HomePageRecognition
Global_ResetHomePage_Start[Global_ResetHomePage_Start]
Global_ResetHomePage_End[Global_ResetHomePage_End]
Global_ToSandBox2_HomeSelect[Global_ToSandBox2_HomeSelect]
Rec_HomePage_GA_Ocr[Rec_HomePage_GA_Ocr]
Rec_HomePage_GA_Clr[Rec_HomePage_GA_Clr]
Sub_HomePage_GA_Bright_Clr[Sub_HomePage_GA_Bright_Clr]
end
subgraph BackButtonHub
Global_ToHomePage_Reset[Global_ToHomePage_Reset]
Global_ToSandBox_Reset[Global_ToSandBox_Reset]
Global_BackPageHub_Once[Global_BackPageHub_Once]
end
subgraph SandBoxRecognition
Global_ToSandBox_Enter[Global_ToSandBox_Enter]
Global_BackToPve2_FinBackMapPage[Global_BackToPve2#_FinBackMapPage]
Global_BackToQC1_Fin[Global_BackToQC1_Fin]
Rec_SandBox_Pin_Tpl[Rec_SandBox_Pin_Tpl]
Rec_SandBox_Run_Tpl[Rec_SandBox_Run_Tpl]
Rec_SandBox_Pin3_Tpl[Rec_SandBox_Pin3_Tpl]
Sub_SandBox_Pin3_Bright_Clr[Sub_SandBox_Pin3_Bright_Clr]
end
subgraph LoadingRecognition
Global_WaitingForLoading[Global_WaitingForLoading]
Rec_Wait_01[Rec_「Global_WaitingForLoading」_01]
Rec_Wait_02[Rec_「Global_WaitingForLoading」_02]
Rec_Wait_03[Rec_「Global_WaitingForLoading」_03]
Rec_Wait_04[Rec_「Global_WaitingForLoading」_04]
Rec_Wait_05[Rec_「Global_WaitingForLoading」_05]
Rec_Wait_06[Rec_「Global_WaitingForLoading」_06]
end
%% Home page uses shared OCR + color
Global_ResetHomePage_Start --> Rec_HomePage_GA_Ocr
Global_ResetHomePage_Start --> Rec_HomePage_GA_Clr
Global_ResetHomePage_End --> Rec_HomePage_GA_Ocr
Global_ResetHomePage_End --> Rec_HomePage_GA_Clr
Global_ToSandBox2_HomeSelect --> Rec_HomePage_GA_Ocr
Global_ToSandBox2_HomeSelect --> Rec_HomePage_GA_Clr
Sub_HomePage_GA_Bright_Clr --> Rec_HomePage_GA_Ocr
%% Back button hub reused across resets
Global_ToHomePage_Reset --> Global_BackPageHub_Once
Global_ToSandBox_Reset --> Global_BackPageHub_Once
%% Sandbox navigation reuses shared pin/run recognizers
Global_ToSandBox_Enter --> Rec_SandBox_Pin_Tpl
Global_ToSandBox_Enter --> Rec_SandBox_Run_Tpl
Global_BackToPve2_FinBackMapPage --> Rec_SandBox_Pin_Tpl
Global_BackToPve2_FinBackMapPage --> Rec_SandBox_Run_Tpl
Global_BackToQC1_Fin --> Rec_SandBox_Pin_Tpl
Global_BackToQC1_Fin --> Rec_SandBox_Run_Tpl
Sub_SandBox_Pin3_Bright_Clr --> Rec_SandBox_Pin3_Tpl
%% Loading wait uses six helper recognizers
Global_WaitingForLoading --> Rec_Wait_01
Global_WaitingForLoading --> Rec_Wait_02
Global_WaitingForLoading --> Rec_Wait_03
Global_WaitingForLoading --> Rec_Wait_04
Global_WaitingForLoading --> Rec_Wait_05
Global_WaitingForLoading --> Rec_Wait_06
Flow diagram for modular slider and OCR color detectionflowchart TD
subgraph SliderSwitch
Anc_SliderSwitch_GryOff_Clr[Anc_SliderSwitch_GryOff_Clr]
Anc_SliderSwitch_YewOn_Clr[Anc_SliderSwitch_YewOn_Clr]
Anc_SliderSwitch_Gry_TurnOn_Clr[Anc_SliderSwitch_Gry_TurnOn_Clr]
Anc_SliderSwitch_Yew_TurnOff_Clr[Anc_SliderSwitch_Yew_TurnOff_Clr]
Anc_SliderSwitch_Act_Turn[Anc_SliderSwitch_Act_Turn]
Global_SliderSwitch_End[Global_SliderSwitch_End]
end
subgraph OcrButtonAnchors
Anc_Ocr_Enable_Clr[Anc_Ocr_Enable_Clr]
Anc_Ocr_Unable_Clr[Anc_Ocr_Unable_Clr]
end
subgraph OcrButtonSubs
Sub_Ocr_Enable_Clr[Sub_Ocr_Enable_Clr]
Sub_Ocr_Unable_Clr[Sub_Ocr_Unable_Clr]
end
%% Slider logic: detect state, click, re-check
Anc_SliderSwitch_Gry_TurnOn_Clr --> Anc_SliderSwitch_GryOff_Clr
Anc_SliderSwitch_Gry_TurnOn_Clr --> Anc_SliderSwitch_Act_Turn
Anc_SliderSwitch_Act_Turn --> Anc_SliderSwitch_YewOn_Clr
Anc_SliderSwitch_Yew_TurnOff_Clr --> Anc_SliderSwitch_YewOn_Clr
Anc_SliderSwitch_Yew_TurnOff_Clr --> Anc_SliderSwitch_Act_Turn
Anc_SliderSwitch_Act_Turn --> Anc_SliderSwitch_GryOff_Clr
Anc_SliderSwitch_GryOff_Clr --> Global_SliderSwitch_End
Anc_SliderSwitch_YewOn_Clr --> Global_SliderSwitch_End
%% OCR button color checks: anchor vs sub nodes
Anc_Ocr_Enable_Clr --> Sub_Ocr_Enable_Clr
Anc_Ocr_Unable_Clr --> Sub_Ocr_Unable_Clr
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我发现了两个问题,并留下了一些总体反馈:
- 有几个节点 ID 被重命名或替换(例如
Global_SliderSwitch_*→Anc_SliderSwitch_*,Global_Main_Clr→Anc_Ocr_*/Sub_Ocr_*);请仔细检查其他流水线 JSON 中对这些节点的所有引用是否都已更新为新名称,以避免运行时查找失败。 - OCR 模型路径从
ppocr_v4修改为ppocr_v5是在configure_ocr_model里写死的;建议从单一常量或配置项中派生版本号,这样以后升级只需要改一个地方。
给 AI 代理的提示词
Please address the comments from this code review:
## Overall Comments
- Several node IDs were renamed or replaced (e.g. `Global_SliderSwitch_*` → `Anc_SliderSwitch_*`, `Global_Main_Clr` → `Anc_Ocr_*`/`Sub_Ocr_*`); double-check that all references in other pipeline JSONs have been updated to the new names to avoid runtime lookup failures.
- The OCR model path change from `ppocr_v4` to `ppocr_v5` is hard-coded in `configure_ocr_model`; consider deriving the version from a single constant or configuration value so future upgrades only need to touch one place.
## Individual Comments
### Comment 1
<location path="assets/resource/base/pipeline/Global.json" line_range="398" />
<code_context>
},
"Global_BackToQC1_Fin": {
"desc": "找到图钉-点击返回主页",
- "recognition": "TemplateMatch",
</code_context>
<issue_to_address>
**issue (bug_risk):** The finish node for QC1 no longer performs a click despite the description saying it should.
This node used to `TemplateMatch` on `pin.png` with `action: "Click"` and a fixed `target`, but now only does an `Or` over `Rec_SandBox_Pin_Tpl` and `Rec_SandBox_Run_Tpl` with no `action` or `target`. Unless the click was intentionally moved, this likely drops the "click to return home" behavior implied by the description. Either restore the click/target here or point to a subnode that performs the click; if it was moved, please update the description accordingly.
</issue_to_address>
### Comment 2
<location path="assets/resource/base/pipeline/Global.json" line_range="643-645" />
<code_context>
},
- "Global_Main_Clr": {
- "desc": "【被引用节点】主界面是否无二级浮窗遮蔽",
+ "Anc_Ocr_Enable_Clr": {
+ "desc": "[识别]]对Ocr节点按钮再次色核,亮色",
"recognition": "ColorMatch",
- "roi": "Main_OCR",
</code_context>
<issue_to_address>
**nitpick (typo):** Small typo in the description string with a double closing bracket.
The `desc` string currently reads `"[识别]]对Ocr节点按钮再次色核,亮色"` with a double `]`. Please update to a single closing bracket to align with the other descriptions if this is user- or log-facing text.
```suggestion
"Anc_Ocr_Enable_Clr": {
"desc": "[识别]对Ocr节点按钮再次色核,亮色",
"recognition": "ColorMatch",
```
</issue_to_address>帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进 Review 质量。
Original comment in English
Hey - I've found 2 issues, and left some high level feedback:
- Several node IDs were renamed or replaced (e.g.
Global_SliderSwitch_*→Anc_SliderSwitch_*,Global_Main_Clr→Anc_Ocr_*/Sub_Ocr_*); double-check that all references in other pipeline JSONs have been updated to the new names to avoid runtime lookup failures. - The OCR model path change from
ppocr_v4toppocr_v5is hard-coded inconfigure_ocr_model; consider deriving the version from a single constant or configuration value so future upgrades only need to touch one place.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Several node IDs were renamed or replaced (e.g. `Global_SliderSwitch_*` → `Anc_SliderSwitch_*`, `Global_Main_Clr` → `Anc_Ocr_*`/`Sub_Ocr_*`); double-check that all references in other pipeline JSONs have been updated to the new names to avoid runtime lookup failures.
- The OCR model path change from `ppocr_v4` to `ppocr_v5` is hard-coded in `configure_ocr_model`; consider deriving the version from a single constant or configuration value so future upgrades only need to touch one place.
## Individual Comments
### Comment 1
<location path="assets/resource/base/pipeline/Global.json" line_range="398" />
<code_context>
},
"Global_BackToQC1_Fin": {
"desc": "找到图钉-点击返回主页",
- "recognition": "TemplateMatch",
</code_context>
<issue_to_address>
**issue (bug_risk):** The finish node for QC1 no longer performs a click despite the description saying it should.
This node used to `TemplateMatch` on `pin.png` with `action: "Click"` and a fixed `target`, but now only does an `Or` over `Rec_SandBox_Pin_Tpl` and `Rec_SandBox_Run_Tpl` with no `action` or `target`. Unless the click was intentionally moved, this likely drops the "click to return home" behavior implied by the description. Either restore the click/target here or point to a subnode that performs the click; if it was moved, please update the description accordingly.
</issue_to_address>
### Comment 2
<location path="assets/resource/base/pipeline/Global.json" line_range="643-645" />
<code_context>
},
- "Global_Main_Clr": {
- "desc": "【被引用节点】主界面是否无二级浮窗遮蔽",
+ "Anc_Ocr_Enable_Clr": {
+ "desc": "[识别]]对Ocr节点按钮再次色核,亮色",
"recognition": "ColorMatch",
- "roi": "Main_OCR",
</code_context>
<issue_to_address>
**nitpick (typo):** Small typo in the description string with a double closing bracket.
The `desc` string currently reads `"[识别]]对Ocr节点按钮再次色核,亮色"` with a double `]`. Please update to a single closing bracket to align with the other descriptions if this is user- or log-facing text.
```suggestion
"Anc_Ocr_Enable_Clr": {
"desc": "[识别]对Ocr节点按钮再次色核,亮色",
"recognition": "ColorMatch",
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| @@ -527,19 +397,10 @@ | |||
| }, | |||
| "Global_BackToQC1_Fin": { | |||
There was a problem hiding this comment.
issue (bug_risk): QC1 的完成节点现在不再执行点击操作了,但描述中仍然说明应该点击。
该节点之前会对 pin.png 做 TemplateMatch,并设置 action: "Click" 和固定的 target,但现在只对 Rec_SandBox_Pin_Tpl 和 Rec_SandBox_Run_Tpl 做 Or,没有任何 action 或 target。除非点击逻辑被有意移走,否则这很可能会导致丢失描述中所暗示的“点击返回主页”的行为。请恢复此处的点击/目标,或者指向一个执行点击的子节点;如果点击逻辑确实已移走,请相应更新描述。
Original comment in English
issue (bug_risk): The finish node for QC1 no longer performs a click despite the description saying it should.
This node used to TemplateMatch on pin.png with action: "Click" and a fixed target, but now only does an Or over Rec_SandBox_Pin_Tpl and Rec_SandBox_Run_Tpl with no action or target. Unless the click was intentionally moved, this likely drops the "click to return home" behavior implied by the description. Either restore the click/target here or point to a subnode that performs the click; if it was moved, please update the description accordingly.
| "Anc_Ocr_Enable_Clr": { | ||
| "desc": "[识别]]对Ocr节点按钮再次色核,亮色", | ||
| "recognition": "ColorMatch", |
There was a problem hiding this comment.
nitpick (typo): 描述字符串中有一个小拼写错误:多了一个右中括号。
当前 desc 字符串是 "[识别]]对Ocr节点按钮再次色核,亮色",其中包含两个 ]。如果这段文本会展示给用户或写入日志,请改成只有一个右中括号,以与其他描述保持一致。
| "Anc_Ocr_Enable_Clr": { | |
| "desc": "[识别]]对Ocr节点按钮再次色核,亮色", | |
| "recognition": "ColorMatch", | |
| "Anc_Ocr_Enable_Clr": { | |
| "desc": "[识别]对Ocr节点按钮再次色核,亮色", | |
| "recognition": "ColorMatch", |
Original comment in English
nitpick (typo): Small typo in the description string with a double closing bracket.
The desc string currently reads "[识别]]对Ocr节点按钮再次色核,亮色" with a double ]. Please update to a single closing bracket to align with the other descriptions if this is user- or log-facing text.
| "Anc_Ocr_Enable_Clr": { | |
| "desc": "[识别]]对Ocr节点按钮再次色核,亮色", | |
| "recognition": "ColorMatch", | |
| "Anc_Ocr_Enable_Clr": { | |
| "desc": "[识别]对Ocr节点按钮再次色核,亮色", | |
| "recognition": "ColorMatch", |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (21)
📝 WalkthroughWalkthrough本PR对20个流程配置文件进行大规模重构,将散布各处的内联识别条件统一提取为全局复用节点库。通过在Global.json中定义主页、沙箱、滑块、OCR颜色等通用识别节点,各流程文件改为引用这些节点而非内联识别逻辑,提升配置复用率与可维护性。 ChangesPipeline识别节点复用化重构
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~60 minutes ✨ 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 |
Summary by Sourcery
将全局 UI 识别流水线重构为可复用节点,扩展首页、沙盒、加载界面、滑块和 OCR 状态的视觉检测能力,并更新配置的 OCR 模型版本。
New Features:
.gitignore忽略 PC 机型相关资源。Enhancements:
Build:
ppocr_v4模型目录切换为ppocr_v5。Original summary in English
Summary by Sourcery
Refactor global UI recognition pipelines into reusable nodes, extend visual detectors for homepage, sandbox, loading, sliders and OCR state, and update the configured OCR model version.
New Features:
Enhancements:
Build:
Summary by CodeRabbit
优化
改进