Commit ec79b11
A draft saved by a session carrying an active org lands in that org's
overlay scope (saveMetaItem's organizationId: ctx?.tenantId). The
drafts route read with NO org — getOverlayRepo(null) sees only
env-wide (organization_id IS NULL) rows — so every org-scoped draft
was invisible to the pending-changes surfaces while single reads
(which thread the ctx) and the publisher (which resolves each draft's
own scope) saw it fine: the write-org/read-null split behind
cloud#1593, measured live on a staging tenant (view draft saved
'org=org_mt42…' → _drafts answered only the older env-wide row). With
the org threaded, SysMetadataRepository.listDrafts' own $or contract
surfaces BOTH the caller's org overlay and env-wide drafts.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 927ccbb commit ec79b11
3 files changed
Lines changed: 33 additions & 0 deletions
File tree
- .changeset
- packages/rest/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
276 | 289 | | |
277 | 290 | | |
278 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3950 | 3950 | | |
3951 | 3951 | | |
3952 | 3952 | | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
| 3957 | + | |
| 3958 | + | |
| 3959 | + | |
| 3960 | + | |
| 3961 | + | |
| 3962 | + | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
3953 | 3967 | | |
3954 | 3968 | | |
3955 | 3969 | | |
| 3970 | + | |
3956 | 3971 | | |
3957 | 3972 | | |
3958 | 3973 | | |
| |||
0 commit comments