Repository navigation
Commit 399df5b
fix(types,docs): the turned-off sentence and the docs stop pointing at retired Setup pages (#29476)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8Y91xTWc4Wtxe392BxMEYRn)_
Fixes #29374
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:动作/流程被关闭时用户看到的那句提示,改为指向现在真实存在的位置(动作 → Setup › Packaged Actions;流程
→ Studio 里该包的 Automations);权限文档里指向已退役 Setup 页面的步骤一并改到现在的位置。
- 为什么改:N-28 已退役 Setup › Packaged automation 和 Setup → Access Control 下的
Positions / Permission Sets,文档和报错提示仍把人送去不存在的页面。
- 风险与回滚:只改文字,错误码 `ACTION_DISABLED` / `FLOW_DISABLED` 不变,机器读的是码不是句子;回滚即
revert 本 PR。
-
先看:`packages/types/src/packaged-item-turned-off.ts`(句子本体)、`content/docs/permissions/administrator-guide.mdx`(步骤改写最多)、两份待发布
changeset 的引文改动。
- 两分钟验证:`pnpm --filter @objectstack/types exec vitest run
src/packaged-item-turned-off.test.ts`,预期 6/6 通过,动作句含 `Setup › Packaged
Actions`,流程句含 `Automations in Studio`。
- 需要你做的:无,席位落地(注意 `Check Changeset` 的 empty-changeset 门禁会因改动两份既有待发布
changeset 保持红,见下方 Acceptance notes,需确认)。
## What changes
**Item 3: the turned-off sentence, by kind**
(`packages/types/src/packaged-item-turned-off.ts`). The sentence both
refusal engines send (`describeTurnedOffPackagedItem`) named the retired
Setup › Packaged automation page. It now names where each switch is:
- Action: "This action is turned off for this deployment. An
administrator can turn it on again under Setup › Packaged Actions, or
you can use another action." The switch is the Setup entry
`nav_packaged_actions`
(`packages/platform-objects/src/apps/setup-nav.contributions.ts`, label
`Packaged Actions`). No action-clone offer, as before.
- Flow: "This flow is turned off for this deployment. An administrator
can turn it on again in its package's Automations in Studio, or copy it
there under a new name." The flow's switch and New similar (the clone
door) are on the flow in the package's Automations pillar
(`ui/packages/app-shell/src/views/studio-design/FlowItemMoreMenu.tsx`,
`setupMetadataRedirect.ts` `packagedAutomationStudioPath`), so the "copy
it there" clause stays true.
The doc comment no longer calls the page live and explains the two
per-kind parts (where, and meanwhile). Plain language, no ADR or tracker
number in the runtime string.
**Item 2: docs steps, each confirmed in code**
(`content/docs/permissions/`):
- `administrator-guide.mdx` Step 3 (was `:107`): a position's holders
are assigned on **Setup → People & Organization → Position Holders**
(`nav_position_holders`,
`packages/plugins/plugin-security/src/security-plugin.ts`; page
`ui/packages/app-shell/src/views/setup/PositionHoldersPage.tsx`). That
page's Add writes `user_id` and `position` only
(`PositionHoldersSection.tsx`), so the step now says a business-unit
anchored assignment is created as a User Position row directly, with
`business_unit_id`.
- `administrator-guide.mdx` direct grants (was `:117`): **Setup → People
& Organization → Permission Set Assignment**
(`nav_permission_set_assignment`; `PermissionSetAssignmentPage.tsx`
renders the same `AssignedUsersSection`, titled Assigned Users).
Studio's item page shows a link to this Setup page rather than the
section (`SetupAssignmentsLink.tsx`), so Setup is where the task is
done.
- `administrator-guide.mdx` matrix editor (was `:151`) and
`access-recipes.mdx:50`: Studio → All metadata → Permission Set, then
open the set (`PermissionMatrixEditor.tsx`, which carries the When
(edit) column, `perm.field.when`).
- `administrator-guide.mdx` "Where is everything": definitions and the
on/off switch of positions, permission sets and capabilities are in
Studio → All metadata; who holds them is the two Setup people pages.
- `authorization.mdx` (was `:251-253`): the catalog list is Studio's All
metadata area, `/studio/~all/metadata/permission?scope=environment`, and
the old Setup address redirects there (same wording as
`permission-sets.mdx:386-387`).
**Item 1: the sweep in other words.** Extra hits added here:
`authorization.mdx:33` (capabilities "extended by admins in Setup") and
`:419-420` (the on/off switch now sits on the item's page in Studio's
All metadata area, per the plugin-security comment above its nav
contributions), `delegated-administration.mdx:55` (the Delegated Admin
Scope block is in the permission set editor,
`PermissionAdvancedFacets.tsx`, now in Studio), `capabilities.mdx:124`,
`:272` (a capability's label is shown to the administrator who grants
it, no longer "in Setup"), and `data-modeling/analytics.mdx:149` (Setup
› Datasets: a dataset is metadata, every Setup metadata URL other than a
datasource redirects into Studio's All metadata area,
`setupMetadataStudioPath`, and no Setup navigation entry names
datasets). `skills/**`: zero hits, so this PR touches no governed
surface.
**Item 5: the six pinned tests** follow the new sentence.
`flow-activation-ledger.test.ts`'s status-disabled check now asserts the
message carries no turn-on remedy at all (`not.toContain('turn it on
again')`), which still holds whatever page the remedy names. The types
test gains one case per kind: the sentence never names Packaged
automation.
**Pending changesets.** `.changeset/27842-disabled-actions-served.md`
and `.changeset/27966-flow-disabled-plain-sentence.md` are unreleased
and quoted the old sentence verbatim; left as they were, the 18.3.0
CHANGELOG would publish a sentence this PR makes false. Only the quoted
sentence (and, in 27966, "switched off under Setup › Packaged
automation" → "an administrator switched off") changes. The devx seat
accepted this widening on the claim (comment 6580761426).
**Platform checklist** (`docs/qa/platform-checklist/areas/`), after
#29438 landed and `main` was merged:
`api-backend.packaged-action-disabled-dispatch` (acceptance[0] clause
and verify, acceptance[6] verify) and
`automation.packaged-flow-disable-durable` (acceptance[1] clause and
verbatim verify, negative[3]) re-point their remedy phrase to the new
sentence, and the two TRANSITIONAL known gaps that promised this
re-point are retired. Revisions 13 and 10, history rows added.
**Patch changeset** on `@objectstack/types`.
## Why
N-28 (#28578) retired Setup's metadata catalog (Positions, Permission
Sets, capabilities, every metadata type except datasource) and the Setup
› Packaged automation page (ADR-0146 D1, D4, D11; M-1 ruling
6554738464). A person refused a switched-off action or flow was told to
send an administrator to a page that no longer exists, and an
administrator following the permissions docs looked for menus that are
gone.
## Tests
- Unit, on the merged head: `@objectstack/types`
`packaged-item-turned-off.test.ts` 6/6, `@objectstack/objectql`
`action-activation.test.ts` 22/22, `@objectstack/runtime`
`domains/action-activation-dispatch.test.ts` 12/12,
`@objectstack/service-automation` `flow-activation-ledger.test.ts`
49/49, `@objectstack/types` typecheck clean. `@objectstack/types`
rebuilt first (downstream tests read its `dist`).
- Dogfood: `api-action-door-forward.dogfood.test.ts` and
`packaged-action-disabled-dispatch-live.dogfood.test.ts`, 2 files, 18/18
(head 53a942a, before the main merge, which did not touch the sentence
or these files).
- Reverse check: restoring the old action remedy in
`packaged-item-turned-off.ts` (via `scripts/ablation-replace.mjs`,
mutation proven on disk, restored to the HEAD blob) turns two types
cases red: the byte-for-byte action sentence and the new "never names
Packaged automation" case.
## Acceptance notes
- `administrator-guide.mdx:216` (`| Sharing rules, record shares | Setup
→ Access Control |`) still matches the card's Re-check grep and is left
as is: it is correct. `@objectstack/plugin-sharing` still contributes
Sharing Rules and Record Shares to Setup's `group_access_control`
(`packages/plugins/plugin-sharing/src/sharing-plugin.ts`).
- The other remaining Re-check hits are intended:
`authorization.mdx:254` and `permission-sets.mdx:387` name the old
`/apps/setup/metadata/permission` address only to say it redirects to
Studio; `packaged-item-turned-off.ts:24` is the doc comment saying the
page is retired; `packages/spec/src/api/protocol.zod.ts:755` is item 4,
split to #29446 (domain:spec) and not touched here.
- `check-empty-changeset` stays red by design: this PR rewrites two
pending release notes that it made false. That is its DELIBERATE
CORRECTION case, which asks for confirmation on the PR rather than a
restore; restoring them would publish the false sentence.
- Not changed, noted: other pending changesets describe the old page as
history (`27842-disabled-actions-beside-item.md`, which belongs with
#29446's spec line, `28044-…`, `27504-…`, `27378-…`, `27521-…`,
`29139-…`); `ui/packages/**` code comments that name the old page (out
of scope per the card);
`ui/packages/app-shell/src/views/studio-design/datasetCreate.tsx` still
says "Setup › Datasets" in a comment.
## Verification
Derived gate list: `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` at head ac19230, run locally and reconciled
with `--ran`; results and the CI check-runs are in the `os-dev-report`
comment on #29374. Docs build and the link check run in CI (`Build
Docs`, `check-links.yml`); this PR adds and moves no links.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(`packages/spec` untouched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (lint runs in CI)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: n/a.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English. (the 维护者速读 block is
the maintainer summary the dispatch asks for)
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbW35xq9yvZvbd174ve)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6a940d1 commit 399df5b
18 files changed
Lines changed: 100 additions & 58 deletions
File tree
- .changeset
- content/docs
- data-modeling
- permissions
- docs/qa/platform-checklist/areas
- packages
- objectql/src
- qa/dogfood/test
- runtime/src/domains
- services/service-automation/src
- types/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
| 148 | + | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| |||
148 | 151 | | |
149 | 152 | | |
150 | 153 | | |
151 | | - | |
152 | | - | |
| 154 | + | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | | - | |
| 215 | + | |
| 216 | + | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| |||
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
419 | | - | |
420 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
421 | 423 | | |
422 | 424 | | |
423 | 425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments