Repository navigation
Commit 2b7c331
fix(service-sms, runtime): the Send test SMS refusals and the flow clone notice name admin controls, not REST recipes (#25421)
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuACdPWFJTLDcTrByFCHLzqb)_
Fixes #25345
Clause-②: no
Metadata-protocol: none
Two pieces of admin copy that the console shows told the admin to call
the REST API. Each one now names the control the admin uses instead. The
REST detail stays in developer copy.
## What changed
**Send test SMS** (`packages/services/service-sms/src/sms-plugin.ts`,
`resolveSmsTestRecipient`). Four refusals said `pass "to" in the request
body`: no signed-in user, no data engine, a failed account read, and an
account with no phone number. The settings page has no recipient field,
so the admin could not follow that advice from the page. Each refusal
still says that nothing was sent. It now says what the admin can do
there: press Send test SMS while signed in as an admin whose account has
a phone number, or press it again once the account can be read. A `to`
in the request still wins. That override is documented in the function's
TSDoc, for API callers, and not in the refusal.
**Flow clone notice** (`packages/runtime/src/flow-clone.ts`,
`FLOW_CLONE_NOTICE`). The old notice said to send the clone's complete
definition with `status: 'obsolete'` to the automation PUT route, and it
named the toggle route. The new notice keeps its first two facts
unchanged: references are not re-pointed, and `draft` is not an
off-switch. The remedy now names the console's two switches:
> If that is not what you want, switch one of them off. A packaged
original is switched off on the Packaged automation page, with its
Switch "…" off action; that switch covers packaged flows only and does
not reach the clone. To switch the clone itself off, open it in Studio,
set its Enabled switch to Disabled, and publish.
The REST recipe stays in the client SDK's `automation.toggle` TSDoc
(`packages/client/src/index.ts`), which this PR does not change.
## Landing, and one premise corrected
- **Landing:** the claim's file surface. Both producers are where the
card named them. No other package is touched.
- **The card's SMS control does not exist.** The card says to name "the
SMS settings' test recipient field (#24767)". On `origin/main`
`830a63a680`, `smsSettingsManifest`
(`packages/services/service-settings/src/manifests/sms.manifest.ts`)
declares no recipient field. The fix for #24767 landed as #24848, and
that PR did not add a field: it made the test go to the signed-in
admin's own `sys_user.phone_number`. The handler's own TSDoc says "The
served form has no recipient input". So the refusals name the control
that does exist, which is the Send test SMS button and the admin's own
account number. Adding a recipient field is a `service-settings`
manifest change, outside this claim.
- **The clone controls were read from objectui `main` `2c4e5f5afd`.**
`packages/app-shell/src/views/setup/PackagedAutomationPage.tsx` renders
the server notice verbatim, and beside it a `Switch "{{label}}" off`
button. That button turns off the packaged SOURCE through the
packaged-flow toggle, not the clone. Studio's flow switch
(`engine.studio.auto.enabled` / `disabled`, "Disable this automation
(publish to apply)") writes the clone's `status: 'obsolete'`. The notice
names each control for the flow it really switches. objectui's own
`CLONE_NOTICE` in `PackagedAutomationPage.test.tsx` is fixture text, and
the page renders whatever string arrives. Nothing there parses the
notice.
## Pins
- `packages/runtime/src/domains/automation-flow-clone.test.ts`: the
existing notice pin asserted `'PUT /api/v1/automation/'`. It now asserts
the new remedy (`Switch "…" off`, `does not reach the clone`, the Studio
sentence). A new case asserts that the served notice equals
`FLOW_CLONE_NOTICE` and contains no `/api/`, no "request body" and no
`PUT`/`POST`.
- `packages/services/service-sms/src/sms-test-recipient.pin.test.ts`: a
new block drives the served `POST /api/settings/sms/test` route for no
phone number, a failed read and no data engine. A new `noEngine` harness
option covers that last case. It also drives the in-process call with no
user. Each refusal is checked for its opening sentence and its remedy,
for "nothing was sent" and "Send test SMS", and for the absence of
`/api/`, "request body" and `pass "to"`.
- The grep for pins and docs that quote the old strings found the
runtime pin above. It found nothing else:
`packages/qa/dogfood/test/automation-flow-clone-door.dogfood.test.ts`
compares against the imported constant, and no doc quotes either string.
## Verification (head `f57343bda5`)
- Build: `pnpm --workspace-concurrency=2 --filter
'@objectstack/service-sms^...' --filter '@objectstack/runtime^...'
build`, under the verify lock: `VERDICT command-exit 0`.
- `pnpm --filter @objectstack/service-sms test`: Test Files 7 passed
(7), Tests 107 passed (107). `pnpm --filter @objectstack/service-sms
typecheck`: exit 0.
- `pnpm --filter @objectstack/runtime typecheck`: exit 0, test layer OK.
`pnpm --filter @objectstack/runtime test`: Test Files 438 passed (438),
Tests 7023 passed, 19 skipped (7042), `VERDICT command-exit 0`.
- Derived gate families (`dispatch-gates.mjs --commands`): 69 derived.
68 ran with exit 0. `check:dual-build-cjs-loads` is NOT MEASURED: it
exited 3, PREREQUISITE NOT MET, because it needs a full-repo `dist`. It
is left to CI. `--ran` reconciliation: 69 accounted, 68 run, 1
NOT-MEASURED.
- No ablation: the diff changes message text and its pins, not a tested
behaviour.
## Acceptance notes
- **Same pattern, out of scope:** `plugin-email`'s `mail/test` refusals
(`packages/plugins/plugin-email/src/email-plugin.ts`, around lines 196,
209 and 216) still say `pass "to" in the request body` to the admin on
Setup → Email. They are not changed here, and they are listed in the
report for the seat.
- The invalid-number refusal `Provide a valid "to" phone number (E.164
recommended).` is unchanged. It is reachable only when the caller names
a `to`, which the served form never sends.
- Breaking for anyone comparing either string verbatim: the route, the
status, the code and the response shape are all unchanged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016g7nYP9wdNx1GDa5XDr7Uy
Co-authored-by: Claude <noreply@anthropic.com>1 parent 70ff998 commit 2b7c331
5 files changed
Lines changed: 115 additions & 21 deletions
File tree
- .changeset
- packages
- runtime/src
- domains
- services/service-sms/src
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
464 | 481 | | |
465 | 482 | | |
466 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
| 169 | + | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
176 | 182 | | |
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
| |||
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
94 | | - | |
95 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
102 | | - | |
| 108 | + | |
| 109 | + | |
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
| |||
112 | 119 | | |
113 | 120 | | |
114 | 121 | | |
115 | | - | |
| 122 | + | |
| 123 | + | |
116 | 124 | | |
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
123 | | - | |
124 | | - | |
| 131 | + | |
| 132 | + | |
125 | 133 | | |
126 | 134 | | |
127 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
179 | 180 | | |
180 | 181 | | |
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 | + | |
0 commit comments