Skip to content

feat(studio): the publish panel names each change in words — properties by their form label, rules and groups by their label - #27885

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-qm2ds0
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-qm2ds0

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

维护者速读

Fixes #27835

Clause-②: no
Metadata-protocol: none

What changes

The Pending changes panel (DraftChangesPanel) is the Studio publish summary too: StudioDesignSurface renders the same component in its confirm posture, so one change covers both surfaces the card names.

  • Properties by their form label. A new leaf, preview/changeKeyLabels.ts, reads the item type's authoring form from the spec's METADATA_FORM_REGISTRY (the type-to-form map /meta/types serves) and names a property the way the inspector's SchemaForm row does: the row's declared label, else its prettified key (prettifyFieldName, the helper the Studio's held line already shares). The key follows as secondary text only when the label does not spell it, SchemaForm's machine-name rule. A property the form has no row for reads as its key, in monospace, as before. No key-to-label table lives in the panel. Changed field properties read through the field form the same way.
  • Named list entries. The flow-node diff is generalised into one diffListEntries(before, after, idKey). Flows keep calling it for nodes by id (node rows unchanged). For every other type, a top-level list whose entries carry a distinct name (validation rules) or key (field groups) gets its entries listed under the list's key row: added, changed (with what differs, by the list row's declared sub-row labels) and removed, each led by its label. A list of plain strings, or one with no such identity, stays one key row. The diff lands in EntryChangeDetail.entries, a Map keyed by the key as it appears in keys; keys itself is unchanged in shape.
  • Views one level down. A view is a ViewItem whose inspector edits draft.config, so a view is compared inside config (config.columns), labelled from the view form. A non-view item still compares config whole.
  • The item rows themselves already lead with the item's label under its type heading (objectui#11862); they are unchanged.

Tests

  • New DraftChangesPanel.namedChanges-27835.test.tsx (12 tests): form labels for object, field, view-body and flow properties; a declared sub-row label; controls for a property, a type no form names; the rule added / changed / removed and the field group changed; controls for a string list and for a flow's other lists; a new view and a view edit compared inside config, with a non-view control; and the rendered drill-in for both.
  • Seven existing panel tests updated where they pinned the raw-key text this card changes (+ sharingModel → + Sharing Model, ~ label → ~ Label, ~ edges → ~ Edges, · label → · Label, + subject → + Subject); protectionEnvelope's row reader now reads field and key rows by test id instead of the monospace class. Flow node row assertions are untouched and green.
  • pnpm --dir ui exec vitest run packages/app-shell/src/preview/ → Test Files 40 passed (40), Tests 274 passed (274).
  • pnpm --filter @object-ui/app-shell type-check → exit 0.
Ablations (each through scripts/ablation-replace.mjs, mutation proven on disk, restored to the HEAD blob)
  • formKeyLabel returns no label (if (row || !row) return undefined;): 6 failed in namedChanges-27835 + noChangeAndKeySplit-11807, restored.
  • Named-list entries never recorded (listEntryRowCount(list) < 0): 3 failed in namedChanges-27835, restored.
  • View not compared inside config (type === 'NOT_view'): 3 failed in namedChanges-27835, restored.

No build step: the panel tests import the source directly.

Acceptance notes

  • View, validation rule, field and object changes now name the item in words; property keys read as their form labels where the type's form has a row; flow node naming unchanged. Reading taken: a row with no declared label counts as "a form label", the prettified key the inspector itself shows (most spec form rows declare none), and a property with no form row falls back to its key.
  • Labels are the spec's English form labels in every locale. The inspector's own zh overlays (translateSchemaFieldLabel, the dashboard metadataForms bundle) live in the metadata-admin string table, which this panel's eager graph must not import (the reason recorded on computeChangeDetail). A zh author therefore reads English property labels here, as on most inspector rows; noted, not filed.
  • A form row with no declared label whose schema carries a title shows that title in the inspector (SchemaForm reads the JSON schema) but its prettified key here; this panel holds no JSON schema. Noted, not filed.
  • Importing @objectstack/spec/system adds no new eager weight: every @objectstack/* module already rides the console's vendor-objectstack chunk (the measurement recorded in the panel's import comment).
  • No i18n key was added or changed: the list-entry rows reuse the field-row shape under the list's own key row.

Verification

Local derived gates on head b4396c78: node scripts/pm/dispatch-gates.mjs --commands derived 34 families; all 34 ran with exit 0, and --ran reconciled "34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN". pnpm --dir ui run check:new-line-citations → "0 new citation(s)". Every family CI runs is read from this PR's checks.

Derived gates, exit codes captured before any pipe
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/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 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:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-changeset-deadline-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: 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

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CZ5jdK8tmGe3uqdgUo


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe

席位核对

ACCEPT · head b4396c7857d6554040a0b803e7ced1c883fec480 · 2026-10-30T02:51Z

  • Shape: draft → main, Fixes #27835 on its own line, no other card number beside a closing keyword. Clause-②: no and Metadata-protocol: none match the claim; the change is in @object-ui/app-shell (private: true) src/preview/** only, no i18n key added. No contract review owed.
  • Premise, measured: the Studio publish summary is the same DraftChangesPanel (measured: StudioDesignSurface renders it), so one change covers both. A property reads as the label its type's spec form gives it, read from METADATA_FORM_REGISTRY (changeKeyLabels.ts), falling back to the prettified key as SchemaForm shows it, and to the raw key where the form has no row. There is no local key→label table. The flow-node diff is generalised (diffListEntries), not copied: validations by name and fieldGroups by key name each entry added, changed or removed, and a view is compared inside config. Flow-node rows are unchanged. The new import field-source-label is a leaf module, so the eager graph the panel's header describes does not grow; the spec subpath sits in vendor-objectstack already.
  • Serial: origin/main 637cfc67 (with PR fix(studio): plainer authoring in Studio — option labels first, named rules, labelled fields, honest counts #27830) is merged in, as the claim required.
  • Gates (check-runs on the head): 44 success, 11 skipped, 0 failure; mergeable_state clean. check-governed-merges --pr 27885: NOT governed (0 of 11 paths), 601 changed lines.
  • Accepted deviations: the report puts the signature on line 1 and os-dev-report on line 2 (named in the report).
  • Out of scope: two notes, not filed: the labels are the spec's English in every locale (the inspector's locale overlays live in the metadata-admin table, which this eager panel must not carry), and a form row whose schema has a title shows the title in the inspector but the prettified key here.
  • Landing: non-governed, all checks green, mergeable_state clean ⇒ the seat lands it (pr_ready + automerge_enable).

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 30, 2026 02:52
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 30, 2026 02:52
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 784dc9a Oct 30, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-qm2ds0 branch October 30, 2026 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio publish and changes panel: name each change in words for views, validation rules and other types, not raw keys (#27521 row 28, naming half)

1 participant