Repository navigation
Commit a52cfaf
fix(app-shell): flow list field reads a stored string as a one-entry list (#26038)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9FoS954UD49NiRcXvuTYghQ)_
Fixes #25999
Clause-②: no
Metadata-protocol: none
## What changed
Studio's flow inspector draws a notify node's `channels` with
`FlowStringListField`. The spec types `channels` as `string | string[]`
(`packages/spec/src/automation/io-node-config.zod.ts`), and the
runtime's `toStringList` in `notify-node.ts` reads `channels: 'email'`
as `['email']`. The field read any non-array value as an empty list, so
a stored `'email'` showed as "no entries" and adding a channel saved a
list without `email`.
`FlowStringListField` now reads its value through `toList`: a list as
before, a non-blank string as one trimmed entry (the same normalisation
the runtime applies), anything else as empty. No spec change.
## Write-back form
**An edit writes the list form.** When the author adds, removes or edits
an entry, the field commits `['email', 'sms']`, never the bare string.
The spec and the runtime accept both forms, and the list form is the one
every other list-valued key of the inspector writes. A field the author
never touches commits nothing, so a stored string stays a string until
it is edited.
## Tests
`FlowStringListField.stringValue-25999.test.tsx`, seven cases read from
the rendered rows and the committed value: a string shows as one row,
adding a second keeps the first (`['email', 'sms']`), removing the only
entry commits `undefined`, the string is trimmed, a blank string reads
as empty, a list still reads as its rows, and rendering commits nothing.
- Run at `0a84c545` under the verify lock, with the two neighbouring
inspector suites: `Test Files 3 passed (3)`, `Tests 16 passed (16)`,
VERDICT command-exit 0.
- Ablation (deleting the string branch of `toList` through
`scripts/ablation-replace.mjs`, anchor 1 to 0, restore verified blob
equals HEAD): 4 of the 7 cases go red (shows, keeps, removes, trims),
the 3 cases about lists, blanks and no-commit stay green, as expected.
## Gates
- `dispatch-gates --commands` at `0a84c545`: 34 families, all exit 0;
`--ran` reconciliation: 34 derived, 34 run, 0 NOT-MEASURED.
- `node scripts/gen-sdui-manifest-node.mjs` re-run:
`scripts/sdui-manifest.record.json` is byte-identical, because
`ui/packages/app-shell` is not among the registry's source packages.
`node scripts/check-sdui-manifest.mjs` exits 0. So the record file is
not in this diff.
## Acceptance notes
- `FlowObjectListField.tsx` (around line 764) reads a nested
`stringList` / `numberList` column the same way, with any non-array read
as `[]`. No spec key that renders there is known to accept a bare
string, so this is an observation only, not changed here. Carrier: none.
- No `ui/.github/**` or root CI workflow file is touched.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01T9TKf9xmHBvHQzFKLqxM6Q)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent e0fe7d3 commit a52cfaf
3 files changed
Lines changed: 110 additions & 4 deletions
File tree
- .changeset
- ui/packages/app-shell/src/views/metadata-admin/inspectors
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
| |||
57 | 71 | | |
58 | 72 | | |
59 | 73 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
| |||
0 commit comments