Repository navigation
fix(studio): a refused save draws its causes under the rows of the curated designers (view, object, action, ...) - #35648
Conversation
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUjtFEFN5FLe377MBT
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUjtFEFN5FLe377MBT
…t graph The dataset inspector must not load the field-widget registry with it. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUjtFEFN5FLe377MBT
…ster pin Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgUjtFEFN5FLe377MBT
|
repo:objectstack#1 · os-sales · session_01L6bhgUjtFEFN5FLe377MBT {
"issue": 35628,
"status": "done",
"branch": "claude/project-thread-g62vj4",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35648",
"head": "3daf3308a24c8aeca6967be82fff533d43a9c8d3",
"session": "session_01L6bhgUjtFEFN5FLe377MBT",
"premise_still_valid": true,
"summary": "Implemented claim steps 1-5: MetadataDefaultInspectorProps gains optional issues/revealIssues/onInlineIssueFieldsChange, which ResourceEditPage passes to the default inspector exactly as to its fallback form; drawnInline and the banner filter test issuePathDrawnBy (a registered path prefix equals or segment-wise prefixes the path; over a whole-draft form's row keys this is #35623's head test); action/dashboard/hook/page/report forward the props to their one SchemaForm; ViewVariantInspector hands its spec form the issues under the variant key (trimmed) and registers its rows under it (useSliceFormIssueRows), and its Label and Columns rows plus the object and dataset designers' one-key rows draw through IssuePrefixLines; the counting register moved from SchemaForm into issuePath.ts unchanged. Zone-2 measurements: (1) variantKey is `config` for the served shape (resolveVariantBindings returns storeKey 'config' for a plain-object config; the live refusal named config.columns.0 and config); Label is an InspectorTextField writing label + config.label, Columns is FieldsListEditor; left to the banner: View type (config.type), Object (object / config.data.object, two prefixes), Conditional formatting, the config.label mirror. (2) Confirmed: action, dashboard, hook, page, report each mount exactly one SchemaForm over the whole draft; object and dataset mount none. Object rows wired: name, label, pluralLabel, icon, description, access, requiredPermissions (everything else, fields/validations etc., stays in the banner); dataset rows wired: name (create only), label, description, object, include, filter, dimensions, measures. (3) The prefix form is needed, and the smaller variant was chosen: SchemaForm's own register and placement are unedited (rows still register their own keys); only the host's test became a prefix walk, plus a slice-mapping hook. With heads only, a slice form must either register `config` (dropping config.zz_unknown from the banner though no row draws it) or not (config.columns.0 / config.description said twice); the head-only ablation reds exactly those 4 cases. (4) Other hosts (studio-design ObjectSettingsPanel, StudioBundleItemEditor, ObjectActionsPanel, ObjectHooksPanel, StudioDesignSurface, the scoped ViewInspector router, ReportConfigPanel) pass none of the new props: app-shell type-check green, studio-design dir 352 files / 2735 tests green. Browser (showcase dev + console vite): view designer refused at label.not_a_locale x2, config.columns.0, config draws Label (2 lines) and Columns (1 line), banner keeps only `config: ... zz_unknown`; action refused at resultDialog.title.not_a_locale x2 draws under the nested Title row, banner empty; before: no row lit, banner lists all.",
"tests": "New pins ResourceEditPage.defaultInspectorIssues-35628.test.tsx (5 cases: step 1 probe, view one-message + sibling-in-banner, action nested, object label + fields in banner) and SchemaForm.issuePrefixRegister-35628.test.tsx (5 cases: segment-wise match, head-test parity, issuesUnderPrefix, slice register never `config` + unmount empties, line shapes): Test Files 2 passed, Tests 10 passed; at 3daf3308 inside the ui scripts/ run: Test Files 173 passed | 2 skipped (175), Tests 5102 passed | 2 skipped (5104), VERDICT command-exit 0. Whole metadata-admin dir at 0e7ab98b (final source; 3daf3308 only adds two module-top imports to one pin): Test Files 759 passed (759), Tests 8173 passed | 1 skipped (8174), VERDICT command-exit 0. Earlier dir run at 1d427056: 1 failed | 758 passed (inspectors/datasetFilterCondition.dateRoundTrip-9382 2 cases: importing the helper from SchemaForm pulled the field-widget registry so FilterBuilder drew a lazy date skeleton); fixed in source by moving the helper to issuePath.ts, pin unedited, 27 passed. studio-design dir + ReportConfigPanel: Test Files 352 passed (352), Tests 2735 passed, VERDICT command-exit 0. app-shell type-check (tsc --noEmit + tsconfig.test.json) at 0e7ab98b: VERDICT command-exit 0 (after rebuilding stale @object-ui/plugin-list and @object-ui/types dist). Ablation after commit via ablation-replace.mjs on issuePath.ts: prefix walk -> head-only loop, mutation landed anchor 1 -> 0, blob 0c7b49618e4f -> f512ae05f080; pins Tests 4 failed | 6 passed (10) (segment-wise, slice register, view one-message, view sibling red; parity, issuesUnderPrefix, line shapes, step-1 probe, action, object green); restored blob == HEAD, git diff HEAD empty. Pins import source (no dist in path). Existing pins moved: none.",
"gates": "dispatch-gates --commands --repo objectstack-ai/objectstack derived 39 families at 0e7ab98b; all recorded as `cmd :: exit N`; --ran: '39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED (a DERIVED zero — all 39 recorded an exit code and none of them is 3)', exit 0. Every family :: exit 0 (check-adr-0087-registration x2, check-changeset-no-major, check-closing-keyword-parity x2, check-comment-mask-corpus, check-empty-changeset x2, check-sdui-manifest x2, snapshot-next --self-test, check-governed-queue-guard --self-test, release-rehearsal-clone --self-test, release-pending-publish --self-test, ui vitest scripts/ (with --maxWorkers=2, at 3daf3308), spec check:duration-unit-keys, spec check:error-code-provenance, check:adr-anchors, check:changeset-gate-self-tests, check:closed-ceremony-text, check:cross-package-test-inputs, check:dispatcher-error-vocabulary, check:driver-memory-census, check:engine-double-contract, check:gitlink-declared, check:nul-bytes, check:published-files, check:query-options-erasure, check:refd-timer-probe, check:registry-log-declared, check:rest-log-spy-declared, check:skill-identifier-liveness, check:test-source-alias, check:tier-file-adoption, check:type-check-coverage, check:type-check-debt, check:undeclared-dep-imports, check:watch-hint-literal, check:where-matcher). check:test-source-alias exit 1 first (new prefix-register pin reached lazy @objectstack/formula and @objectstack/lint), fixed in 3daf3308, re-run exit 0; check:nul-bytes and check:cross-package-test-inputs re-run exit 0 at 3daf3308. ui check:new-line-citations: 0 new citation(s), exit 0. overlap-check before each push: VERDICT clean exit 0. CI check-runs on 3daf3308 at report time: 24 success, 13 skipped, 13 in_progress, 1 queued, 0 failure (not awaited per os-dev).",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: no)",
"line_budget": "+682 / -29 over 15 files (source +274 / -29 over 12 files); #35623 was +543 / -52; under 2x",
"files_changed": "ui/packages/app-shell/src/views/metadata-admin/{ResourceEditPage.tsx, SchemaForm.tsx, issuePath.ts, default-inspector-registry.ts}, ui/packages/app-shell/src/views/metadata-admin/inspectors/{Action,Dashboard,Dataset,Hook,Object,Page,Report}DefaultInspector.tsx, ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx, ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.defaultInspectorIssues-35628.test.tsx, ui/packages/app-shell/src/views/metadata-admin/SchemaForm.issuePrefixRegister-35628.test.tsx, .changeset/35628-default-inspector-refusal-rows.md",
"deviations": "(1) the helper (IssuePrefixLines, useIssuePrefixRegister, useSliceFormIssueRows) lives in issuePath.ts, now a React module using createElement, not in SchemaForm.tsx: putting it in SchemaForm reddened an existing dataset pin through the import graph; issuePath.ts is in the claim's surface for step 2. (2) step 5: IssuePrefixLines never defers, since no host hands a default inspector createMode; revealIssues is forwarded to the forms as claimed but inert today; no deferral pin (no reachable deferral). (3) the object designer seen in the browser was package-locked, so object rows are pinned at page level only; dataset rows are not separately pinned (same helper as object). (4) ui scripts/ family ran with --maxWorkers=2 and the two new pin files appended. (5) PR body: first two lines are the dispatch's attribution lines, Fixes #35628 is line 3, signature line 5. (6) no new language-pack key (Metadata-protocol: none holds). (7) ViewDefaultInspector spreads props, so it needed no edit; ViewInspector.tsx untouched. (8) the harness wrote `Co-Authored-By` attribution guidance naming a model; commits carry the model-free pair the dispatch ordered.",
"mcp_calls": "0",
"api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches -> pulls create #35648), post-stamped comment on PR #35648 (this report); plus git push (not REST)",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed: view designer rows View type (config.type), Object (object / config.data.object) and Conditional formatting keep their causes in the banner (correct fallback); the refusal line still reads 'Validation failed (N issues).' on types without a client validator (action), as ruled under #27865"
]
} |
|
repo:objectstack#1 · os-sales · session_01L6bhgUjtFEFN5FLe377MBT Final head for L1: |
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUjtFEFN5FLe377MBT Landing · Area b1-U · 2026-11-19T21:36Z · head
State change: ready for review + auto-merge enabled. |
Requested by Sales · project thread
Fixes #35628
repo:objectstack#1 · os-sales · session_01L6bhgUjtFEFN5FLe377MBT
Clause-②: no
Metadata-protocol: none
Branch:
claude/project-thread-g62vj4— the branch this card thread's harness assigns and the only one it may push, so the repository'sclaude/issue-35628-*spelling is not available here (noted for the Duplicate Fix Guard).维护者速读
What changes
The page now hands a type's registered default inspector the same issues and inline register it hands its fallback form, and the register carries path prefixes, so the #35623 placement rule reaches the curated designers without one mistake ever being said twice (objectstack#27865).
MetadataDefaultInspectorPropsgains three optional props:issues,revealIssues,onInlineIssueFieldsChange.ResourceEditPagepasses them to the default inspector exactly as it passes them to the fallbackSchemaForm(displayIssues, its reveal flag,setInlineIssueFields). Every other host (the Studio Design panels, the scopedViewInspectorrouter,ReportConfigPanel, the column panes) passes none and gets the panel it got before.drawnInlineand the banner filter testissuePathDrawnBy(registered, path): some registered prefix is the path or a segment-wise prefix of it. A whole-draft form still registers its row keys (one-segment prefixes), so there the answer is fix(studio): a refused metadata save draws a nested cause under the row its path names #35623's head test, pinned case by case. A form over a slice reports its keys under the slice's path (useSliceFormIssueRows): the view body form registersconfig.description, neverconfig. The counting register moved out ofSchemaFormintouseIssuePrefixRegister(issuePath.ts) unchanged, so a curated inspector builds its own from the same code.SchemaForm. Keys they curate above the form are hidden from it, mount no row, are never registered, and stay in the banner.ViewVariantInspectorhands its spec form the issues under the variant key, trimmed (issuesUnderPrefix), and registers the form's rows under that key. Its bespoke Label row drawslabel.*and its Columns list drawsconfig.columns.*throughIssuePrefixLines, which draws a cause the way a form row does (exact as its message, deeper led by thedescribeIssuePathtrail) and registers its prefix while mounted. Object: Name, Label, Plural label, Icon, Description, Exposure posture (access) and Required capabilities (requiredPermissions), one top-level key each. Dataset: Name (create only), Label, Description, Base object, Included relationships, Scope filter, Dimensions, Measures.createMode, so neither the forwarded forms norIssuePrefixLinesdefer: mounted is drawn, and register-iff-drawn holds by construction.revealIssuesis forwarded to the forms as the claim asked; it is inert there today.Kept as ruled:
issues.lengthstays out of the Save gate;err.bodyis not re-read; the refusal hold by slice (9073cf018) is untouched; #35623's placement insideSchemaFormis unchanged (its rows, grouping and hand-down are not edited).Files to read first, by risk:
ui/packages/app-shell/src/views/metadata-admin/issuePath.ts—issuePathDrawnBy(the host's whole judgement),useSliceFormIssueRows,IssuePrefixLines.ui/packages/app-shell/src/views/metadata-admin/inspectors/ViewVariantInspector.tsx— the slice form'sissues/ register wiring and the twoIssuePrefixLinesrows.ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx—drawnInline, the bannererrsfilter, and the default-inspector mount.Size: +274 / −29 over the 12 source files (+682 / −29 over 15 files with the two pin files and the changeset); #35623 was +543 / −52.
Tests
New card-named pins:
ResourceEditPage.defaultInspectorIssues-35628.test.tsx— the real page and the real registered inspectors over a real parsedMetadataError, canvases stubbed so the default inspector fills the rail. Step 1: a probe inspector receives the page's issues, reveal flag and register, and the banner drops only what it reports. Steps 2 and 4, view:label.not_a_localetwice under Label,config.columns.0under Columns,config.descriptionunder the spec form's Description row, each message once, no banner, no refusal line (the objectstack#27865 pin for the view family);config.zz_unknownbeside a drawn column cause stays in the banner (the step-2 sibling pin at page level). Step 3, action:refresh.modedrawn once under the nested Mode row, no banner, no refusal line (the SchemaForm-backed family). Step 4, object:label.not_a_localeonce under Label,fields.title.typekept in the banner (the bespoke-row family).SchemaForm.issuePrefixRegister-35628.test.tsx—issuePathDrawnByis segment-wise (config.columnsXis not underconfig.columns), equals the head test over whole-draft row keys,issuesUnderPrefixhands a slice none of its siblings; a slice host registersconfig.filter/config.description/config.columns/labeland neverconfig, soconfig.zz_unknownstays undrawn (the step-2 pin that a slice form never swallows a sibling key's issue), and unmounting empties the register;IssuePrefixLinesline shapes.Existing pins moved: none. One existing pin went red mid-branch and was fixed in the source, not in the pin:
inspectors/datasetFilterCondition.dateRoundTrip-9382.test.tsxfailed 2 cases when the dataset inspector imported the helper fromSchemaForm.tsx(that import pulls the field-widget registry, so the file'sFilterBuilderdrew a lazy date widget's loading skeleton). The helper moved toissuePath.ts; the pin is green, unedited.Test readings
metadata-admindirectory,pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/at0e7ab98b(final source; the last commit3daf3308adds two module-top imports to one pin file):Test Files 759 passed (759),Tests 8173 passed | 1 skipped (8174),VERDICT command-exit 0. The earlier run at1d427056was1 failed | 758 passed, the dateRoundTrip pin above; against base sources that file was27 passed.3daf3308, inside theui/scripts/family run:Test Files 173 passed | 2 skipped (175),Tests 5102 passed | 2 skipped (5104),VERDICT command-exit 0.@object-ui/app-shelltype-check(tsc --noEmitandtsc -p tsconfig.test.json) at0e7ab98b:VERDICT command-exit 0, after rebuilding the stale@object-ui/plugin-listand@object-ui/typesdist (the first run named errors in files this branch does not touch).node scripts/ablation-replace.mjsonissuePath.ts: the prefix walkfor (let p = path; p !== ''; p = p.slice(0, Math.max(0, p.lastIndexOf('.')))) {replaced by a head-only testfor (let p = issuePathHead(path); p !== ''; p = '') {.mutation landed: anchor 1 -> 0, blob 0c7b49618e4f -> f512ae05f080; the two pin files wentTests 4 failed | 6 passed (10): segment-wise matching, the slice register, the view one-message case and the view sibling case red; head-test parity,issuesUnderPrefix, line shapes, the step-1 probe, action and object green, as expected for top-level keys.ok restored: blob == HEAD (0c7b49618e4f) and git diff HEAD is empty. The pins import source directly (nodist/in the path).Acceptance notes
Driven in the running app: showcase backend
objectstack dev --seed-adminon its own port, console Vite withDEV_PROXY_TARGET, on a view and an action the run created. The body went in through the inspector's Source tab, then Properties, then Save (a draft save, refused 422).config.columns.0(unrecognized_keys),config(unrecognized_keys,zz_unknown),label.not_a_locale(invalid_key, invalid_format). Label draws bothLabel → not_a_locale: …lines, Columns drawsColumns → #1: Unrecognized key(s) on this list column: bogus_key …, the banner lists onlyconfig: Unrecognized key(s) on this list view: zz_unknown ….6d86b43b, same run): no row lit; the banner lists the column,configand label causes (4 validation error(s)).resultDialog.title.not_a_localetwice, drawn under the nested Title row of Result dialog (Title → not_a_locale: …), banner empty. Before: no row lit, the banner lists both.config: … zz_unknown), shown above./mnt/project-files/build-seat1/35628/(before-view-rail.png,after-view-rail.png,before-action-full.png,after-action-full.png,after-action-row.png, and the*.outreadings).Measured, not changed here:
config(resolveVariantBindingsreturnsstoreKey: 'config'for a plain-objectconfig), and the server's refusal paths name it (config.columns.0,config).config.type), Object (object/config.data.object, two prefixes), Conditional formatting (config.conditionalFormatting), and the variant'sconfig.labelmirror (the spec form hides it; the Label row draws the top-levellabelonly, as the claim named).Validation failed (N issues).when not every cause is drawn, and on the action editor always:actionhas no client validator, so the line keeps its message somewhere (Setup → metadata edit page saves a bad name anyway and stacks three messages (server refusal, client summary, inline error) (#27521 row 16) #27865 as ruled), unchanged.Verification
Two minutes:
pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/ResourceEditPage.defaultInspectorIssues-35628.test.tsx packages/app-shell/src/views/metadata-admin/SchemaForm.issuePrefixRegister-35628.test.tsx— expectTests 10 passed (10).Gate readings (local subset)
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 39 families at0e7ab98b; every family recorded with its exit code;--ran:39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED (a DERIVED zero — all 39 recorded an exit code and none of them is 3). Every family exit 0, with one repair:pnpm check:test-source-aliasexit 1 on the new prefix-register pin (lazy@objectstack/formula/@objectstack/lintreached inside a clocked window), fixed by module-top imports in3daf3308, re-run exit 0 there;check:nul-bytesandcheck:cross-package-test-inputsre-run exit 0 at3daf3308. Theui/scripts/family ran with--maxWorkers=2, at3daf3308.pnpm check:new-line-citations(underui/):0 new citation(s).scripts/pm/overlap-check.mjsbefore each push:VERDICT clean exit 0. CI families: read from this PR's check-runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUjtFEFN5FLe377MBT