Repository navigation
fix(ui): the related tab's create-only add entry reads New, not Add - #37293
objectstack-fleet[bot] merged 1 commit into
Conversation
Where addEntry has no picker (a master_detail child with no catalog) it opens the create form, so it is labelled detail.new; a picker keeps detail.add or the authored add.label. Pinned in en and zh-CN. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmRepQK9DkZeU7F53D
|
repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D Final head for L1 (p1) · area a4-U · 2026-11-25T13:15Z Card #37251. Dev report: 7163055624.
Handed to the seat session for L1. |
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D Landing · area a4-U · 2026-11-25T13:44Z · head
State change: ready for review, and auto-merge is armed. The queue lands it. On MERGED, #37251 closes through |
Fixes #37251
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ui/packages/plugin-detail/src/RelatedList.tsx,addEntry: the branch with no picker (amaster_detailchild with no catalog, soderivedAddOfanswers nothing and the entry callsonNew) is now labelledt('detail.new')(New / 新建) instead oft('detail.add')(Add / 添加). The picker branch is unchanged: the authoredadd.labelwins, elsedetail.add. TheaddFallbackLabellocal is gone, since only the picker branch readsdetail.addnow.detail.newalready exists in theenpack (New),zh-Hans(新建) andDETAIL_DEFAULT_TRANSLATIONS(New), so no locale key is added.Changeset:
@object-ui/plugin-detailpatch.Tests
New top-level
describein the existing addEntry harness,RelatedList.enlargedToolbar-27524.test.tsx(renderListgains an optionallanguagethat wraps the tree inI18nProvider):master_detailchild with no catalog readsNew/新建, clicking it callsonNewonce, and no picker opens.lookupchild (entry opens a picker) readsAdd/添加and opens the picker.Ablation (one-off, not kept): with the no-picker label put back to
detail.addviascripts/ablation-replace.mjs, the two New pins failed and the two Add controls passed (Tests 2 failed | 2 passed | 21 skipped). The file was then restored, and the blob matched HEAD (e1f2ad715d08,git diff HEADempty).Acceptance notes
add.labelstill wins" is read as the picker branch, where it applies today. The no-picker branch never readadd.labelbefore, and still does not: an authoredaddlabel names the pick-existing action, and putting it on a create-only entry would bring back the same mislabel.detail.newfor its New button, so after this change both faces name the create-only action the same way.derivedAddOf) and fix(plugin-detail): a related list that already shows 0 keeps showing 0 while it reloads #37220 (the count badge).overlap-checkmerges cleanly against origin/main, fix(console): a related tab's New keeps the parent it prefills when the child's relationship lookup declares dependsOn #37283, fix(plugin-detail): a related list that already shows 0 keeps showing 0 while it reloads #37220 and feat(spec,console): ask_ai action type — focus the in-app assistant on a record #37215.Verification
Two-minute check: in
ui/, runpnpm exec vitest run packages/plugin-detail/src/__tests__/RelatedList.enlargedToolbar-27524.test.tsx -t 37251. Expected result: 4 passed.Files to read first:
ui/packages/plugin-detail/src/RelatedList.tsx, theaddEntryhunk (the only runtime change).describeat the end ofRelatedList.enlargedToolbar-27524.test.tsx.All readings below were taken at head 9d9bce7.
Package tests and type-check
pnpm --filter @object-ui/plugin-detail type-check && pnpm --filter @object-ui/plugin-detail testunder the verify lock:VERDICT command-exit 0,Test Files 418 passed | 1 skipped (419),Tests 3953 passed | 18 skipped (3971).RelatedList.derivedAddScope-36707.test.tsx:Test Files 2 passed (2),Tests 34 passed (34).Derived gates
node scripts/pm/dispatch-gates.mjs --commandsderived 38 commands. All 38 ran and every one exited 0.check:changeset-fixedalso ran (exit 0).--ranreconciliation:38 derived famil(ies) accounted for, 38 run, 0 NOT-MEASURED (a DERIVED zero, all 38 recorded an exit code).test:repoand the UI lanes.Generated by Claude Code