This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 2e3da72
fix(components): action:menu and action:group take the host's disabled by name (objectui#11182) (#11221)
Fixes #11182
Clause-②: no
Implemented by `os-dev` in session
`https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ`, dispatched
under claim comment 5912386098 (`domain:ui#1`).
## What changed
`action:menu` and `action:group` now take the host's forwarded
`disabled` by name. This is the objectui#9131 rule `action:button` and
`action:icon` already follow. There is one convention and no new helper.
- **`action:menu`** destructures `disabled: hostDisabled` off the props,
so `...rest` no longer carries a `disabled` key. The trigger is
`disabled={hostDisabled || loading}`. The menu declares no enablement
gate of its own: the renderer reads none, the registry `inputs` publish
none, and `ActionMenuPropsSchema` in `@objectstack/spec` 17.5.0 declares
no `disabled` or `enabled`. So none was invented.
- **`action:group`** destructures `disabled: hostDisabled` the same way.
Inline mode hands it to every `InlineActionButton`, where it leads the
OR: `hostDisabled || (declared gate) || loading`. Dropdown mode puts it
on the trigger: `hostDisabled || dropdownLoading`. The wrapping div no
longer receives it.
- Both parameter annotations declare `disabled?: boolean`, as
`ActionButtonRendererProps` does. The annotation is inline and not
exported, so no public type changes.
- Changeset: `@object-ui/components` patch.
## The defect, measured red before any source edit
`SchemaRenderer` forwards `disabled: __disabled || undefined`. The key
is always present and only the value is conditional. `action:menu` wrote
`disabled={loading}` and then spread `{...rest}`, so the forwarded
`undefined` overwrote the in-flight verdict.
The new pin was run on the untouched tree first. Its in-flight row read:
```
direct: { spinning: true, disabled: true }
node: { spinning: true, disabled: false }
```
That is the card's probe reading exactly. A menu rendered through
`SchemaRenderer` showed its spinner while its trigger stayed pressable.
## action:group, measured in the same pass
A scratch probe used the real `SchemaRenderer` and an inline group with
`disabled: true` on the node. It was deleted after the run. Its reading
on the untouched tree:
```
hostDisabled true -> wrapper DIV, disabled attribute "", member button disabled false
hostDisabled none -> wrapper DIV, no disabled attribute, member button disabled false
```
So the forwarded `disabled` did reach the wrapper, where it disables
nothing. In dropdown mode the host verdict was dropped, and the trigger
stayed pressable. Both modes reproduced red in the new pin before the
fix.
The in-flight half does not reproduce on the group. The dropdown trigger
never spread `rest`, and inline members keep their own loading state. So
only the host-disabled half was changed.
## Tests
New
`packages/components/src/renderers/action/__tests__/action-menu-host-disabled-11182.test.tsx`.
It uses the real `SchemaRenderer`, the real registry, and an `api`
handler held in flight until the test settles it:
- In-flight member: the trigger is disabled on both channels (direct
registry mount and `SchemaRenderer`), read as one object, and it
re-enables on both when the action settles.
- A host-disabled menu stays disabled. This covers a node `disabled:
true`, a node predicate, and `properties.disabled`.
- A menu the host disables while its action runs stays disabled after
the action settles.
- An idle menu with no gate, or with a false predicate, is pressable on
both channels.
- Group, inline: every member is disabled, and the wrapper carries no
`disabled` attribute. Group, dropdown: the trigger is disabled. With no
gate or a false gate, both modes are pressable.
**Red before the fix** (commit `cfc9b6db98`, test staged, no source
edit): 3 failed, 4 passed (7). The failures were the in-flight row and
the two host-disabled group rows.
**Ablation** was run from the committed fix on `06e5657081`. Each leg
overwrote the file, printed anchor counts, ran the file, then restored
from `HEAD` under a trap. Each restore was proven by blob hashes equal
to `HEAD` and an empty `git diff HEAD`.
| Leg | Anchor counts after the edit | Result |
|---|---|---|
| `action-menu.tsx` at base | `hostDisabled` 0, `disabled={loading}` 1 |
1 failed: the in-flight row |
| `action-group.tsx` at base | `hostDisabled` 0,
`disabled={dropdownLoading}` 1 | 2 failed: the inline and dropdown rows
|
| menu keeps the destructure, drops `hostDisabled` from the OR | OR 0,
`disabled={loading}` 1 | 2 failed: the two host-disabled menu rows |
## Local gates
Commands and results:
- `pnpm --workspace-concurrency=2 --filter '@object-ui/components^...'
build` exited 0 (7 packages).
- `pnpm --filter @object-ui/components type-check` exited 0 on
`06e5657081`. `tsc -p tsconfig.test.json --listFiles` lists the new test
file.
- `pnpm exec vitest run packages/components/src/renderers/action/` plus
the two `packages/react` pins
(`SchemaRenderer.disabledDeclaredGate.test.tsx`,
`SchemaRenderer.enablementEnvelopeConfigBag.test.tsx`) on `06e5657081`:
Test Files 32 passed (32), Tests 530 passed (530).
- `pnpm exec vitest run packages/components/ --maxWorkers=2` on
`b9967bba99`: Test Files 342 passed, 1 skipped (343). The later commits
change only the new test file and the changeset, and the
action-directory run above covers that test file.
- On `809de9ca8e` (HEAD), all exited 0: `node
scripts/check-changeset-presence.mjs`, `pnpm check:control-bytes`, `pnpm
check:new-line-citations` (0 new citations), `pnpm
check:changeset-claims`, `pnpm check:pending-changeset-literals`, `node
scripts/check-changeset-no-major.mjs`.
- On `06e5657081`, both exited 0: `pnpm check:action-forward-parity`,
`pnpm check:test-path-roots`.
- ESLint on the three touched sources: 0 errors. The warning counts
equal the base versions (menu 11, group 15, all pre-existing
`no-explicit-any`), and the new test has 0. The root config uses
`tseslint.configs.recommended` with no `parserOptions.project` or
`projectService`, and no rule in `eslint-rules/` reads the filesystem,
so this diff cannot move the verdict of an untouched file. The full
`pnpm lint` run is left to CI.
## Acceptance notes
These were read from source and not measured. They were not filed:
- `action:menu` still spreads the raw `rest` onto the trigger, where
`action:button` and `action:icon` pass it through
`toFormControlDomProps`. The node's other keys therefore reach the
trigger's props. The inline `action:group` wrapper receives its other
keys the same way. Carrier: none.
- `autoTrigger` members of a menu that is disabled from mount still run.
`useAutoTriggerOnce` consults the action's `visible`, not the enablement
verdict, which is the same as on `action:button`. This was seen once, on
the menu only, by the first draft of the settle row. The row was then
rewritten so it no longer depends on that behaviour. Carrier: none.
objectui#11212 (the permission-predicate fault policy on `action:group`
/ `action:icon`) is serial behind this PR on `action-group.tsx`. No
`visible` or `disabled` predicate fault policy was changed here.
---
_Generated by [Claude
Code](https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1263e40 commit 2e3da72
4 files changed
Lines changed: 315 additions & 8 deletions
| 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 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 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 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 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 | + | |
| 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 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
123 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
| |||
212 | 223 | | |
213 | 224 | | |
214 | 225 | | |
215 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
216 | 229 | | |
217 | | - | |
| 230 | + | |
218 | 231 | | |
219 | 232 | | |
220 | 233 | | |
| |||
224 | 237 | | |
225 | 238 | | |
226 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
227 | 248 | | |
228 | 249 | | |
229 | 250 | | |
| |||
357 | 378 | | |
358 | 379 | | |
359 | 380 | | |
360 | | - | |
| 381 | + | |
| 382 | + | |
361 | 383 | | |
362 | 384 | | |
363 | 385 | | |
| |||
399 | 421 | | |
400 | 422 | | |
401 | 423 | | |
| 424 | + | |
402 | 425 | | |
403 | 426 | | |
404 | 427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
198 | 200 | | |
199 | | - | |
| 201 | + | |
200 | 202 | | |
201 | 203 | | |
202 | 204 | | |
| |||
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
209 | 220 | | |
210 | 221 | | |
211 | 222 | | |
| |||
366 | 377 | | |
367 | 378 | | |
368 | 379 | | |
369 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
370 | 386 | | |
371 | 387 | | |
372 | 388 | | |
| |||
0 commit comments