Skip to content

feat(experiences): 新增低代码实现多选框应用的经验 - #18

Merged
kqcoxn merged 1 commit into
mainfrom
feat/experience-checkbox-multiselect
Oct 27, 2026
Merged

kqcoxn merged 1 commit into
mainfrom
feat/experience-checkbox-multiselect

Conversation

@overflow65537

@overflow65537 overflow65537 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

新增条目

Storage/experiences/overflow65537/pipeline-checkbox-multiselect/

以《明日方舟:终末地》预刻写属性里的基础属性 5 选 3为例,记录一种低代码实现多选框的思路。

内容概要

  • 需求:用户用多选框勾出"希望被选上的 3 项",程序先校验面板是否已符合,不符合就清空已有选择、重选、再复验。属于"选目标"型,而不是"筛画面"型。
  • 难点:pipeline_override 对同一节点、同一字段是后写覆盖先写。多个 case 共用同一个节点时,只有最后合并的那项会生效,多选会退化成"单选最后一项"——所以必须一项一个节点做隔离。
  • 做法:一个 And 主节点,5 个子识别默认 DirectHit(= 不校验),勾一项就把对应子节点覆盖成 OCR,运行时等价于「3 个真实 OCR + 2 个直接命中」。选择侧同理:5 个执行节点默认 DirectHit + DoNothing 直通,勾选才改成"找到就点";再用 [JumpBack] 清空旧选择、确认后回到入口复验。

自查

  • node scripts/validate-maahub-meta.mjs 通过
  • 目录结构符合 Storage/experiences/<id>/<name>/,chapters 与实际文件对应
  • 无临时文件、构建产物

Sourcery 摘要

新增一份经验指南,介绍如何使用低代码流程实现目标状态多选工作流。

Enhancements:

  • 新增低代码多选框应用经验,介绍如何通过独立节点、组合校验与执行流程,将用户选择的目标状态应用到界面并进行复验。

Documentation:

  • 新增《低代码实现多选框应用》经验文档,以基础属性五选三场景说明目标型多选框的设计与实现思路。

Chores:

  • 新增经验条目的元数据配置。
Original summary in English

Summary by Sourcery

Add an experience guide for implementing target-state multiselect workflows with low-code pipelines.

Enhancements:

  • 新增低代码多选框应用经验,介绍如何通过独立节点、组合校验与执行流程,将用户选择的目标状态应用到界面并进行复验。

Documentation:

  • 新增《低代码实现多选框应用》经验文档,以基础属性五选三场景说明目标型多选框的设计与实现思路。

Chores:

  • 新增经验条目的元数据配置。

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

嗨——我发现了 3 个问题

给 AI 智能体的提示
请处理这次代码审查中的评论:

## 各项评论

### 评论 1
<location path="Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md" line_range="97" />
<code_context>
+勾选时,case 只改一个子节点:
+
+```jsonc
+"BaseAffixStrength": { "recognition": "OCR", "expected": ["力量"] }
+```
+
</code_context>
<issue_to_address>
**错误的词条也能通过验证**

当面板同时显示已选和未选属性的标签时,`BaseAffixStrength` 以及其他针对已选项的检查会匹配 OCR 文本,却不检查选择状态。因此,对于未勾选的请求属性,`BaseAffixesMatched` 也会匹配成功,流水线会继续执行,而不会修正选择状态。

请修改这些检查,以验证每个请求的属性是否已选中,而不是仅依赖其 OCR 标签。
</issue_to_address>

### 评论 2
<location path="Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md" line_range="97" />
<code_context>
+勾选时,case 只改一个子节点:
+
+```jsonc
+"BaseAffixStrength": { "recognition": "OCR", "expected": ["力量"] }
+```
+
</code_context>
<issue_to_address>
**OCR 会匹配无关标签**

如果目标标签也出现在屏幕的其他位置,全屏 OCR 检查可能会因匹配到无关位置的文本而让 `BaseAffixesMatched` 通过;`Select*` 节点也可能点击该位置,导致流水线继续执行时选择了错误的属性。

请将 OCR 检查和选择目标限制在相关的词条面板区域内。

另请检查 `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md:126`。
</issue_to_address>

