Repository navigation
Commit 6eaf404
fix(spec): register the newTabUrl path refusal as an ADR-0087 D3 entry; the form label says path (#27282)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBAaQW5g4DKEMyfrDWjAqdoh)_
Refs #26924
Clause-②: no
Metadata-protocol: none
Skills-docs: none — no `skills/**` file changes; the one sentence that
teaches `newTabUrl` (`skills/objectstack-ui/rules/actions.md`) already
teaches a backend path since #27252. Not Tier H.
This PR carries the contract-review FAIL items of record 6470108120 on
#27252, found after the maintainer had queued #27252 (queued 13:21Z,
record 13:21Z, merged 13:42Z as `c13ef04c3`).
## 维护者速读
- 改了什么:为 #27252 已上线的 `newTabUrl` 收窄补登 ADR-0087 D3 语义条目
`ui-action-new-tab-url-path-refused`(结构化
TODO,两种改法都写明,不做自动转换);动作表单该字段的标签在四种语言里都改为「路径」。
- 为什么改:合约复核 6470108120 判 #27252 的 ADR-0087 处置写成
`not-required`,但变更说明里带了改法,应登记条目;复核结果出来时 #27252 已在合并队列里,所以补在这里。
- 风险与回滚:不改任何可写取值;条目只进迁移登记表(升级指南与 `os migrate meta` 的待办),标签仅文字。回滚即 revert
本 PR。
-
先看:`packages/spec/src/migrations/entries/semantic/18.ui-action-new-tab-url-path-refused.ts`、`.changeset/26924-new-tab-url-d3-entry.md`、`packages/spec/src/ui/action.form.ts`;文档
`content/docs/protocol/objectui/actions.mdx` 一句改为「本后端路径」。
- 两分钟验证:`pnpm --filter @objectstack/spec gen:migration-registry && pnpm
--filter @objectstack/spec exec vitest run
src/migrations`,预期全部通过,且生成的登记表含 `ui-action-new-tab-url-path-refused`。
- 需要你做的:无,席位落地。
## What changes
- **ADR-0087 registration.** New D3 semantic entry
`packages/spec/src/migrations/entries/semantic/18.ui-action-new-tab-url-path-refused.ts`
(protocol 18), following the in-tree `18.*-refused.ts` shape
(`18.ui-action-undoable-unfulfillable-refused.ts`):
- `surface`: an `action` document (standalone, an object's `actions[]`,
or type-level) whose `newTabUrl` does not start with `/`.
- `replacement`: the backend path (`newTabUrl: '/sso-open/{recordId}'`),
or for an external page drop `opensInNewTab` / `newTabUrl` and declare a
`type: 'url'` action (`target:
'https://example.com/export/${ctx.recordId}'`, `openIn: 'new-tab'`).
Stated as **not mechanically convertible, a structured TODO**: an
external URL names no path on this backend, and the url-action rewrite
changes `type`, drops the action's own `target` / `body` handler and
replaces the auth-enforcing endpoint with a page the browser opens
directly, so which remedy the author meant is not recorded anywhere.
- `reason` and `acceptanceCriteria`: the console's origin-prefix
behaviour, why the set is closed rather than widened, and the stored-row
behaviour already pinned by #27252 (loads unchanged and registered,
`invalid` with a `[metadata_spec_invalid]` boot line, `_diagnostics` at
`newTabUrl`, next save 422 `INVALID_METADATA`).
- `ActionSchema.newTabUrl`'s JSDoc names the entry.
- **Changeset.** The merged
`.changeset/26924-new-tab-url-backend-path.md` is not edited
(`check-empty-changeset` refuses edits to a changeset the merge base
carries). A new `.changeset/26924-new-tab-url-d3-entry.md`
(`@objectstack/spec` patch, `@objectstack/platform-objects` patch)
carries `adr-0087: registered ui-action-new-tab-url-path-refused` and a
"Supersedes, in the same release" paragraph that replaces the earlier
`not-required` disposition. Both packages are unreleased since #27252,
so the two notes ship together.
- **Docs.** `content/docs/protocol/objectui/actions.mdx` called
`newTabUrl` a "new-tab target template", which reads as a URL after
#27252; it now says a path on this backend starting with `/`, and points
an external page at a `type: 'url'` action with `openIn: 'new-tab'`
(flagged by the docs-drift check on this PR).
- **Form label.** `action.form.ts` labels `newTabUrl` "New-tab path";
`en.metadata-forms.generated.ts` is regenerated by `node
scripts/check-i18n-bundles.mjs --write`. zh-CN 「新标签页路径」, ja-JP
「新しいタブのパス」, es-ES "Ruta de pestaña nueva": translated-locale values are
hand-authored (AGENTS.md documentation guardrails: the generator
rewrites only `en` and keeps every translated value), so they are edited
in place and the generator re-run reports them in sync.
## Tests
- No new test: the entry is data the registry tests read.
`gen:migration-registry` then `src/migrations` + `src/conversions` → see
Verification.
## Acceptance notes
- No `refused-shapes.ts` detector is added for the entry; the review
asked for the D3 entry. A detector would make `os migrate meta --stored`
list each stored row by name; that can follow if the seat wants it.
- The missing `skills/objectstack-ui/evals` case for `newTabUrl` stays
with the lane seat, as noted at ACCEPT.
## Verification
All readings on a shared container, base `main` `7858c1d16`.
Head `78e8f9751`: two commits on `7858c1d16`, 9 paths. `0c704ce93`
carries the entry, the changeset and the labels (8 paths, +61/-7);
`78e8f9751` is the one-line docs edit.
- Locked run (`os-verify-lock`, one script): install,
`gen:migration-registry`, build, `check:generated` exit 0;
`@objectstack/spec` vitest 748 files / 22349 tests passed;
`@objectstack/platform-objects` 96 files / 1361 tests passed; CLI build,
then `check:i18n` OK (en regenerated, translated locales in sync).
VERDICT command-exit 0, 891 s.
- `src/migrations` + `src/conversions` after `gen:migration-registry`:
28 files / 945 tests passed; the generated registry carries
`ui-action-new-tab-url-path-refused`.
- `node scripts/check-adr-0087-registration.mjs --base origin/main` exit
0, which does not judge this marker: the gate reads only changesets that
declare a breaking change, and this one is a patch. The marker was
checked by hand instead: the entry file name, its exported `id` and the
marker all read `ui-action-new-tab-url-path-refused`, and the generated
registry carries it. `check-empty-changeset` exit 0 (the merged
changeset is untouched).
- Derived gates: on `0c704ce93`, 80 families were derived and all 80 ran
serially, every one exit 0. With the docs commit the derivation is 101;
the 21 new families plus every docs/link/affected-docs family (31 in
all) were rerun on `78e8f9751`, every one exit 0. `dispatch-gates --ran`
on `78e8f9751`: 101 derived, 101 run, 0 NOT-MEASURED, 0 UNRUN.
- Not run here: the full dogfood suite (this diff moves no runtime path;
it ran on #27252 at 348 passed / 3 skipped).
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01WGufzhJoJYPHSvBpq8euSq
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 4c9d0d3 commit 6eaf404
9 files changed
Lines changed: 62 additions & 8 deletions
File tree
- .changeset
- content/docs/protocol/objectui
- packages
- platform-objects/src/apps/translations
- spec/src
- migrations/entries/semantic
- ui
| 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 | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
1847 | | - | |
| 1847 | + | |
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
1847 | | - | |
| 1847 | + | |
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
1847 | | - | |
| 1847 | + | |
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
1847 | | - | |
| 1847 | + | |
1848 | 1848 | | |
1849 | 1849 | | |
1850 | 1850 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1720 | 1720 | | |
1721 | 1721 | | |
1722 | 1722 | | |
1723 | | - | |
1724 | | - | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
1725 | 1726 | | |
1726 | 1727 | | |
1727 | 1728 | | |
| |||
0 commit comments