Repository navigation
fix(ui): console v18.4.0 sweep — connector input reset, per-field conflict list, share page fields, Studio error box wrap - #33547
Conversation
… conflicts per field, share page follows the record page field rule - Flow designer: changing a connector_action node's connector or action resets connectorConfig.input to the new pair's inputs, so the old action's keys are neither drawn nor saved (and so never sent to the new action). - Inline-edit conflict dialog: a 409 on a multi-field save lists each field with its label, your edit and the current value, never the two maps as JSON. - Share-link landing page: lists fields by the record page's own body rule (no system or audit column; only declared fields when the projection is served). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oEBEF6BvrUQcZAWdX
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oEBEF6BvrUQcZAWdX
…efusal Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oEBEF6BvrUQcZAWdX
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oEBEF6BvrUQcZAWdX
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oEBEF6BvrUQcZAWdX
|
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8 Contract reviewServed-tier: Inputs read: card #33346 body and all three comments (claim 6885566909, re-grade and rulings 6885601326, os-dev-report 6886439582); PR #33547 body and its 13-file list; the net diff Gate verdicts on the head, as the check-runs report them at render: 19 success, 17 skipped (opt-in or path-filtered), 0 failure, 22 still in progress. Green so far: TypeScript Type Check; Type Check · workspace, source gates, consumer gates, debt ledger; Lint · ESLint; Lint · scoped · tooling self-tests; Check Changeset (both runs); Check PR Size; PR-body guards; Governed Surface Queue Guard; Dogfood Regression Gate; Live E2E UI; Test Core; Build UI Deps. Still running: Test UI shards 1 to 13 (14 to 16 not yet listed), Type Check UI, Lint UI, Build and E2E UI, and the Lint lanes CI/release/engine, PM dispatch-gates, docs and code guards, repo and tooling, query-options erasure, slot lookup and corpus. This verdict is on the contract. It does not stand in for those gates, and the PR lands only once they are green. ① Derived judgmentsPublic surface (declared
Flow designer (row 254): does the change alter what is SAVED beyond the stated fix?
Share page (row 99): can the new filter hide a field the record page shows?
Conflict dialog (row 118): Studio error box (row 147): classes only ( ② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
…tion declares Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5oEBEF6BvrUQcZAWdX
|
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8 Contract reviewServed-tier: Inputs read: this is a delta of record 6886524339 (PASS on Gate verdicts on the head, as the check-runs report them at render (00:57Z): 13 success, 15 skipped (opt-in or path-filtered), 0 failure, 28 still in progress.
This verdict is on the contract. It does not stand in for those gates, and the PR lands only once they are green. ① Derived judgmentsThe delta against the seat's patch order (should-fix S1 of 6886524339):
New finding, should-fix S4 (the rest of S1, which the pins do not exercise):
Nits:
Carried from round 1 and unchanged by the delta:
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
|
domain:ui#2 · os-project-manager · session_01FEkQ5oF8GgTHN2jBZoDwz8 席位核对Verdict: ACCEPT · head
|
…summary column's footer total is formatted as its cells (objectstack-ai#33728) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XPEYywMnLBNXfP2Yxf1uAi2)_ domain:ui#2 · os-project-manager · session_01FEkQ5mDVzZmSX2UmJXU7sH Fixes objectstack-ai#33557 Fixes objectstack-ai#33542 Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 改了什么:① 表格整行保存遇到 409 冲突、且这一行改了多个字段时,冲突对话框按字段逐行列出(列标题、你的修改、当前值),不再把两个整对象打成原始 JSON;只改一个字段的冲突外观不变。② 列表底部合计行里,汇总字段(`Field.summary`)的合计按它在单元格里的画法格式化:声明了币种(`currencyConfig`)就按货币,否则按声明的 `scale` 位小数;都没声明的保持原样。HotCRM 发票列表的「Paid 230,000」因此读作「230,000.00」,与该列单元格一致。 - 为什么改:① 多字段冲突时对话框只给整行草稿对象,用户看到的是 `{"estimate_hours":61,...}`;objectstack-ai#33547 已给对话框加了逐字段列表,表格这条路径还没填。② 合计行的格式化按列类型分支,`summary` 类型落到兜底分支,从不读 `scale`;实测 showcase 服务端返回的汇总字段带 `scale: 2`,缺口在 ui。 - 风险与回滚:只动 `@object-ui/plugin-grid` 内部和 `@object-ui/fields` 新增一个导出 `summaryDeclaresCurrency`(单元格本就用它判断汇总字段是否为货币,现在合计行复用同一个判断,不另写格式化器)。货币与否按汇总字段自己的 `currencyConfig`,不看被汇总的源字段类型,这是 spec 的规定,席位已认可。回滚即 revert 本 PR。 - 先看:`ui/packages/plugin-grid/src/useColumnSummary.ts` 的 `summaryValueType` 及 `formatSummaryLabel` 里改为调用它的那一行;`ui/packages/plugin-grid/src/ObjectGrid.tsx` 的 `buildRowConflict` 新增的 `fields`。 - 两分钟验证:`pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/footerSummaryFieldScale-33542.test.tsx packages/plugin-grid/src/__tests__/inlineEditConflictFields-33557.test.tsx`,预期 7 个用例全绿。 - 需要你做的:无,席位落地。 ## What changes **objectstack-ai#33557, a multi-field grid row conflict lists each field.** `buildRowConflict` in `ObjectGrid.tsx` now fills the conflict's `fields` list (objectstack-ai#33547's `ConcurrentUpdateFieldConflict`: field, label, your edit, current value) when a row save changed more than one field, labelled by the column header (`columnHeaderOf`, the label the one-field conflict already uses). The dialog then draws one row per field instead of the two whole-map previews. A one-field conflict is built exactly as before. **objectstack-ai#33542, a summary column's footer total is formatted as its cell.** The footer formatter (`formatSummaryLabel` in `useColumnSummary.ts`) chooses its arm by the column type, and a `summary` column fell to the plain default, which never reads `scale`. A new `summaryValueType` routes a summary into the arm the list cell draws the same field with (`FormulaCellRenderer`): `currency` when the summary declares its currency (`summaryDeclaresCurrency`, the cell's own predicate, now exported from `@object-ui/fields`), else `number` when `resolveFieldScale` answers a width, else the plain default as today. No second formatter: the existing currency arm (`formatCurrency`) and number arm (`resolveFieldScale`) do the formatting. **Measured first, as the triage asked.** On a live showcase (`origin/main` d95ddeb, `objectstack dev`), `GET /api/v1/meta/object/showcase_expense_report` serves the summary fields with their scale, e.g. `total_amount`: `{"type":"summary","scale":2,"summaryOperations":{"object":"showcase_expense_line","field":"amount","function":"sum"}}`, no `currencyConfig`. The source `showcase_expense_line.amount` is served as `type: currency` on its own object. So the scale reaches the console and the gap was the footer. ## Tests - `ui/packages/plugin-grid/src/__tests__/inlineEditConflictFields-33557.test.tsx`, new. The real `ObjectGrid`, `data-table` and `ConcurrentUpdateDialog`; writes go through the real `@object-ui/data-objectstack` adapter and `@objectstack/client`, with only `fetch` stubbed by a server answering a stale `If-Match` with the 409 `CONCURRENT_UPDATE` envelope. Cells are edited by click, typing and Enter, then the row's Save is clicked. - Two changed fields + a 409: the dialog lists two rows, `estimate_hours` under "Estimate" (61 / 77) and `owner_note` under "Owner note" (shipped / blocked), and its text holds no `{` or `}`. - CONTROL: one changed field shows no list, names "Estimate" and both values. - `ui/packages/plugin-grid/src/__tests__/footerSummaryFieldScale-33542.test.tsx`, new. The real `ObjectGrid` footer, its field catalogue read from the data source's object schema, under a real `I18nProvider`. - en: a summary with `scale: 2` totals to `Sum: 230,000.00`; zh-CN: `合计:230,000.00`. - en and zh-CN: a summary declaring a `fixed` CNY currency totals exactly as a plain currency column with the same config does (money, not a bare number). - CONTROL: a summary with no scale and no currency keeps the plain total (`Sum: 7`). Ablations at head `eed5643b` (`scripts/ablation-replace.mjs`; the tests import plugin-grid and `@object-ui/fields` from `src/` through the ui vitest alias, so no dist is in the path): <details><summary>objectstack-ai#33557: buildRowConflict without the fields list → the multi-field case red, the control green; restored</summary> ```text anchor " fields: keys.map((k) => ({" → " _ablated: keys.map((k) => ({" ablation-replace: ok mutation landed: anchor 1 -> 0, blob 7c4d76f -> 3be11d0556d5 × two changed fields + a 409: two rows, each under its column header with both values, no raw JSON Tests 1 failed | 1 passed (2) ablation-replace: ok restored: blob == HEAD (7c4d76f) and `git diff HEAD` is empty ``` </details> <details><summary>objectstack-ai#33542: the summary routing switched off → the four scale and currency cases red, the control green; restored</summary> ```text anchor "column?.type === 'summary' ? summaryValueType(column) : column?.type" → "column?.type === 'summary' && String('ABL').length < 0 ? summaryValueType(column) : column?.type" ablation-replace: ok mutation landed: anchor 1 -> 0, blob 7803efa -> 9ba5b6deda4a × en: a summary with scale 2 totals to two decimals × zh-CN: a summary with scale 2 totals to two decimals, under the zh prefix × en: a summary declaring a fixed currency totals as a plain currency column does × zh-CN: a summary declaring a fixed currency totals as a plain currency column does Tests 4 failed | 1 passed (5) ablation-replace: ok restored: blob == HEAD (7803efa) and `git diff HEAD` is empty ``` </details> ## Acceptance notes - **Money follows the summary's own `currencyConfig`, not its source field's type** (seat accepted this reading). The card asks for the currency format "when its source field is currency". The spec's `currencyConfig` describe says "Absent: dynamic mode, and no currency on a summary", and the list cell (`FormulaCellRenderer`) draws a summary as money only when `summaryDeclaresCurrency` holds. The footer follows the same rule, so footer and cell agree. HotCRM's All Invoices `paid_amount` (`Field.summary`, `scale: 2`, no `currencyConfig`, summing currency `crm_payment.amount`) therefore totals as `230,000.00`, matching its cells; a HotCRM author who wants it drawn as money declares `currencyConfig: { currencyMode: 'fixed', ... }` on the summary. The HotCRM result is read from a fixture of the same shape in the pin above, not from a live HotCRM run. - A `formula` column's footer total also falls to the plain default arm (the cell draws it by `returnType`). Not measured on a real producer here; noted only. ## Verification Local, at head `eed5643b` (rebased on `origin/main` 5604aeb), each exit code captured before any pipe: - `pnpm --dir ui exec vitest run packages/plugin-grid/ --maxWorkers=2` under the verify lock: Test Files 283 passed (283), Tests 2443 passed (2443), the two new files included. - `pnpm --filter @object-ui/fields run type-check` and `pnpm --filter @object-ui/plugin-grid run type-check` (each `tsc --noEmit && tsc -p tsconfig.test.json`, so the new tests are type-checked): exit 0, after building the `@object-ui/plugin-grid^...` closure. - `pnpm check:new-line-citations` (ui, run by hand per `ui/AGENTS.md` objectstack-ai#11): 0 new citations. - Derived gate families (`node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack`): 39 derived, 39 run, all exit 0; `--ran` reconciles: "39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED". <details><summary>the 39 derived families, each COMMAND :: exit N</summary> ```text node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0 node scripts/check-adr-0087-registration.mjs --self-test :: exit 0 node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-empty-changeset.mjs --base origin/main :: exit 0 node scripts/check-empty-changeset.mjs --self-test :: exit 0 node scripts/check-sdui-manifest.mjs :: exit 0 node scripts/check-sdui-manifest.mjs --self-test :: exit 0 node scripts/ci/snapshot-next.mjs --self-test :: exit 0 node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0 node scripts/release-pending-publish.mjs --self-test :: exit 0 pnpm --dir ui exec vitest run scripts/ :: exit 0 pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0 pnpm --filter @objectstack/spec run check:error-code-provenance :: exit 0 pnpm check:changeset-gate-self-tests :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:dispatcher-error-vocabulary :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:engine-double-contract :: exit 0 pnpm check:error-status-conformance :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:published-files :: exit 0 pnpm check:query-options-erasure :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:registry-log-declared :: exit 0 pnpm check:rest-log-spy-declared :: exit 0 pnpm check:skill-identifier-liveness :: exit 0 pnpm check:test-source-alias :: exit 0 pnpm check:tier-file-adoption :: exit 0 pnpm check:type-check-coverage :: exit 0 pnpm check:type-check-debt :: exit 0 pnpm check:undeclared-dep-imports :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm check:where-matcher :: exit 0 ``` </details> The repo-wide scans, the `test:repo` project and every family CI runs beyond the derived list are CI's (Test UI, Type Check UI and the lint farm). --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5mDVzZmSX2UmJXU7sH)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #33346
Clause-②: yes (widening) —
@object-ui/plugin-detailexports the newConcurrentUpdateFieldConflicttype, andConcurrentUpdateConflictgains the optionalfieldslist. Nothing is removed or narrowed.Metadata-protocol: none
维护者速读
ui/**前端改动,无服务端与协议改动;回滚即还原本 PR。FlowNodeInspector.tsx的setField连接器分支;ConcurrentUpdateDialog.tsx的逐字段列表;SharedRecordFields.tsx的过滤。cd ui && pnpm exec vitest run packages/plugin-detail/src/__tests__/InlineEditSaveBar.multiFieldConflict-33346.test.tsx,预期 2 个用例全绿。What changes
connector_actionnode's connector or action now keeps the inputs the new action declares, each with its value or binding as it was, and drops the rest. When the new action's input schema is not known (no connector catalog, or an action id still being typed), the Input map is empty: nothing undeclared is guessed through. Before, onlyactionIdwas written, so the old action's keys stayed in the map: undeclared ones drew as extra Input rows, were saved with the flow, and the executor handed them to the new action (connector-nodes.tspasses the whole map; shipped input schemas are open). Inputs set aside by a switch are held in the open inspector and come back if the author returns to the same connector and action (the Action box commits per keystroke, so a typo must not lose them); they are never saved meanwhile. File:ui/packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.tsx.CONCURRENT_UPDATEon a save that changed several fields lists each field on its own row: label, your edit, current value. Before, both values were the whole maps printed as raw JSON. A one-field conflict looks as before. Files:ui/packages/plugin-detail/src/InlineEditSaveBar.tsx(buildConflictaddsfields),ConcurrentUpdateDialog.tsx(renders them),index.tsx(type export).AUDIT_FIELD_NAMES(@object-ui/types) and specFIELD_GROUP_SYSTEM_FIELDSare not listed, and when the resolve answer carries the field projection only declared fields are listed. Labels come from the projection. File:ui/apps/console/src/pages/SharedRecordFields.tsx.ResourceEditPage.tsxabout line 3059,data-testid="resource-edit-error"), not the lower located validation banner, which already wrapped. It gainsmin-w-0 [overflow-wrap:anywhere]. The object-list loader and context memo that Studio All-metadata form: the object-reference picker (for example Page → Object) lists bare machine names instead of labels #33104 edits are untouched.Why
The v18.4.0 sweep's console rows. Row 254 was graded up to p2 because stale inputs are sent at run time, not only drawn.
Tests
One rendered pin per fixed row, each with a CONTROL, each ablated red on its fix:
FlowNodeInspector.connectorActionSwitch-33346.test.tsx: a switch to an action that shareschannelsaves{ channel }with its expression binding, the rest dropped; CONTROL an action sharing no key savesinput: {}and draws none of the old values; connector switch resets; an action with no known schema gets{}and typing back restores; CONTROL keeps every input on an in-place editInlineEditSaveBar.multiFieldConflict-33346.test.tsx: per-field rows with label and both values, no{/}in the dialog; CONTROL single-field pairSharedRecordPage.systemFields-33346.test.tsx: declared business fields by label only; an answer without a projection still drops system and audit columnsResourceEditPage.errorBoxWrap-33346.test.tsx: the box carries the wrap classes; CONTROL the whole refusal text, untruncatedTwo existing share-page pins were updated to the record-page rule (
SharedRecordPage-26767,SharedRecordPage-27121): an audit column and an undeclared key are no longer listed, and a fixture lookup field namedcreated_bywas renamed tosponsor_idbecausecreated_byis now an audit column the page hides.Acceptance notes
sys_api_keyis therevokedcolumn alone on every key, live or revoked (sys-api-key.object.ts,userActions: { edit: true }with the ADR-0092 D2 clamp; Revoke is itselfPATCH {revoked: true}), so Edit is a real action on every key.sys_session's object description and the button is an object-levellist_toolbaraction with no view scoping (packages/platform-objects/src/identity/sys-session.object.ts). The console renders an object description on every view by design; per the seat ruling there is no ui-side special case. Reported inout_of_scope_findings.link.object_namebecause the share-link resolve answer carries no object label (packages/types/src/share-link-resolve-answer.ts). The projection also carries nohidden, so a hidden non-system field (for example the injectedowning_business_unit_id,queue) is still listed. Reported inout_of_scope_findings.out_of_scope_findings.Verification
objectstack dev --ui, Playwright, 1440x900), an object field saved without atypeso the refusal carries the field-type enum list as one unbroken token. Before: the top error box's column had scrollWidth 3067 against clientWidth 1440, the text cut at the right edge. After (console dist rebuilt): the box spans 24 to 1416 px, scrollWidth equals clientWidth (1390), height 106 px with the text wrapped, every ancestor and the document at 1440.dispatch-gates.mjs --commandsderives 37 families for this diff; all 37 ran locally on the rebased branch with exit 0, reconciled by--ran(37 derived, 37 run, 0 not measured).check:test-source-aliasfirst exited 1 on the two new app-shell pins (the lazily loaded@objectstack/lintwas reached inside a clocked case); both pins now import it at module top, and the re-run exited 0.type-checkfor@object-ui/plugin-detail,@object-ui/app-shelland@object-ui/console, and eslint on the four touched source files, all exit 0.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5oEBEF6BvrUQcZAWdX