fix(app-shell): RecordDetailView modal 分派报告不可解析 target,删除死路 server 回退 (#3320) - #3326
Merged
Merged
Conversation
…targets instead of POSTing to /actions (#3320) Mirror objectstack#3959 on the record page: type:'modal' is CLIENT-SIDE ONLY. The pre-#3959 fallthrough to serverActionHandler could never succeed — the framework rejects type:'modal' over REST with a 400 (headlessActionTypeError) — so an unresolvable target is now reported as the authoring error it is, with the same copy as the shared console runtime. Docblock rewritten so its parity claim is true again. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVPjPzmmAJ2Ngtvgg5MSRa
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Fixes #3320
变更说明
按 PM 裁决采用方案 a(最小修法):在
RecordDetailView.modalActionHandler镜像 objectstack#3959 在共享 console runtime 中的行为与错误文案。基于 #3324(#2904 dispatcher 收敛)之后的新形状。type:'modal'的 target 既解析不到 page 也解析不到 object 时,原实现回退serverActionHandler(action)POST 到/actions/...。该路径永远不可能成功——framework 的headlessActionTypeError对 REST 上的type:'modal'一律 400——只会把一个 authoring 错误变成一次令人困惑的往返。现在与共享 runtime 一样返回描述性错误(指名 action、失效的 target、以及出路:type:'script'+params),错误文案与useConsoleActionRuntime.modalActionHandler逐字一致,两个 surface 不再漂移。serverActionHandler本身保留(仍是scripthandler)。RecordDetailView.modalDispatch.test.tsx:useConsoleActionRuntime.test.tsx中 "reports an unresolvable target instead of POSTing to /actions" 的 RecordDetailView 侧对应测试。测试捕获视图真实传给自己 ActionProvider 的 handlers(pass-through 包装、保留真 Provider,按唯一携带approval的那组选取),断言:不可解析 target → 不调 modalHandler、不调 server dispatch、不发 fetch、返回success: false且文案含 action 名与type:'script' with params;可解析 target → 客户端打开、绝不 POST。@object-ui/app-shellpatch(fixed group,非 major)。方案 b(把 modal 分派上提进共享包装)未采用:需要新增导出面且净改动超过 30 行预裁上限,且会在刚合并的 #2904 表面上引入二次扰动。
未触碰 popup/SSO 文案(#3321 地盘)与
content/docs/releases/。验证
pnpm exec vitest run packages/app-shell/src/views/RecordDetailView.modalDispatch.test.tsxpnpm exec vitest run …pnpm exec vitest run packages/app-shell --maxWorkers=2pnpm --filter @object-ui/app-shell type-check破坏验证实录
把死路回退加回(
return serverActionHandler(action))后运行新测试:还原后 2 passed。红点恰好落在「server dispatch 被调用」的断言上,证明该测试锁住的正是本 bug。
🤖 Generated with Claude Code
https://claude.ai/code/session_01NVPjPzmmAJ2Ngtvgg5MSRa
Generated by Claude Code