Skip to content

fix: workflow variable aggregation node keyname validate - #8217

Merged
fit2cloudwxx merged 1 commit into
v3from
pr@v3@fix_workflowVarAggregationNodeValidate
Nov 30, 2026
Merged

fit2cloudwxx merged 1 commit into
v3from
pr@v3@fix_workflowVarAggregationNodeValidate

Conversation

@shaohuzhang1

@shaohuzhang1 shaohuzhang1 commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

【【智能体】变量聚合节点的group中键名设置为不填了,这不应该是必填项】
https://www.tapd.cn/tapd_fe/45245355/bug/detail/1145245355001080694

:rules="{ whitespace: true, required: true, message: t('workflow.variableAggregation.key.requiredMessage'), trigger: 'blur' }"
>
<el-input v-model="item.key" :placeholder="t('workflow.variableAggregation.key.placeholder')" maxlength="256" />
</el-form-item>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Review of the diff

This diff removes a per-item validation rule for key from an <el-form-item> inside a nested v-for loop. Everything else in the snippet is unchanged.

Potential issues

  1. Likely behavioral regression (validation removed)
    The removed rule was { whitespace: true, required: true, message: ..., trigger: 'blur' }. Unless this rule was moved to another place (e.g., added dynamically via setRules, a parent-level array of rules, or handled by a custom validator), the key field will no longer be validated at all. This is the most important thing to verify.

  2. Dynamic prop path + rules removed
    The :prop="\group_list.${gIndex}.variable_list.${vIndex}.key`"` is still there, so the form model path is intact — but without rules it's effectively a no-op (unless validation is driven elsewhere).

  3. Loss of whitespace: true
    Even if required is enforced elsewhere, dropping whitespace: true means a key consisting only of spaces could pass. If whitespace-only keys are invalid, this check must be preserved somewhere.

  4. No new source of truth shown in the diff
    If the intent was to centralize/refactor validation logic, the corresponding change is not visible here. Please confirm one of:

    • Rules were added at the <el-form :rules="..."> level (with matching dynamic property names), or
    • A validator function now handles this field, or
    • A formData-level validation runs before submit.
  5. Localized message reference removed
    The t('workflow.variableAggregation.key.requiredMessage') string may now be orphaned (unused i18n key). Consider cleaning it up — or verify it's reused elsewhere in the codebase.

  6. Test coverage
    Confirm that e2e/unit tests cover "empty key" and "whitespace-only key" cases; otherwise this regression may go unnoticed.

Suggestion

If the goal was to remove the inline rule, ensure the same constraints (required + whitespace) are enforced through a single authoritative mechanism, e.g.:

const rules = computed(() => ({
  // ...
}));
// or a custom validator on the el-form

and add a test asserting that an empty/whitespace key blocks submission.

Bottom line: The change is not obviously broken syntactically, but it silently drops required/whitespace validation on variable_list[*].key. Verify that validation is still enforced elsewhere before merging.

@fit2cloudwxx
fit2cloudwxx merged commit a9244d5 into v3 Nov 30, 2026
3 of 4 checks passed
@fit2cloudwxx
fit2cloudwxx deleted the pr@v3@fix_workflowVarAggregationNodeValidate branch November 30, 2026 06:18
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