Uh oh!
There was an error while loading. Please reload this page.
chore(plugin-grid): 对象声明批量 action 的浏览器验证 demo (#3002) - #3034
Merged
Conversation
) Manual-verification page for the #3002 selection-bar fold, following the existing plugin-local vite demo convention (demo/index.html for the Import Wizard, plugin-gantt/demo). pnpm --dir packages/plugin-grid exec vite demo --port 5198 open http://localhost:5198/bulk-actions.html Everything below the mock boundary is the real stack — ObjectGrid, BulkActionBar, BulkActionDialog, useBulkExecutor, ActionRunner. Only the data source and window.fetch are faked, the latter logging each action request to an on-page panel so the per-record fan-out is directly observable. Covers all three vocabularies the bar folds: an object action flagged `bulkEnabled: true` that no view names, a legacy `bulkActions` name promoted to its declared action (with a param collected once), and an unresolvable name that stays a by-name runner-handler dispatch. One record fails with 422 so per-record attribution is visible rather than a blanket success. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…e assignment
The React Compiler lint rejects reassigning a module-level slot from inside a
component ('Cannot reassign variables declared outside of the component/hook').
The fetch stub lives outside React, so subscribe through useSyncExternalStore
on the append count instead of capturing setState.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
#3002 的手工验证页,沿用仓库既有的 plugin 本地 vite demo 约定(
demo/index.html是 Import Wizard 的,plugin-gantt/demo同理)。pnpm --dir packages/plugin-grid exec vite demo --port 5198然后打开
http://localhost:5198/bulk-actions.html(.claude/launch.json里也加了grid-bulk-demo配置)。为什么加这个
#3031 合并时只跑了 DOM 测试。这个 demo 让同一条链路能在真实浏览器里点出来:mock 边界以下全是真实栈 ——
ObjectGrid/BulkActionBar/BulkActionDialog/useBulkExecutor/ActionRunner。只 mock 了两样:数据源(内存 store)和window.fetch(把每条 action 请求打到页面底部的日志面板,于是逐记录 fan-out 直接可见)。三条词汇全覆盖:
bulkEnabled: true,没有任何 view 声明bulkActions: [...]点名{type: <名字>},从不执行Recalculate Estimate带一个select参数,用来验证「参数只收一次」——对话框收集后随每条记录派发,runner 不会逐条再弹。记录t3固定返回 422,于是逐条归因(成功 4/5 + 错误行 + 重试 + 错误 CSV)可见,而不是一刀切的成功。实测结果
/api/demo/mark-done,record=t1..t5各带自己的_rowRecord;t3 → 422;结果面板「成功 4 / 5 · 失败 1」。options/defaultValue;确认步骤汇总一次;5 条请求各带params={"basis":"points"}。纯新增,不碰任何产品代码。
🤖 Generated with Claude Code