Repository navigation
Commit 84e1370
test(app-shell): give the new package-door matrix doubles the draft-overlaid read (#27103)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8VtLrLYVCgWS9LRTX72qamP)_
Fixes #27095
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:给两个新测试(#27010、#26837)的假客户端补上 `withPreviewDrafts`,只改测试,不改产品代码。
- 为什么改:#26840 让包内访问矩阵经草稿叠加读取对象,这两个测试与它交错合并,假客户端缺该方法,main 的 Test UI 因此变红。
- 风险与回滚:两行测试替身改动,零产品风险;回滚即 revert 本 PR。
- 先看:`PermissionMatrixEditor.objectGrantInherited-27010.test.tsx` 与
`PermissionMatrixEditor.packageDoorDraftBase-26837.test.tsx` 的
`makeClient`。
- 两分钟验证:`pnpm --dir ui exec vitest run
packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.objectGrantInherited-27010
packages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.packageDoorDraftBase-26837`,预期全绿。
- 需要你做的:无,席位落地。
## What changes
`withPreviewDrafts() { return this; }` added to the fake client of the
two package-door matrix tests that merged beside #26840 (PR #27064):
#27010's `objectGrantInherited-27010` and #26837's
`packageDoorDraftBase-26837`. Same addition as the other matrix doubles.
No product code changes.
## Why
Main went red on Test UI (shards 11 and 12) after queue merges crossed:
#27064 made the package door read objects through
`MetadataClient.withPreviewDrafts(true)`, and these two new tests' fakes
did not have that method.
## Tests
- Red leg (the two files as on `main`): Test Files 2 failed, Tests 4
failed.
- Green leg: those two files plus `draftObjects-26840`: Test Files 3
passed, Tests 28 passed.
- Sweep: every app-shell test that mounts the matrix (74 files). They
pass at `76e90df6` with the #27010 fix (714 tests). The other 36 files
without `withPreviewDrafts` never mount the matrix under a `packageId`,
so they never call it.
## Verification
Derived gates are in the os-dev report on #27095.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JQwxbYLTHkXTxBf89Sud8r
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbYLTHkXTxBf89Sud8r)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0fb0dda commit 84e1370
2 files changed
Lines changed: 4 additions & 0 deletions
File tree
- ui/packages/app-shell/src/views/metadata-admin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
0 commit comments