Repository navigation
Commit 1311136
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi989QTdPpQXDnsMXYfukg9Sp)_
Refs #38621 (items 1–6, 8)
Clause-②: no
Metadata-protocol: none
## 维护者速读
-
搭建工作台菜单里的「表单」一行换上自己的图标;表单设计器和设置页在网址冲突时用表单标题称呼对方,两张同名表单再补上所属软件包,不再露出内部名称。
- 为什么做:收尾表单进入工作台菜单那次改动留下的显示问题与过时注释。
- 出错会怎样:最坏是冲突提示里的称呼不对或图标不对,不影响保存与开关,可直接撤回。
- 要你做什么:无。
## What changes
- **Item 1.** `STUDIO_MENU_TYPE_ICONS` gets a `form` row (`FormInput`,
the icon Setup's Public forms page already uses), so the menu's form row
no longer draws the UI group's default icon.
- **Items 3 + 4, one rule.** New `addressHolderShownName(holder,
asking)` in `publicFormDesign.ts`: the holder is named by its shown
name; when that equals the asking form's shown name, the holder's
package display name is added (`Contact us (Support desk)`), read from
the package list (packages-io `fetchListedPackageManifests`); the
package id stands in only when no name can be read; nothing is added for
the asking form's own package. The item name is never shown.
- Designer: `takenAddresses()` now maps slug to `{ name, title,
packageId }` (title from the existing `publicFormShownName`);
`addressProblem` compares `holder.name`. Draft-only forms carry the
package their draft listing names.
- Setup: `addressTakenText` calls the same helper instead of printing
`title (name)`.
- No i18n key or string changed: both messages keep their keys and their
texts; only the value passed in changes.
- **Item 2.** Three comments now say what is true:
`builtinComponents.tsx` (form is listed under UI in Studio's menu);
`plugin-form/src/submitRedirect.ts` (no longer names the deleted
`PublicFormsPage`); `apps/console/src/components/submitRedirect.ts` (its
only caller is `resolveSubmitRedirect`; no console door calls the check
at save time).
- **Item 5.** `packages/cli/src/utils/console.ts`: the two comments on
the public form page's `frame-ancestors` exception no longer cite the
retired public-forms screen. The CSP behaviour is unchanged; whether the
exception stays is left to the maintainer. `platform-core.json`:
Studio's component surfaces list the form designer instead of Public
Forms.
- **Item 6.** `registerDeveloperComponents.tsx` cites ADR-0159 D9 for
the retirement.
- **Item 8.** `de-quote-pairing-3876.test.ts`: the two pack-wide literal
count pins (`okSpans` 134, `open/close/rdq` 134/134/0) and the history
comments that synced them are deleted. They are replaced by relations
with no count in them: `okSpans === openers` (the regex method agrees
with a plain count of the opening quote), `close === open + rdq` (kept),
`rdqKeys === []` (kept), and a presence floor of 40 openers on each.
Three header sentences that pointed at the literal counts are corrected.
## Tests
<details><summary>vitest, 5 files, at b48a2ff</summary>
`npx vitest run --maxWorkers=2` on `StudioMenu.test.tsx`, `publicForm/`
(designer + rules), `PublicFormsSetupPage.test.tsx`,
`de-quote-pairing-3876.test.ts`: Test Files 5 passed (5), Tests 112
passed (112).
New or changed cases:
- `StudioMenu.test.tsx`: the form row's drawn icon equals a rendered
`FormInput` and differs from the UI group's `Layers`.
- `PublicFormsDesigner.test.tsx`: the clash message names "Event RSVP",
not `crm_lead.event_rsvp`; a new case where the holder shares the open
form's title reads "Contact us (Support desk)" and contains neither the
item name nor the package id.
- `PublicFormsSetupPage.test.tsx`: the equal-title case now reads
"Contact us (Support desk)" and contains neither `crm_lead.newsletter`
nor the package id.
- `publicFormDesign.test.ts`: `takenAddresses` carries name, shown name
and package; a unit case covers the fallback to the id, a different
title, and the same package.
Ablation round 1 (icon row and title-only helper reverted on disk, then
restored): 3 failed | 70 passed. Round 2 at b48a2ff (the name lookup
replaced by undefined): 3 failed | 56 passed (both pins and the new unit
case); restored tree is clean.
</details>
<details><summary>type-check</summary>
`pnpm --filter @object-ui/app-shell type-check` and `pnpm --filter
@object-ui/i18n type-check`: exit 0.
</details>
## Acceptance notes
- The tie-break names the holder's package by its display name, as
Studio's header names a package (L1-a must-fix 1, 7268631311); the id
appears only when the package list gives no name. The designer reads
`GET /api/v1/packages` once per form-list load (packages-io deduplicates
requests in flight). Two forms with the same title in the same package
still read the same name: nothing shown to a user tells them apart, and
the item name is ruled out.
- Line budget: about 130 added or changed lines; item 8 also deletes
about 410 lines of history comments, so the raw diff is over the
small-card budget by deletions only.
- Item 7 is not in this PR.
## Verification
Read first: `publicFormDesign.ts` (`addressHolderShownName`,
`takenAddresses`), `PublicFormsDesigner.tsx` (`holderText`),
`de-quote-pairing-3876.test.ts` (the two replaced assertions).
Two-minute check: in Studio open a form, set its address to one another
form uses. The message names the other form by its title, for example:
The form "Event RSVP" already uses this address.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmQu29PQequUrXXHYMn)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmQu29PQequUrXXHYMn
<!-- signed: repo:objectstack#3 · os-steve ·
session_01ADHkmQu29PQequUrXXHYMn -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5ac1ee0 commit 1311136
16 files changed
Lines changed: 189 additions & 452 deletions
File tree
- .changeset
- docs/qa/platform-checklist/areas
- packages/cli/src/utils
- ui
- apps/console/src
- components
- packages
- app-shell/src
- services
- views
- setup
- studio-design
- publicForm
- i18n/src/__tests__
- plugin-form/src
| 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 | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
| 674 | + | |
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
891 | | - | |
892 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 31 | + | |
| 32 | + | |
40 | 33 | | |
41 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
277 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| |||
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
287 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
99 | | - | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
190 | | - | |
191 | | - | |
| 196 | + | |
| 197 | + | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
195 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
196 | 206 | | |
197 | 207 | | |
198 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
431 | 442 | | |
432 | 443 | | |
433 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
0 commit comments