### 评论 3
<location path="Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md" line_range="176" />
<code_context>
+"AffixPanelOpened": {
+    "recognition": "OCR",
+    "expected": ["预刻写属性"],
+    "next": ["[JumpBack]ClearSelectedAffix", "SelectMain"]
+},
+
</code_context>
<issue_to_address>
**清除选择的循环可能卡住**

如果点击没有移除匹配到的颜色,或者颜色匹配持续产生误报,那么在点击后 `ClearSelectedAffix` 仍可能继续匹配;此时 `[JumpBack]` 路径会反复返回 `AffixPanelOpened` 并重试,却始终无法到达 `SelectMain`,任务可能会无限期卡在清除操作中。

请限制清除操作的重试次数,并在重试次数耗尽时转向明确的失败或恢复路径。
</issue_to_address>

Sourcery 对开源项目免费——如果您喜欢我们的审查结果,欢迎分享 ✨
Original comment in English

Hey - I've found 3 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md" line_range="97" />
<code_context>
+勾选时,case 只改一个子节点:
+
+```jsonc
+"BaseAffixStrength": { "recognition": "OCR", "expected": ["力量"] }
+```
+
</code_context>
<issue_to_address>
**Wrong affixes pass validation**

When the panel displays labels for both selected and unselected attributes, `BaseAffixStrength` and the other selected-item checks match OCR text without checking selection state, so `BaseAffixesMatched` succeeds for an unchecked requested attribute and the pipeline proceeds without correcting the selection.

Change the checks to verify that each requested attribute is selected, rather than relying on its OCR label alone.
</issue_to_address>

### Comment 2
<location path="Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md" line_range="97" />
<code_context>
+勾选时,case 只改一个子节点:
+
+```jsonc
+"BaseAffixStrength": { "recognition": "OCR", "expected": ["力量"] }
+```
+
</code_context>
<issue_to_address>
**OCR matches unrelated labels**

When a target label is also visible elsewhere on screen, the full-screen OCR checks let `BaseAffixesMatched` pass on an unrelated occurrence, and the `Select*` nodes can click that occurrence, so the pipeline proceeds with the wrong selection.

Constrain the OCR checks and selection targets to the relevant affix-panel region.

Also at `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md:126`.
</issue_to_address>

### Comment 3
<location path="Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md" line_range="176" />
<code_context>
+"AffixPanelOpened": {
+    "recognition": "OCR",
+    "expected": ["预刻写属性"],
+    "next": ["[JumpBack]ClearSelectedAffix", "SelectMain"]
+},
+
</code_context>
<issue_to_address>
**Clear-selection loop can stall**

When a click does not remove the matched color or the color match is a persistent false positive, if `ClearSelectedAffix` keeps matching after its click, the `[JumpBack]` path repeatedly returns to `AffixPanelOpened` and retries without reaching `SelectMain`; the task can remain stuck clearing indefinitely.

Bound the clearing retries and route exhaustion to an explicit failure or recovery path.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

勾选时,case 只改一个子节点:

```jsonc
"BaseAffixStrength": { "recognition": "OCR", "expected": ["力量"] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟠 高 · 错误的词条也能通过验证

当面板同时显示已选和未选属性的标签时,BaseAffixStrength 以及其他针对已选项的检查会匹配 OCR 文本,却不检查选择状态。因此,对于未勾选的请求属性,BaseAffixesMatched 也会匹配成功,流水线会继续执行,而不会修正选择状态。

请修改这些检查,以验证每个请求的属性是否已选中,而不是仅依赖其 OCR 标签。

给 AI 智能体的提示
在 `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md` 第 97 行:

**错误的词条也能通过验证**

当面板同时显示已选和未选属性的标签时,`BaseAffixStrength` 以及其他针对已选项的检查会匹配 OCR 文本,却不检查选择状态。因此,对于未勾选的请求属性,`BaseAffixesMatched` 也会匹配成功,流水线会继续执行,而不会修正选择状态。

请修改这些检查,以验证每个请求的属性是否已选中,而不是仅依赖其 OCR 标签。
Original comment in English

🟠 High · Wrong affixes pass validation

When the panel displays labels for both selected and unselected attributes, BaseAffixStrength and the other selected-item checks match OCR text without checking selection state, so BaseAffixesMatched succeeds for an unchecked requested attribute and the pipeline proceeds without correcting the selection.

Change the checks to verify that each requested attribute is selected, rather than relying on its OCR label alone.

Prompt for AI agents
In `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md` at line 97:

**Wrong affixes pass validation**

When the panel displays labels for both selected and unselected attributes, `BaseAffixStrength` and the other selected-item checks match OCR text without checking selection state, so `BaseAffixesMatched` succeeds for an unchecked requested attribute and the pipeline proceeds without correcting the selection.

Change the checks to verify that each requested attribute is selected, rather than relying on its OCR label alone.

勾选时,case 只改一个子节点:

```jsonc
"BaseAffixStrength": { "recognition": "OCR", "expected": ["力量"] }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 中 · OCR 会匹配无关标签

如果目标标签也出现在屏幕的其他位置,全屏 OCR 检查可能会因匹配到无关位置的文本而让 BaseAffixesMatched 通过;Select* 节点也可能点击该位置,导致流水线继续执行时选择了错误的属性。

请将 OCR 检查和选择目标限制在相关的词条面板区域内。

另请检查 Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md:126。

给 AI 智能体的提示
在 `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md` 第 97 行:

**OCR 会匹配无关标签**

如果目标标签也出现在屏幕的其他位置,全屏 OCR 检查可能会因匹配到无关位置的文本而让 `BaseAffixesMatched` 通过;`Select*` 节点也可能点击该位置,导致流水线继续执行时选择了错误的属性。

请将 OCR 检查和选择目标限制在相关的词条面板区域内。

另请检查 `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md:126`。
Original comment in English

🟡 Medium · OCR matches unrelated labels

When a target label is also visible elsewhere on screen, the full-screen OCR checks let BaseAffixesMatched pass on an unrelated occurrence, and the Select* nodes can click that occurrence, so the pipeline proceeds with the wrong selection.

Constrain the OCR checks and selection targets to the relevant affix-panel region.

Also at Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md:126.

Prompt for AI agents
In `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md` at line 97:

**OCR matches unrelated labels**

When a target label is also visible elsewhere on screen, the full-screen OCR checks let `BaseAffixesMatched` pass on an unrelated occurrence, and the `Select*` nodes can click that occurrence, so the pipeline proceeds with the wrong selection.

Constrain the OCR checks and selection targets to the relevant affix-panel region.

Also at `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md:126`.

"AffixPanelOpened": {
"recognition": "OCR",
"expected": ["预刻写属性"],
"next": ["[JumpBack]ClearSelectedAffix", "SelectMain"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 中 · 清除选择的循环可能卡住

如果点击没有移除匹配到的颜色,或者颜色匹配持续产生误报,那么在点击后 ClearSelectedAffix 仍可能继续匹配;此时 [JumpBack] 路径会反复返回 AffixPanelOpened 并重试,却始终无法到达 SelectMain,任务可能会无限期卡在清除操作中。

请限制清除操作的重试次数,并在重试次数耗尽时转向明确的失败或恢复路径。

给 AI 智能体的提示
在 `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md` 第 176 行:

**清除选择的循环可能卡住**

如果点击没有移除匹配到的颜色,或者颜色匹配持续产生误报,那么在点击后 `ClearSelectedAffix` 仍可能继续匹配;此时 `[JumpBack]` 路径会反复返回 `AffixPanelOpened` 并重试,却始终无法到达 `SelectMain`,任务可能会无限期卡在清除操作中。

请限制清除操作的重试次数,并在重试次数耗尽时转向明确的失败或恢复路径。
Original comment in English

🟡 Medium · Clear-selection loop can stall

When a click does not remove the matched color or the color match is a persistent false positive, if ClearSelectedAffix keeps matching after its click, the [JumpBack] path repeatedly returns to AffixPanelOpened and retries without reaching SelectMain; the task can remain stuck clearing indefinitely.

Bound the clearing retries and route exhaustion to an explicit failure or recovery path.

Prompt for AI agents
In `Storage/experiences/overflow65537/pipeline-checkbox-multiselect/index.md` at line 176:

**Clear-selection loop can stall**

When a click does not remove the matched color or the color match is a persistent false positive, if `ClearSelectedAffix` keeps matching after its click, the `[JumpBack]` path repeatedly returns to `AffixPanelOpened` and retries without reaching `SelectMain`; the task can remain stuck clearing indefinitely.

Bound the clearing retries and route exhaustion to an explicit failure or recovery path.

@kqcoxn
kqcoxn merged commit f3dfa37 into main Oct 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants