fix: 修复移动端转办动作崩溃并补齐 triggerFrontEvent 路径审批操作拦截器 - #47
Merged
Conversation
问题一:转办动作选人弹框崩溃
- flow-mobile-approval 的 transfer.tsx 渲染业务方覆盖视图时未透传
props,仅转办缺失(add-audit/delegate/PC 端均传 {...props}),
导致覆盖视图 action=undefined,useEffect 依赖 [action.id] 求值崩溃。
- 修复:transfer.tsx 渲染 ActionView 时补传 {...props}。
问题二:triggerFrontEvent 自定义按钮绕过拦截器
- 该路径不调用 action(),移动端此前直接 emit,未执行审批操作拦截器
(PC 端已处理)。新增 dispatchApprovalFrontEvent:全部拦截器放行后
才派发事件,任一拦截返回 false 则终止,与 PC 语义对齐。
- 接入 flow-approval-actions.tsx 的 handlerAction 与 footer 按钮两处派发点。
均为 TDD 先行:新增 4 个用例覆盖 props 透传与拦截器放行/拦截行为。
GitHub: fix #46
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
关联 issue:#46(修复 mobile 端转办选人崩溃并补齐 triggerFrontEvent 路径的审批操作拦截器)。本次按 TDD(先红后绿)落实两个问题。
问题一:含「转办」动作的流程在 mobile 端打开即崩溃
flow-mobile-approval的transfer.tsx渲染业务方覆盖视图时未透传 props(<ActionView />),仅转办缺失——add-audit.tsx/delegate.tsx/ PC 端均传{...props}。PersonSelectModal收到action={undefined},其useEffect依赖[action.id]求值崩溃。transfer.tsx渲染ActionView时补传{...props}。问题二:移动端 triggerFrontEvent 自定义按钮绕过审批操作拦截器
action(),移动端此前直接emit,未执行拦截器(PC 端已处理)。dispatchApprovalFrontEvent(先interceptAction,全部放行才emit,任一拦截返回 false 则终止),并接入flow-approval-actions.tsx的handlerAction与 footer 按钮两处派发点,与 PC 语义对齐。测试
action(回归保护)+ 前端触发事件拦截器放行/拦截时的派发行为。flow-mobile-approval测试 12 个用例通过;rslib build编译通过。@coding-flow/flow-mobile-approvalpatch)。Closes #46
🤖 Generated with Claude Code