Skip to content

Conversation

@wuayee
Copy link
Contributor

@wuayee wuayee commented Oct 24, 2025

🔗 相关问题 / Related Issue

Issue 链接 / Issue Link: #515 👈👈

  • 我已经创建了相关 Issue 并进行了讨论 / I have created and discussed the related issue
  • 这是一个微小的修改(如错别字),不需要 Issue / This is a trivial change (like typo fix) that doesn't need an issue

📋 变更类型 / Type of Change

  • 🐛 Bug 修复 / Bug fix (non-breaking change which fixes an issue)
  • ✨ 新功能 / New feature (non-breaking change which adds functionality)
  • 💥 破坏性变更 / Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 文档更新 / Documentation update
  • 🔧 重构 / Refactoring (no functional changes)
  • ⚡ 性能优化 / Performance improvement
  • 📦 依赖升级 / Dependency upgrade (update dependencies to newer versions)
  • 🚀 功能增强 / Feature enhancement (improve existing functionality without breaking changes)
  • 🧹 代码清理 / Code cleanup

📝 变更目的 / Purpose of the Change

📋 主要变更 / Brief Changelog

  1. 增加节点配置项修改功能:如果是有草稿态,则直接修改该草稿态;如果只有发布态,则会帮用户创建草稿态并修改,修改完后会自动发布 / 1. Add the function of modifying node configuration items: if there is a draft form, modify the draft form directly; if there is only a published form, create a draft form for the user and modify it, and it will be automatically published after the modification is completed.

🧪 验证变更 / Verifying this Change

测试步骤 / Test Steps

  1. 修改未发布应用里面的配置项 / Modify the configuration items in the unpublished application
  2. 对话调试观察是否修改成功 / Debug the dialogue to see if the modification is successful
  3. 发布应用,再次尝试修改应用里面的配置项 / Publish the application and try to modify the configuration items in the application again
  4. 在应用市场对应用进行对话,观察是否修改成功 / Communicate with the application in the application market to see if the modification is successful.

测试覆盖 / Test Coverage

  • 我已经添加了单元测试 / I have added unit tests
  • 所有现有测试都通过 / All existing tests pass
  • 我已经进行了手动测试 / I have performed manual testing

📸 截图 / Screenshots

✅ 贡献者检查清单 / Contributor Checklist

请确保你的 Pull Request 符合以下要求 / Please ensure your Pull Request meets the following requirements:

基本要求 / Basic Requirements:

  • 确保有 GitHub Issue 对应这个变更(微小变更如错别字除外)/ Make sure there is a Github issue filed for the change (trivial changes like typos excluded)
  • 你的 Pull Request 只解决一个 Issue,没有包含其他不相关的变更 / Your PR addresses just this issue, without pulling in other changes - one PR resolves one issue
  • PR 中的每个 commit 都有有意义的主题行和描述 / Each commit in the PR has a meaningful subject line and body

代码质量 / Code Quality:

  • 我的代码遵循项目的代码规范 / My code follows the project's coding standards
  • 我已经进行了自我代码审查 / I have performed a self-review of my code
  • 我已经为复杂的代码添加了必要的注释 / I have commented my code, particularly in hard-to-understand areas

测试要求 / Testing Requirements:

  • 我已经编写了必要的单元测试来验证逻辑正确性 / I have written necessary unit-tests to verify the logic correction
  • 当存在跨模块依赖时,我尽量使用了 mock / I have used mocks when cross-module dependencies exist
  • 基础检查通过:mvn -B clean package -Dmaven.test.skip=truenpm install --force && npm run build:pro / Basic checks pass
  • 单元测试通过:mvn clean install / Unit tests pass

文档和兼容性 / Documentation and Compatibility:

  • 我已经更新了相应的文档 / I have made corresponding changes to the documentation
  • 如果有破坏性变更,我已经在 PR 描述中详细说明 / If there are breaking changes, I have documented them in detail
  • 我已经考虑了向后兼容性 / I have considered backward compatibility

📋 附加信息 / Additional Notes


审查者注意事项 / Reviewer Notes:

@wuayee wuayee requested review from a team and zgqhope and removed request for a team October 24, 2025 08:33
@wuayee wuayee self-assigned this Oct 24, 2025
@wuayee wuayee added in: builder Issues in app-builder modules type: feature A general feature labels Oct 24, 2025
@wuayee wuayee added this to Nova Oct 24, 2025
@wuayee wuayee added this to the 1.3.1 milestone Oct 24, 2025
@wuayee wuayee linked an issue Oct 24, 2025 that may be closed by this pull request
4 tasks
reeeborn33
reeeborn33 previously approved these changes Oct 25, 2025
@wuayee wuayee changed the base branch from main to 1.3.x October 25, 2025 08:28
@wuayee wuayee dismissed reeeborn33’s stale review October 25, 2025 08:28

The base branch was changed.

@wuayee wuayee requested a review from a team October 25, 2025 08:28
AppVersion update(String appId, AppBuilderFlowGraphDto graphDto, OperationContext context);

/**
* 根据传入的 {@link AppVersion} 数据更新流程.
Copy link
Contributor

Choose a reason for hiding this comment

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

image 注释里注意下中英文符号

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

this.appVersionService.updateGraph(latestVersion, flowGraphDto, context);
if (isPublished) {
AppBuilderAppDto appDto = this.converterFactory.convert(latestVersion, AppBuilderAppDto.class);
this.publish(appDto, context);
Copy link
Contributor

Choose a reason for hiding this comment

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

image 更新和发布是不是应该分开,另外这里识别到之前是已发布,这里就发布,这样也不合理。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

Map<String, Object> pageConfigMap = ObjectUtils.cast(pageConfig);
Object shapesObj = pageConfigMap.get("shapes");
if (!(shapesObj instanceof List)) {
throw new AippException(AippErrCode.NODE_CONFIG_UPDATE_FAILED, "Shapes is not an array type.");
Copy link
Contributor

Choose a reason for hiding this comment

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

image 统一下描述,这里一会是list一会是array

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

return ObjectUtils.cast(shape);
}
}
return new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

image 这里业务上找不到对应节点应该直接抛异常,不应该再外部继续处理触发后续异常。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

}
List<?> shapes = ObjectUtils.cast(shapesObj);
if (shapes.isEmpty()) {
throw new AippException(AippErrCode.NODE_CONFIG_UPDATE_FAILED, "shapes array is empty.");
Copy link
Contributor

Choose a reason for hiding this comment

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

image 风格不统一,首字母大写。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

/**
* 节点配置更新失败
*/
NODE_CONFIG_UPDATE_FAILED(90002146, "节点配置更新失败,失败原因:{1}。"),
Copy link
Contributor

@loveTsong loveTsong Oct 27, 2025

Choose a reason for hiding this comment

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

image 这里应该从0开始,同时增加该异常场景的单元测试。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

90002143=没有权限操作该表单。
90002144=应用未打开游客模式。
90002145=大模型调用超时,请尝试更换默认模型。
90002146=节点配置更新失败,失败原因:{1}。
Copy link
Contributor

Choose a reason for hiding this comment

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

image 占位符错误,应该为0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@wuayee wuayee force-pushed the main_node_config_update branch from 010c7b0 to 7fa643e Compare October 27, 2025 08:44
void updateNodeConfigs(AppBuilderNodeConfigsDto nodeConfigs, OperationContext context);

/**
* 更新节点的配置项。
Copy link
Contributor

Choose a reason for hiding this comment

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

image 注释错误

@wuayee wuayee force-pushed the main_node_config_update branch from 7fa643e to 35081e7 Compare October 27, 2025 08:52
@wuayee wuayee force-pushed the main_node_config_update branch from 35081e7 to c4941c6 Compare October 27, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: builder Issues in app-builder modules type: feature A general feature

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

增加修改某个或者某些节点配置值的功能

3 participants