Repository navigation
Commit 92ce3af
fix(plugin-approvals,plugin-audit,plugin-sharing): list views drop the target object's API name column beside a record pointer (#24600)
Fixes #24501
Clause-②: no
## Parked: draft until the console pin carries the type-half fetch
This PR stays **draft** until objectstack's `.objectui-sha` on
`origin/main` has objectui `fe11eb12e578fe38cff8ba454de6507bd99daa2a` as
an ancestor. That commit is objectstack-ai/objectui#13042, which answers
objectstack-ai/objectui#13036. Landing this PR earlier turns the Record
column of every list below into raw record ids, because the console at
the current pin fetches only a list's shown columns, and the pointer
cell resolves its record from the row's type half.
- **The pin today** is `4016370af3c9`, committed 2026-10-19T03:42Z. The
fix was committed at 11:29Z. In the objectui clone, `git merge-base
--is-ancestor fe11eb1 4016370` answers exit 1. The clone is
shallow, so a control leg ran on the same clone: `4016370af3c9~30`
(`b5153f44ea`) answers exit 0.
- **Expected-red list: empty.** No PR or merge-queue check draws these
lists through the console, so nothing here turns red while the PR is
parked. The parking is about what users see.
- **Unlock:** a pin bump past `fe11eb12e5` lands on `main`. This PR does
not move the pin. After that: sync with `main`, re-check, ready, queue.
## What changes
`object_name` (a `Field.text` labelled "Object" that holds the target
object's API name, such as `showcase_announcement`) leaves the `columns`
of every list view where it sat beside its `record_id` pointer id half
(`referenceVia: 'object_name'`):
| Object | Views |
|---|---|
| `sys_approval_request` | `all_requests`, `my_pending`,
`submitted_by_me`, `completed` |
| `sys_approval_action` | `recent`, `all_actions` (`by_actor` never
listed it) |
| `sys_audit_log` | `recent`, `writes_only`, `record_views`,
`all_events` |
| `sys_record_share` | `all_shares`, `granted_to_me`, `granted_by_me`,
`by_object`, `manual_grants`, `rule_grants` |
| `sys_share_link` | `active_links`, `by_me`, `revoked`, `all_links` |
- **Left as is:** `sys_audit_log.config_changes` lists `object_name`
without `record_id`. Its rows (`config_change` and `import`) carry no
`record_id`, so no pointer names their target. That view does not follow
this pattern and is unchanged.
- `object_name` stays a declared field on all five objects. The pointer
pair, its indexes, `highlightFields`, `titleFormat` and every query on
the pair are untouched. Only list `columns` move.
- The Record column keeps drawing the target record (its object's icon
and the record's name), once the console fetches the type half for the
cell.
## Readings behind the route (seat answer `6264371362`, route A)
- **A1, the positions,** re-read on `origin/main` `de4352460`. Every
view in the table lists `object_name` immediately beside `record_id`,
and each object's `record_id` declares `referenceVia: 'object_name'`
(request `:263`, action `:154`, audit log `:321`, record share `:172`,
share link `:168`, before this diff). `config_changes` is the one view
that lists the type half without the id half.
- **A2, the console half,** read from objectui `fe11eb12e5` (`git show`,
read-only). Both projection builders now request the sibling. `ListView`
`selectFields` adds `referenceVia` of every FLS-surviving column through
`addSpeculative`, which covers ListView's own fetch. `ObjectGrid`
`getSelectFields` adds a `referenceViaFields` harvest to `extraFields`,
which covers the fetch a grouped grid owns (`gridOwnsGroupedFetch`) and
a standalone `object-grid`. The fix is on objectui `main` (`8aa8e3e1e5`,
ancestor check exit 0).
- **A3, the approvals pin:** case (f) of
`approval-list-display-labels.integration.test.ts` asserted that
`recent` / `all_actions` contain `object_name`, `record_id` and
`acted_as_label`. It now asserts `record_id` and `acted_as_label`, and
that `object_name` is absent.
## Pins
Each package now enumerates its own objects' list views. The approvals
pin uses the objects `ApprovalsServicePlugin` registers. The audit and
sharing pins use `objects/index.ts`. Each pin asserts two things:
1. No list view shows a `referenceVia` sibling beside its id half.
2. The family's views still show the id half, so the Record column names
the target.
The pins live in `sys-approval-request-pointer-pair.test.ts`,
`sys-audit-log-pointer-pair.test.ts` and
`sharing-pointer-pairs.test.ts`.
**Ablation** (one `object_name` put back per package, at commit
`c62273124`, through `scripts/ablation-replace.mjs` in wrap mode). The
mutation landed each time (anchor x1 to x0, blob changed). Exactly one
test went red each time, `no list view shows a referenceVia sibling
beside its id half` (`expected [ Array(1) ] to deeply equal []`;
approvals names `sys_approval_request.all_requests: object_name`). The
file was restored each time with blob equal to `HEAD` and an empty `git
diff HEAD`:
| Package | Mutated view | Vitest exit |
|---|---|---|
| plugin-sharing | `sys_record_share.all_shares` | 1 |
| plugin-audit | `sys_audit_log.record_views` | 1 |
| plugin-approvals | `sys_approval_request.all_requests` | 1 |
The tests import the objects by relative source path, so the ablation
needed no rebuild.
## Verification, at `c62273124`
All of this ran under `scripts/pm/os-verify-lock.sh`:
- **Build:** the dependency closure of the three packages, then the
packages themselves. Both exited 0.
- **Tests:** `@objectstack/plugin-approvals` had 81 files and 1114 tests
pass; `@objectstack/plugin-audit` 56 files and 899 tests;
`@objectstack/plugin-sharing` 49 files and 1163 tests. Every run exited
0.
- **Typecheck:** `pnpm --filter` with the three packages, `run
typecheck`, exited 0. `check:test-typecheck` was OK for all three, and
the edited test files gained no ledger entries.
- **Derived gates:** `node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack` gave 67 commands, and all 67 ran with
exit 0.
- Two of them first exited 3 (`PREREQUISITE NOT MET`): `check:i18n` and
`check:dual-build-cjs-loads`. After a full workspace build, both re-ran
with exit 0.
- `--ran` reports: "67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN".
- **Declared to CI:** `test:repo`, the whole-tree families, the
type-check lanes and Build Core.
- **Not measured: a browser reading of the lists.** The bundled console
at the pin predates the fix. A reading against objectui `main` needs an
objectui worktree build, and it belongs to the unlock, when the bundled
console carries the fix.
## Acceptance notes
- **Rows without a `record_id` lose their target hint.**
`sys_audit_log`'s `recent` and `all_events` also list `config_change`
and `import` rows. Those carry `object_name` (`sys_setting`,
`sys_platform_setting`, `sys_user`) and no `record_id`. They now show an
empty Record cell, and the action column says what they are. The
`config_changes` view still shows their object.
- **`sys_record_share.by_object` still groups and sorts on
`object_name`.** The console fetches the grouping field, so the group
header still reads the API name. That is a grouping, not a column, and
it is outside this card's surface. It is reported to the seat with the
next note.
- **Not in this card's surface, reported to the seat:** these
record-page surfaces still name the target by its API name:
- `sys_audit_log`, `sys_record_share` and `sys_share_link` list
`object_name` in `highlightFields`.
- `sys_record_share` and `sys_share_link` have no `nameField`, and their
`titleFormat` starts with `{object_name}/{record_id}`.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01LR1cD9JqgkeqY7k9rrZH8s)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent eadea57 commit 92ce3af
10 files changed
Lines changed: 231 additions & 22 deletions
File tree
- .changeset
- packages/plugins
- plugin-approvals/src
- plugin-audit/src
- objects
- plugin-sharing/src
- objects
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | | - | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
77 | | - | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
100 | | - | |
| 107 | + | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| |||
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | | - | |
| 116 | + | |
110 | 117 | | |
111 | 118 | | |
112 | 119 | | |
| |||
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
123 | | - | |
| 130 | + | |
124 | 131 | | |
125 | 132 | | |
126 | 133 | | |
| |||
130 | 137 | | |
131 | 138 | | |
132 | 139 | | |
133 | | - | |
| 140 | + | |
134 | 141 | | |
135 | 142 | | |
136 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
53 | | - | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
63 | | - | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
108 | | - | |
| 115 | + | |
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
| |||
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
140 | | - | |
| 147 | + | |
141 | 148 | | |
142 | 149 | | |
143 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
0 commit comments