Repository navigation
Description
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
④ sub-issue of #36890 · Source: #37192 proposal §3.10 (F2), filed after #37201 landed (PR #37341). Part of #36890.
维护者速读
- 问题:导入数据时可以选一个大家共用的「字段映射」(文件的列对应哪个字段、值怎么转换),但它只能在 Studio「高级」的列表里对着表单手填出来,导入向导里只能选、不能存。按固定格式反复导入数据的管理员会碰到,目前没有人提过。
- 选项:A 管理员在应用的导入向导里对好列之后,可以存成大家都能选的共享映射,旁边有「管理」通到 Studio 的列表,约 1 到 2 个 PR;B 向导里只加一个「管理映射」链接,映射还是去 Studio 手填,约 1 个 PR;C 在 Studio 新建映射时可以传一个样例文件,列名自动带出、字段从列表里选,约 1 个 PR;D 在 Studio 的对象页里加一块「导入映射」,约 2 个 PR;E 不做。
- 推荐 A,但先不排期:映射本来就该在拿着文件对列的时候建,将来接外部系统的同步向导也是这样建;现在没人提过,所以定了方向先不做,做之前界面和 E 一样。
- 不定会怎样:不会坏,共享映射继续只能由开发人员在 Studio 或代码里建;新建的应用还没有任何映射时菜单里连这个列表都没有,要等「高级里一条都没有的类型从哪里新建」那张卡定了才有入口。
Analysis
Decision thread for seat repo:objectstack#4, zone a4-S. Read-only. Code read at origin/main 134b71db (2026-11-25T21:25Z).
The question in one sentence
A person who imports the same kind of file again and again can pick a shared column mapping in the import wizard but cannot make one there: where is a shared mapping made and looked after?
Background, and two corrections to the source
Proposal §3.10 on #37192 wrote F2 as: "A mapping is used by the object's import. Decide whether it is managed from the import wizard on the 记录 tab."
Correction 1: Studio's 记录 tab has no import wizard. The wizard is in the running app: on an object's list page, in the AI assistant's Excel import bar, and in the user import (premise 1). So "the import wizard on the 记录 tab" is the app's wizard, not a Studio one. Adding an import to Studio's object page is not proposed here: importing data is the running app's job.
Correction 2: a mapping has more consumers than the wizard. It is a named, governed item that carries column renames, value transforms, the write mode and the match fields. It is used by:
- the wizard's 「已保存的映射」 selector, which lists the object's mappings and applies the chosen one on the server; the wizard shows its columns read-only (premise 2);
- an import through the API that names it, which is how a scheduled job reuses it (
examples/app-showcase/src/data/mappings/index.ts); - scheduled pulls from a connector (ADR-0153);
- the sync wizard that ADR-0153 proposes for Studio, which creates one (card sync-in P3 Studio (epic #31763, ADR-0153): the sync wizard beside the virtual-object one, read-only synced objects, run history #32064, open, blocked, not built).
What the wizard has today, side by side on one step:
- 「映射模板」 with 「保存当前映射」: it saves the columns the person just mapped as a template in this browser's local storage. Nobody else sees it, and another computer does not have it (premise 2). It is a personal convenience.
- 「已保存的映射」: it lists the shared mappings. It can pick one. It cannot make, change or remove one.
There is no way from the first to the second. A shared mapping is made by typing it into a form in Studio (高级 › 字段映射), with no file in hand, or in code.
Governing text:
- ADR-0084, amendment of 2026-11-25, the rule that sorts a type, item 1: "A type bound to one object is authored from that object." —
git grep -n "It has no parent object" origin/main -- docs/adr/0084-application-builder-information-architecture.md(line 281). A mapping requires one target object (premise 3). This is a clause of the menu's sorting rule: it gives the direction and binds no particular door, so no option below conflicts with it, E included. - ADR-0153 D11: "The Studio sync wizard creates the
syncedobject, themappingand thatjob." —git grep -n "The Studio sync wizard creates" origin/main -- docs/adr/0153-one-way-sync-in-beside-federation.md(line 717). The record's status line reads Proposed; its epic 专题:外部数据单向同步进来(同步后就是普通对象,与联邦查询并存) #31763 is titled "ruled A, 2026-11-09"; the wizard is not built. - ADR-0146, note of 2026-11-24: "The running app is an editing surface too, for a workspace administrator." It lists what is edited there: the app's layout, a dashboard, a report, a list or kanban view's settings. A mapping is not on that list, so option A adds to it, by a dated line. On where such a save lands: "A view created in the app is saved into the app's package when that is writable, otherwise into its pair." —
git grep -n "A view created in the app is saved into the app's package" origin/main -- docs/adr/0146-studio-designs-setup-administers-one-editor-per-item-paired-customize-package.md.
No text says where a mapping for a file import is made.
Protocol: Metadata-protocol: none, Clause-②: no, for every option. The mapping type, its schema and its write door exist; no option adds a key.
Premises (each with its re-check, run at the repository root)
- Studio's object page has no import; the wizard's hosts are in the running app.
git grep -c "ImportWizard" origin/main -- ui/packages/app-shell/src/views/studio-design/→ prints nothing (zero hits).git grep -l "ImportWizard" origin/main -- 'ui/packages/app-shell/src/**/*.tsx' ':!*.test.*'→views/ObjectView.tsx,views/IdentityImportPanels.tsx,console/ai/ExcelImportBar.tsx,console/ai/AiChatPage.tsx.
- The wizard picks a shared mapping read-only, and saves personal templates in the browser.
git grep -n -E "grid.import.savedMappingHint'|grid.import.saveCurrent'" origin/main -- ui/packages/plugin-grid/src/ImportWizard.tsx(the strings at lines 83 and 92, drawn at lines 1529 and 1686; the hint ends "Column mapping is read-only.").- The Chinese label:
git grep -n "saveCurrent: " origin/main -- ui/packages/i18n/src/locales/zh-Hans.ts(line 720, 「保存当前映射」). git grep -n "objectui:import-templates" origin/main -- ui/packages/plugin-grid/src/ImportWizard.tsx(lines 402 and 2447: the local storage key).
- A mapping requires one target object and can be created at run time.
git grep -n "targetObject: z.string()" origin/main -- packages/spec/src/data/mapping.zod.ts(line 450).git grep -n "type: 'mapping'" origin/main -- packages/spec/src/kernel/metadata-plugin.zod.ts(line 937:allowRuntimeCreate: true,domain: 'data').
- Studio lists 字段映射 under 高级, and only when the package holds one.
git grep -n "{ type: 'mapping', tier: 'advanced' }" origin/main -- ui/packages/app-shell/src/views/studio-design/studioMenuPlacement.ts.git grep -n "packagesByType\[e.type\]" origin/main -- ui/packages/app-shell/src/views/metadata-admin/directoryScope.ts(line 40). The sibling card F3 is about that rule.
- A source column typed wrongly in a mapping fails silently; a wrong target field is refused.
- The value is read from the row by the header's text, with no check that the file has that column:
git show origin/main:packages/core/src/utils/import-mapping.ts | sed -n '208,224p'(row[first(entry.source)], lines 214 and 221). A header that matches no column leaves the field empty and nothing is said. Read in the code, not run. - A target that is not a field of the object is refused:
git grep -n "refuseUnknownMappingTargets" origin/main -- packages/core/src/utils/import-mapping.test.ts(line 68).
- The value is read from the row by the header's text, with no check that the file has that column:
- Use today. One authored mapping in the repository's example apps:
git grep -c "defineMapping(" origin/main -- examples packages/apps→examples/app-showcase/src/data/mappings/index.ts:1. Three on the 销售 package (the per-type table of the proposal on [Decision] Studio left menu: features are there but the focus is unclear — order and visual weight inside the groups #37192, from the maintainer's screenshot); re-check needs that deployment: open the package in Studio, open 高级, and read the number beside 字段映射. - The same people may enter Studio and may write shared items in the app. Both ask for a workspace administrator who holds
manage_metadata:git grep -n "isAdmin && canAuthorMetadata" origin/main -- ui/packages/app-shell/src/hooks/useStudioDesignGate.ts ui/packages/app-shell/src/views/objectViewViewSharing.ts.
Options
| What is done | What the customer sees | Effort | |
|---|---|---|---|
| A — a shared mapping is made in the app's wizard, with the file in hand | In the app's import wizard, an administrator who holds the metadata capability gets 「保存为共享映射」 on the mapping step. It saves a mapping that holds the column renames, the write mode and the match fields the wizard has already collected, into the app's package when that is writable and otherwise into its pair, as a view made in the app is saved. Beside 「已保存的映射」 the same person gets 「管理」, which opens Studio's 字段映射 list showing this object's mappings. Value transforms, connector sources and deleting stay in Studio. 「保存当前映射」 stays as the personal, this-browser template. | An administrator maps the columns once, on the real file, and saves it for everyone. The next person who imports that kind of file picks it from the list, and an API import can name it. Other people still see only their own 「保存当前映射」. | ui (the wizard and the app's list page) · 1 to 2 PRs, plus one dated line in ADR-0146's note · precedent PR #27575 (+964/−32, 23 files): a governed item made in place where it is used (New dataset beside the report and chart pickers). No server work is expected: the type and its write door exist (PR #2629, +581/−14, 19 files). |
| B — a link only | Beside 「已保存的映射」, an administrator gets 「管理映射」, which opens Studio's 字段映射 list showing this object's mappings. A mapping is still typed into Studio's form. | The administrator can get from the wizard to the list. To make a mapping they type each source column's header by hand, with no file to pick from. | ui · 1 PR · 无先例 (no landed PR links a run-time dialog to a Studio list). Nearest size: PR #36782 (+342/−41, 10 files). |
| C — Studio's mapping form reads a sample file | In Studio, New mapping takes a sample file: the source columns are filled from its header row and each target is picked from the object's fields. Nothing changes in the app's wizard. | A developer making a mapping in Studio uploads one example of the file and picks, instead of typing headers. The administrator who is importing still leaves the wizard, opens Studio and uploads the file a second time. | ui · 1 PR · 无先例 (Studio has no form that reads a sample file). Nearest size: PR #27575 (+964/−32, 23 files). |
| D — a block on Studio's object page | The object page in Studio gets an 「导入映射」 block that lists this object's mappings, with New. | A builder finds the object's mappings on the object. Making one is still typing headers with no file. | ui · 2 PRs · 无先例 in this repository. Nearest size: PR #30211 (+908/−30, 7 files). |
| E — nothing | 高级 › 字段映射 and code stay the only two ways. | As today. | none |
Weighed and not offered: retiring 「保存当前映射」 so that the shared mapping is the only saved thing. People who are not administrators cannot write a shared item, and a personal mapping has no home on the server, so this would take a working convenience from them and give nothing back. That 「保存当前映射」 lives only in one browser is a shortcoming of its own, not asked here.
Business meaning:
- A is "the first person who works out how the supplier's spreadsheet lines up saves the answer for everyone". Microsoft Dynamics 365 does this: its import wizard saves the column mapping as a named data map, and the data maps are listed in settings.
- B is "a signpost from the wizard to the workshop".
- C is "the workshop gets a ruler": the developer measures against a real sample, in the workshop.
- D is "a drawer for mappings in the design room".
- E is "only someone who opens Studio or writes code makes a shared mapping".
Four axes (business view)
Long-term soundness (weighted at least half). Two years out, a mapping is born in a wizard, at the moment someone has the real file or the real source open, and from then on it is a named item that people, API calls and scheduled pulls reuse; Studio's list is where transforms are added to it. Two things point there. ADR-0153 proposes that shape for sync: its wizard, not yet built, creates the mapping. And the mainstream model matches: Dynamics 365 saves a data map from the import wizard and lists data maps in settings; Salesforce's import wizard and HubSpot map columns inside the wizard (from recall, not re-checked). A gives the file import that shape and opens a way from the personal template to the shared mapping, which today sit side by side on one step with nothing between them. Personal and shared stay two things, as they are for views, where only an administrator makes a shared one in the app (#36371).
A also gives a mapping a second place where it is made, the wizard beside Studio's form. That is a cost on this axis. It is the same shape views already have (made in the app, also listed and editable in Studio), and both places write the one item through the one write door. C avoids the second place and fixes the blind typing inside Studio, which makes it the nearest to A; what it leaves is that the person holding the file is in the wizard, not in Studio. B and D keep the mapping typed blind.
Real business pull. Measured: one mapping in the repository's example apps and three on 销售. The dedupe search returns no card that asks to save a shared mapping from the wizard. 「保存当前映射」 already serves one person on one browser, and a way to make a shared mapping exists (Studio's list). So the pull today is none measured, and this axis sets the timing. The sibling card F3 reads "no report" differently because there no way exists on screen at all.
Preventing AI and authoring mistakes. With A and C the source columns come from the file's own header row and the targets from the object's field list, so neither is typed. With B, D and E a person, or an AI writing the mapping, types the headers. A wrong target field is refused at import. A wrong source header is not: the import runs, that field stays empty, and nobody is told (premise 5).
Startup focus. A adds one save path, one link and one ADR line. It adds no type and no key. C adds one upload to one form. E adds nothing. By this axis alone the answer today is "not now".
os-decision-facets
① Long-term: A makes a mapping at the moment the real file is open, the shape ADR-0153 proposes for sync and Dynamics 365 uses, and opens a way from the personal template to the shared mapping; its cost is a second place a mapping is made; C fixes blind typing in Studio only; B, D and E keep it typed blind — favours A, then C.
② Business pull: 1 mapping in the example apps, 3 on 销售, no card asking for it, a way to make one exists — no measured pull; sets timing to "not scheduled".
③ AI mistakes: a mistyped source header fails silently (the field stays empty); A and C take headers from the file and targets from the field list — favours A and C.
④ Startup focus: A adds one save path, one link and one ADR line, no type and no key; C adds one upload; E adds nothing — favours E today.
Prior rulings read: mapping,import,wizard,studio → 66 hits (1 at two terms: ADR-0153 D8); ADR-0153 D11 (status line Proposed), ADR-0084 amendment 2026-11-25 rule 1, ADR-0146 note 2026-11-24; thread: none (new card; the source ruling is #37192 record 7151834490)
Recommendation
A as the direction, not scheduled. By axis ① alone: two years out a mapping is made at the moment someone has the file open, as Dynamics 365's import wizard does and as ADR-0153 proposes for the sync wizard; the app's import wizard is where that moment is.
Self-check: 只看①选 A;②③④ 是否翻转:是(② 没有实测拉动,④ 多一条保存路径和一行 ADR)。字母不改,只调时序:裁 A 后先不排期。
What "not scheduled" means, plainly:
- Until it is scheduled, the screen is the same as under E. Ruling A now buys one thing: when the pull comes, the work is dispatched without a second decision round.
- Two fleet rules pull apart here, and the maintainer should see both. The card format says the letter comes from ① and the other axes only move timing (
decision-analysis.md, 「②③④与工作量只调时序分期 ⛔ 不翻字母」). The dispatch skill says zero pull recommends not spreading (SKILL.md〈升级与决策〉, 「零拉动 ⇒ 荐不扩散」). This card follows the first for the letter and the second for the timing. A maintainer who weighs the second more rules E, and nothing is lost: this analysis stays on the card. - Restart-when: the first card or customer request that asks to share an import mapping with other people, or card sync-in P3 Studio (epic #31763, ADR-0153): the sync wizard beside the virtual-object one, read-only synced objects, run history #32064 (the sync wizard) being dispatched, whichever comes first.
Why not the others:
- Not B: it is the smaller half of A. It adds the signpost and leaves the mapping typed blind.
- Not C: the nearest to A, and named because the rule asks. It is about the same size as A or smaller (1 PR against 1 to 2; no like-for-like precedent for either), and it removes the silent failure for a developer. It does not reach the person who has the file open in the wizard.
- Not D: a block on the object page for something set once per file format, and still typed blind.
- Not E as the direction: a mistyped header keeps failing silently, and the personal template and the shared mapping never meet. E is what the screen shows until A is scheduled.
Confidence gaps.
- The platform comparisons are from recall.
- No usage numbers exist for 「保存当前映射」 or for shared mappings in real deployments.
- Read from the registry flag only, not exercised: that the existing write door takes a mapping created at run time into the app's package or its pair.
- Premise 5's silent failure is read in the code and not run.
- ADR-0153 is Proposed and its wizard is not built; if that record changes, the "same shape as sync" argument weakens.
- F3 changes how E feels. If F3 gives every package a way to an empty 字段映射 list, a developer can at least reach the list on a new app.
After the ruling
- A, not scheduled (as recommended): the seat records the ruling and the Restart-when line on this card and files no execution card yet. When the trigger comes, the seat re-runs the premises above and files one ui card under 专题:Studio 重构——某个应用的开发界面:左侧按类型分组的菜单 → 列表 → 右侧全屏详情(去掉顶部分区) #36890 or its successor (p2), with the dated ADR-0146 line in the weekly ADR PR. The dispatch order names two premises for the dev to verify first: (1) the existing write door accepts a mapping created at run time into the app's package, or into its pair when the package is read-only; (2) the wizard's mapped columns, write mode and match fields are enough to build a valid mapping. If either fails, the dev reports the fork. ⛔ The dev does not save a package-less mapping, and does not fall back to the link alone.
- A, schedule it now: the same card, filed and dispatched now (zone a4-S).
- B: one small ui card, same zone.
- C: one ui card, same zone.
- D: a design pass first (where on the object page), then two cards.
- E: no card. The seat records the ruling and closes this card.
Related
- Epic 专题:Studio 重构——某个应用的开发界面:左侧按类型分组的菜单 → 列表 → 右侧全屏详情(去掉顶部分区) #36890; decision card [Decision] Studio left menu: features are there but the focus is unclear — order and visual weight inside the groups #37192 (the ruling this follows); Studio 菜单(M3):左侧菜单读顺序表——分组标题变小号灰字、默认只显示常用、其余收进「高级」 #37201 and PR feat(studio): the left menu reads the placement table — 常用 types first, the rest in one 「高级」 fold #37341 (the menu that put 字段映射 under 高级).
- ADR-0153, epic 专题:外部数据单向同步进来(同步后就是普通对象,与联邦查询并存) #31763 and card sync-in P3 Studio (epic #31763, ADR-0153): the sync wizard beside the virtual-object one, read-only synced objects, run history #32064 (the sync wizard that creates a mapping).
- defineMapping artifacts are registered but never consumed — wire named mappings into REST import or de-scope from the stack #2611 and PR Named import mappings: wire defineMapping into the import path (#2611) #2629 (named import mappings); Import mappings: the mapping label and field mapping are not localizable, and the import wizard shows target API names and a blank preview for a named mapping #34939 (closed: mapping labels in the wizard).
- 只有管理员可以在前端界面创建共享视图:管理员新建时可勾「共享给所有人」,也可以把已有视图「设为共享」;业务用户只能建「我的视图」 #36371 (closed: only an administrator makes a shared view in the app).
- Sibling follow-ups from the same §3.10: F1 (views on the object) and F3 (the first item of a 高级 type), filed beside this card.
Dedupe (gh api -X GET search/issues, is:issue, open and closed): studio import mapping wizard (54), 字段映射 (223), mapping import wizard saved (56). No card holds this question. Nearest: #32064 (the sync wizard, a different wizard) and #34939 (closed).
Filed by seat repo:objectstack#4 on the maintainer's authorization in the seat session (「F2、F3 决策卡立卡放行」). The analysis session (session_01QSeKYmRB3CUmS2Fp5cK3aN, zone a4-S) prepared this body and dry-ran it; its own create was refused by its permission check and not retried.
Activity
objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Ruled · 2026-11-25T23:27Z · A, scheduled
The maintainer's words, verbatim, in seat repo:objectstack#4's session:
Freshness: the card has no comments, and its body has not been edited since it was filed.
Restart-when:line in the body is superseded.State:
needs-user-decision→pm:queue, priority p2. Under the maintainer's wind-down order it is not dispatched today. Zone a4-S (epic #36890) claims it next round and cites this comment asRuling-ref:.objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
First touch, 2026-11-25T23:32Z.
priority:p2. A UX Feature from topic 专题:Studio 重构——某个应用的开发界面:左侧按类型分组的菜单 → 列表 → 右侧全屏详情(去掉顶部分区) #36890 defaults to p2.pm:queueand the 专题:Studio 重构——某个应用的开发界面:左侧按类型分组的菜单 → 列表 → 右侧全屏详情(去掉顶部分区) #36890 parent stay. The maintainer ruled A and asked for it to be scheduled. Route: repo:objectstack#4, zone a4-S, with the other 专题:Studio 重构——某个应用的开发界面:左侧按类型分组的菜单 → 列表 → 右侧全屏详情(去掉顶部分区) #36890 children.objectstack-fleet commentedon Nov 26, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: lands in area:ux · domain:ui · Feature · priority:p2 ·
pm:queue· size M; rationale: the decision is ruled A and scheduled (a save-as-shared step in the import wizard, plus management in Studio). A UX Feature from topic #36890 defaults to p2.Audit record in the shape the claim check reads, which restates the first touch of 2026-11-25T23:41Z. That touch used another opening. Seat 5 zone o5-U or seat 4 zone a4-S can claim it, and the claim stamp decides.
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbL6Nn3scsU8yvLyU4
Detached (2026-11-26T06:52Z) from #36890, which closes as its work moves to #37424. Provenance: who — the maintainer (Bill); words — 「按推荐处理」 on the seat-5 area
ux-37424decision card (recommendation: detach #37359 from #36890, not scheduled now) with 「Studio 重构专题 的任务是不是和可以合并到新专题,原来的专题关掉」; where — the area thread, 2026-11-26T06:45Z. Retriage ask: this body recommends A and says not to schedule it yet, but it sits inpm:queueat size M, so a lane could dispatch it. Please re-route: aneeds-user-decisioncard orpm:on-holdwith aRestart-when:line, as triage judges. It is unrelated to the App Studio shell, so #37424 does not take it.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-28T13:43Z · Maintainer ruling (Tesla, tapped on the seat decision card cmsg_01AXsQkLFKRdQCqQ3RTr6JaoDAtj99BknJbL1SbSiRmbTt): 「维持排期,留在队列p2」.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibxL8ZWRpBvBqgZ5VorAccount:
os-teslaBranch:
claude/project-thread-mmqe4wWorktree:
objectstack-issue-37359Domain:
uiArea:
o3-ux(area:ux p2, a seat card thread)Seat:
repo:objectstack#3Seat rulings on the pre-claim report (
/mnt/project-files/card-37359/pre-claim-report-600197a6.md, main 600197a):mappingalready allows runtime create, and the shared-view save (mayManageViews+saveAndPublishRuntimeMetadata) is the precedent.ImportWizard.tsx~3243-3266), not the column-mapping step. "Save as shared mapping" goes on the preview step beside the write-mode panel, where columns, write mode and match fields are all known. The mapping step keeps the personal template save and gains "Manage".File surface:
ui/packages/plugin-grid/src/ImportWizard.tsx(two optional props, the button and dialog, "Manage") and its tests.ui/packages/app-shell:ObjectView.tsx(wiring),runtime-metadata-persistence.ts('mapping'as a runtime artifact type), the Studio mapping list's narrowtargetObjectfilter (metadataListState.ts,ResourceListPage.tsx), and their tests.@object-ui/i18nlocale packs for the new strings (zh-Hant regenerated)..changeset/*.md:@object-ui/plugin-gridminor,@object-ui/i18nminor,@object-ui/app-shellpatch.Stop on breach and explain in the report.
Container & model:
M,mode:thread,model: claude-opus-5-5 (default tier — dispatch-gates.mjs --tier on the code paths: "no path-derived mandate"),effort: high, reason: the thread session serves this tier (get_session last_served_model)Writes: the PR only through the relay
pr_create; comments, labels and bodies only through the relay write tools; report both numbers.Clause-②: no
Metadata-protocol: none
Skills-docs: none (no new authorable surface; an existing type gains an in-app create path)
Review owed: L1-a.
Responsibility: an admin importing records can save the column mapping, write mode and match fields as a shared mapping in the object's package, pick it next time, and jump to App Studio to manage it.
Premise: corrected (placement), read on origin/main 600197a
Serial constraints cleared:
app-shell wiring waits for PR #38204 to merge; overlap-check at the first pushReadings owed in the report: the saved shape (header → field, mode, upsertKey), the duplicate-header refusal, the non-admin hidden case, the package prompt and cancel-writes-nothing case, the name-collision case, the list filter, one ablation per behaviour, the derived gates.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibxL8ZWRpBvBqgZ5Vor
os-dev-report
{ "issue": 37359, "status": "blocked", "branch": "claude/project-thread-mmqe4w", "pr": "https://github.com/objectstack-ai/objectstack/pull/38357", "session": "session_01L9qibxL8ZWRpBvBqgZ5Vor", "premise_still_valid": true, "summary": "Import wizard half done at 8b1e3b81 (draft PR #38357, Fixes #37359): ImportWizard takes onSaveSharedMapping(draft) and onManageMappings(); with the first, the PREVIEW step (claim's premise correction) shows Save as shared mapping under the write-mode panel, asking a label and a SnakeCaseIdentifierSchema API name suggested from it; the draft (new pure sharedMappingDraft.ts) is one {source: header, target: field} per mapped column, mode = write mode, upsertKey = match fields for update/upsert only, sourceFormat 'csv'; refused for nothing mapped, update/upsert without match fields, and a mapped column whose header is blank or shared. A saved mapping joins the Saved mapping list; a rejection keeps the form and shows the message; null adds nothing. Manage sits beside the Saved mapping selector when its door is passed. 13 grid.import keys in all packs (zh-Hant generated). BLOCKED on the app half only, per the claim: ObjectView wiring (mayManageViews gate, saveAndPublishRuntimeMetadata into the app package or pair through PR #38204's package gate, no package = nothing written, Manage to Studio's mapping list with a targetObject filter) waits for PR #38204 to merge; it goes into the same PR. Deviation: the claim named minor changesets; check-changeset-no-major grades every entry patch under Metadata-protocol: none, so both are patch.", "tests": "New: sharedMappingDraft.test.ts 8 + ImportWizard.sharedMappingSave-37359.test.tsx 10 = 18/18 at 8b1e3b81. pnpm --dir ui exec vitest run packages/plugin-grid/ packages/i18n/: 430 files, 4704 passed, 13 skipped after raising de-quote-pairing-3876's pinned count 128 -> 131 for the three new matched pairs (its 2 failures were those pairs; then 9/9). plugin-grid + i18n type-check (tsc --noEmit && tsc -p tsconfig.test.json) exit 0; eslint on changed files 0 errors. Ablation via ablation-replace.mjs, each restored blob == HEAD: shared-header refusal off -> 2 failed; upsertKey dropped -> 2 failed; Manage never drawn -> 1 failed; save drawn without a door -> 1 failed.", "gates": "dispatch-gates --commands at 8b1e3b81: 42 derived, 42 run, each exit 0 (list with exit codes /mnt/project-files/card-37359/gates-ran-8b1e3b81.list); --ran: 42 derived, 42 run, 0 NOT-MEASURED. overlap-check at 8b1e3b81: clean vs origin/main 81f2ff8b and #38339, #38284 (share locale files). PR CI not yet concluded.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0 GitHub MCP write calls (issue_read reads of #37359 at pre-claim)", "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + assignee os-tesla, read-back 6709 bytes identical); this os-dev-report comment via post-stamped", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibxL8ZWRpBvBqgZ5Vor
os-dev-report
{ "issue": 37359, "status": "done", "branch": "claude/project-thread-mmqe4w", "pr": "https://github.com/objectstack-ai/objectstack/pull/38357", "session": "session_01L9qibxL8ZWRpBvBqgZ5Vor", "premise_still_valid": true, "summary": "Both halves at 90084723 (draft PR #38357, Fixes #37359; body and title brought to this head). Import wizard half unchanged since report 7241088204. App half, after #38204 merged (bc31d453, merged into the branch as c50d219a): new objectViewSharedMapping.ts. sharedMappingDoors gives the wizard onSaveSharedMapping/onManageMappings only when mayManageViews holds (admin + manage_metadata), never on the identity import, never without a metadata client; ObjectView spreads it into ImportWizard. saveSharedImportMapping: GET /meta/mapping/<name> first and refuses a taken name with zero writes (measured in protocol-lock-version-gates.ts: the draft save's If-None-Match: * only asserts no DRAFT row, so without the read a save would replace a published mapping; a name two packages hold is 409 at import), then saveAndPublishRuntimeMetadata('mapping', ...) with useRuntimeCreateApp: app package or its pair, else #38204's ask; cancelled ask -> null, zero writes, wizard form stays; system app / caller-refused -> rejected with reason, zero writes; pending draft -> rejected, nothing published. No path saves package-less. RuntimeArtifactType gains 'mapping'. Manage closes the wizard and opens /studio/~all/metadata/mapping?targetObject=<object> (every package, the same set the wizard lists). metadataListState gains targetObject (LIST_TARGET_OBJECT_PARAM), narrowing only a reader that names the row's object; ResourceListPage gives that reader to 'mapping' only and draws a chip (Studio and Setup toolbars) whose x clears it. Strings: 3 console.objectView.sharedMapping* keys in all packs (zh-Hant generated), 2 engine.list.targetObject* in the Studio namespace (en, zh). Changeset adds @object-ui/app-shell patch. Surface note: the host logic lives in a new sibling module objectViewSharedMapping.ts (ObjectView.tsx gets a 16-line spread) and the Studio namespace en/zh files were touched for the chip; both outside the claim's literal file list but inside its named parts (ObjectView wiring, the list filter, i18n). Deviation kept from round 1: changesets patch, not minor (check-changeset-no-major under Metadata-protocol: none).", "tests": "Readings owed by the claim: saved shape (PUT /meta/mapping/supplier_list?mode=draft&package=com.example.crm, If-None-Match *, header->field, mode upsert, upsertKey [email], then publish) and duplicate-header refusal (wizard half) — pinned; non-admin hidden (sharedMappingDoors -> {} for canManageViews false, identity import, no client; the wizard draws neither control without the doors, wizard-half pins); package prompt + cancel writes nothing (real MetadataClient, package list stubbed at fetch: no app package -> ask, save names the pick; cancel -> null, zero non-GET requests; system app -> refused, never asks, zero writes); name collision (taken -> refused, zero writes; pending draft -> refused, PUT only, no publish); list filter (codec round trip; narrowing; a reader with no object not narrowed; the real page narrowed under its chip, x clears and drops the param, skill not narrowed). New app files 4, 18/18. vitest over app-shell ResourceListPage*, metadataListState*, runtime-metadata-persistence*, objectView*, ObjectView*, __tests__/identityImport*, useListOrderedNames* and packages/i18n/: 258 files, 3147 passed, 13 skipped; de-quote-pairing count 131 -> 133 for the two new pairs. @object-ui/app-shell type-check exit 0 (after a dts build of @object-ui/app-shell^...). ESLint: CI Lint UI at afeff950 found 3 preserve-caught-error errors in objectViewSharedMapping.ts; fixed at 90084723 (Object.assign(new Error(..), { cause }), the recordTabsConfigSave precedent), 0 errors locally. Ablation (ablation-replace, all restored blob == HEAD, baseline 18/18): name read skipped -> 1 failed; cancel rethrown -> 1; pending-draft ignored -> 1; canManageViews gate dropped -> 1; list narrowing deleted -> 2; chip never drawn -> 2. A first ablation round was void: the tool restores with git checkout HEAD, which reset two uncommitted files and could not restore the untracked new module; all were committed and the round rerun from a green baseline. Not measured in a browser: the package ask stacked over the wizard's dialog. Not measured on a server: a match-only field in upsertKey on a named-mapping import.", "gates": "dispatch-gates --commands over the 28 changed paths: 43 derived, 43 run, each exit 0 (/mnt/project-files/card-37359/gates-ran-90084723.list); --ran: 43 derived, 43 run, 0 NOT-MEASURED (derived zero). The run started at afeff950; the one-file lint fix landed during it and changes no derived path. overlap-check at afeff950: clean vs origin/main bc31d453, #38370 (locale packs), #38318 (Studio namespace). PR CI at 90084723 not yet concluded; at afeff950 Lint UI failed (fixed) and Test UI read cancelled (superseded by the push).", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0 GitHub MCP write calls (reads only: issue comments, CI job logs)", "api_writes": "2 this round — fleet-write relay issue_patch on PR #38357 (title + body, trailer-signed, read-back 10223 bytes identical); this os-dev-report comment via post-stamped", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-28T17:09Z · Claim amendment 1 to 7240340513 (file surface), after the dev report 7242790857 on PR #38357. Added:
ui/packages/app-shell/src/views/objectViewSharedMapping.ts(new sibling module holding the host save and manage logic, soObjectView.tsxstays thin), and its tests;en/zhpacks (the clearabletargetObjectfilter chip on the mapping list).The save reads
GET /meta/mapping/NAMEfirst, because the draftIf-None-Matchpin does not refuse a name that is already published. No other change to the claim.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1
2026-11-28T17:11Z
L1-a: REWORK on PR #38357 (#37359) at
90084723e6802b7883b1aedc9b691d1c9515bcd4. The fix is a declaration plus one small nit. The code reads right.Must-fix M1:
Clause-②: nois wrong. This isClause-②: yes (widening).The criterion is whether the card widens an accept set or enlarges a public surface. This PR enlarges the published surface of
@object-ui/plugin-grid:ImportWizardgains two optional props,onSaveSharedMappingandonManageMappings.SavedMappingandSharedMappingDraft.The changeset itself says "
ImportWizardtakes two new optional props … exported as types".Fix it in the changeset and the PR body.
patchstays right: anonekind, non-protocol widening shipspatch. Withyes, a TIER_DEFAULT contract-review record is owed at the fixed head. It is run in the L1 thread. No isolated L2 is owed, because the 28 files touch nopackages/spec/src/**, no governed path and no narrowing.What reads right:
sharedMappingDoorshands out both doors only whencanManageViewsis true, the import is not the identity import, and a metadata client exists. Otherwise it returns{}, so the wizard draws neither control.GET /meta/mapping/:namefirst and refuses a taken name. The realMetadataClientanswersnullon 404, which the test uses.saveAndPublishRuntimeMetadata('mapping', …). A cancelled package ask returnsnulland writes nothing.upsertKeyis kept only to mapped fields.sourceFormat: 'csv'agrees with the door applying a csv mapping to every source./studio/~all/metadata/mapping?targetObject=…, and the list narrows by the new param.Metadata-protocol: noneis right.mappingis an existing type, and nothing an author writes moves.Nit N1 (take it with M1, or leave it).
buildSharedMappingDraftjudges ambiguity on trimmed headers but storessource: input.headers[idx]untrimmed. The import door trims every header (packages/rest/src/import-prepare.ts:82,:183). So a file whose header carries a leading or trailing space saves a mapping whosesourcenever matches that column on the next import. Storing the trimmed header fixes it.Not measured, as the report says: the stacked package-ask dialog, and
upsertKeyon a real server. Neither blocks.CI at this head, read at about 17:11Z: 38 success, 0 failed, 8 Test UI shards still pending. Lint & Repo Gates and Type Check are green.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-28T17:12Z · Claim amendment 2 to 7240340513, after L1-a 7242835609 (M1):
Clause-②: yes (widening), notno.@object-ui/plugin-gridpublishes two new optionalImportWizardprops and exports theSavedMappingandSharedMappingDrafttypes. Review owed becomes L1-a plus a TIER_DEFAULT record at the fixed head; no isolated L2 (no spec, governed or narrowing path). Changesets stay patch (Metadata-protocol none).objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1
2026-11-28T17:16Z
Contract review
Served-tier:
TIER_DEFAULTHead-sha:
81774d0510569f846e0ca713abff0c977ab49c60Local-runs: none
PR #38357, card #37359. Claim 7240340513, amendment 1 7242805625, amendment for the corrected declaration 7242845308, dev report 7242790857.
Why TIER_DEFAULT. The review is owed by the
Clause-②: yes (widening)declaration alone, which was corrected at this head after my L1 M1 (7242835609). The 28 committed files touch nopackages/spec/src/**, no governed path and no narrowing, andMetadata-protocol: nonecreates no face. It is run in the seat's L1 thread, with no second agent.① Derived judgments
@object-ui/plugin-grid.ImportWizardgains two optional props,onSaveSharedMapping(draft)andonManageMappings(). The index exports two new types,SavedMappingandSharedMappingDraft. All four are additive. Without the props the wizard draws neither control and behaves as before, so this is a widening, now declared as one.SharedMappingDraftis themappingitem's shape:name,label,targetObject,sourceFormat: 'csv',fieldMappingandmode, plusupsertKeyonly when the mode consults it.sourceFormat: 'csv'agrees with the door applying a csv mapping to a CSV file, an Excel sheet and a paste alike.buildSharedMappingDraftrefuses three cases: nothing mapped, update or upsert with no match field, and a blank or duplicate header (judged trimmed).upsertKeyis kept to mapped fields only.sourceis stored trimmed. That matchespackages/rest/src/import-prepare.ts:82and:183, which trim every header before lookup, and it agrees with the trimmed ambiguity check. A new pin covers it, and its ablation fails 1.RuntimeArtifactTypegains'mapping'. This is internal to a private package.saveAndPublishRuntimeMetadata('mapping', …)saves into a package of the app and publishes, exactly as a shared view does.sharedMappingDoorsreturns{}unlesscanManageViewsis true, the import is not the identity import, and a metadata client exists. The/metadoor refuses any caller withoutmanage_metadataregardless, so the UI gate never widens what the server allows.GET /meta/mapping/:namefirst and refuses a taken name, so a published mapping is never replaced. The real client answersnullon a 404, which the test drives.nullwith no write./studio/~all/metadata/mapping?targetObject=OBJECT. The newtargetObjectlist param narrows the list and shows as a chip whose × clears it. It is a URL param on a Studio page, not a protocol key.② Semver level
Right.
Metadata-protocol: noneis true, becausemappingis an existing metadata type and nothing an author can write moves. AGENTS.md Post-Task 3 says anonekind takespatch, and a non-protocol widening shipspatch. The three entries are@object-ui/plugin-grid,@object-ui/i18nand@object-ui/app-shell(private, so harmless). Both declaration lines start a line in the changeset and the PR body.③ Boundary flags
upsertKeyon a real server. The report says so, and neither changes a judgment above.open_questions: none.security_findings: none, and I found none. The write goes through the existing/metadoor and its permission.No must-fix, no should-fix.
Implemented-by:
claude/project-thread-mmqe4wReviewed-by:
session_01L9qibwSEecrzDjKjbk24r1VERDICT: PASS
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1
2026-11-28T17:17Z
L1-a delta: ACCEPT at
81774d0510569f846e0ca713abff0c977ab49c60(#37359), following my REWORK 7242835609 at90084723.Clause-②: yes (widening), still atpatch. The claim is amended to match (7242845308).sourceis now trimmed, the same way the import door trims headers. A new pin covers it, and its ablation fails 1.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
2026-11-28T18:05Z · 收口:PR #38357 经合并队列合入(ffa9559a),本卡随 Fixes 关闭;去掉 pm:dispatched。两处未实测(向导上叠着选包对话框的浏览器表现、真实服务端上只用于匹配的 upsertKey 字段)已写在 PR 正文。