Skip to content

console(metadata-admin): a served form row marked required that the Zod leaves optional is only a star, so Save accepts it empty (permission set Label after #28152) #28179

Closed

Description

@objectstack-fleet

domain:spec#4 · marchtian · session_017ihL2fi9zfJhUTubyJYb6V

Filing gate: ② a should-fix a contract review carried out of scope (triage contract review 6526229582 on PR #28152, card #27864, attempt 1). Filed by domain:spec seat 4 · marchtian · session session_017ihL2fi9zfJhUTubyJYb6V. ⛔ Not a claim. No grade and no lane: triage sets both (the code is ui/packages/app-shell).
Reader: the lane triage assigns.
Dedupe (open AND closed): semantic search "metadata create form Save ignores required star served form required override empty field" → 4 hits, all public-form (/forms/:slug) cards (#24131, #27398, #27496, #27602). None is the Studio metadata create form. New.
reach: read in code, NOT measured through a public door. Console › Setup › Permission sets › New, after PR #28152: leave the starred Label empty, type a Name, Save.

What the code says

  • A served metadata form row's required: true is a layout override (FormFieldSchema.required, packages/spec/src/ui/view.zod.ts, "Required override"). The Console draws it as a star plus aria-required, deliberately not native required (ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx around lines 1939–1948).
  • The create page's client validation reads the Zod, not the form rows (ResourceEditPage.tsx around lines 945–960). So a row the form marks required but the schema leaves optional is advisory: Save succeeds with it empty.
  • PR fix(spec): the permission-set form asks for the label first, and requires it #28152 made permission's Identity row label required in the form while PermissionSetSchema.label stays z.string().optional() (the ruling forbade moving the accept set). It is the first registry row where the override and the Zod disagree; every other label row marked required sits over a required z.string().

Wanted

  • The metadata create form's Save refuses (client-side, by name) an empty field that the served form marks required, even when the Zod leaves it optional. Server accept sets do not move.
  • Pin it on the permission create screen: empty Label + typed Name is refused with a field-level message on Label.

Related: #27864 / PR #28152 (contract review should-fix 1).

Activity

  1. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: 能用的表单 | none | P②

    Triage: p2 · bug · domain:ui · area:studio · pm:queue · 2026-10-30T16:00Z

    ⛔ Not a claim.

    • Read fresh. A row the served form marks required can be saved empty, because Save reads the Zod and not the form. PR fix(spec): the permission-set form asks for the label first, and requires it #28152 made the permission-set Label the first case where the two disagree.
    • The route is the card's. The metadata create form refuses an empty field that the form marks required, client-side and by name. ⛔ The server accept sets do not move.
    • Pin it on the permission create screen.

    Generated by Claude Code

  2. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-tesla · session_01L9qibz8HEj53Wx2uphTo2o

    Claim: PM loop round 4 · 2026-10-31T02:48Z
    Session: session_01L9qibz8HEj53Wx2uphTo2o (seat; implementation by card thread session session_01L9qibzECC3G6Nyga7Ysbjd, mode:thread)
    Account: os-tesla (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-xe3kz5 (the card thread's designated push branch, the recorded platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-28179
    Domain: domain:ui
    Seat: domain:ui#3
    File surface: ResourceEditPage.tsx: required-row state beside inlineIssueFields (≈L636), displayIssues merge (≈L842), the doSave hold (≈L1896), the two form-body <SchemaForm> sites (≈L3452/L3478); SchemaForm.tsx new optional onRequiredRowFieldsChange prop (same pattern as onInlineIssueFieldsChange); one i18n key block; tests; .changeset/28179-*.md. ⛔ the import block, item-tool sheets and references code of ResourceEditPage.tsx (#28239) (stop on breach; explain in the report)
    Container & model: S-M, mode:thread, model: default (dispatch-gates --tier re-run on the actual diff), effort: high
    Clause-②: no (expected; re-judged on the diff)
    Metadata-protocol: none
    Responsibility: the client ignoring a served required override is ours (ui); the served form row (#28152) is correct and stays
    Thread-read: none
    Premise: per the card's measurement; the dev re-measures on current main before code
    Serial constraints cleared: seat-3 siblings #28239 #28240 #28241 #28179 #28164 hold declared regions of shared files (FRAME.md); #28148 (paused) holds views/setup/PackagedAutomationPage.tsx + packagedFlowLedger.ts

    Maintainer 2026-10-31 「ui 车道一堆任务啊,应该并发开满啊」. Order: /mnt/project-files/ui-seat-3/r2026-10-31/dispatch-28179.md under FRAME.md.

  3. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-tesla · session_01L9qibzECC3G6Nyga7Ysbjd
    os-dev-report

    {
     "issue": 28179,
     "status": "done",
     "branch": "claude/project-thread-xe3kz5",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/28293",
     "session": "session_01L9qibzECC3G6Nyga7Ysbjd",
     "premise_still_valid": true,
     "summary": "SchemaForm gains onRequiredRowFieldsChange: SectionedSchemaForm reports the offered rows (visible section, not hidden, schema property present, editable) whose served row says required: true, through one shared visibility function. ResourceEditPage derives requiredRowIssues from the draft for those rows the served schema does not itself require or default, shows them as the field's located 'This field is required.' issue, and doSave returns before any request while one stands (create and edit), right after the existing Name hold. New i18n key engine.validation.fieldRequired in studio en/zh. Measured on main 6285203d: the permission Label row shows only its star and Save takes the CONTROL path (PUT with no label).",
     "tests": "head 75f14a8c: pnpm --dir ui exec vitest run ResourceEditPage.requiredRow-28179.test.tsx SchemaForm.requiredRows-28179.test.tsx -> Test Files 2 passed (2), Tests 9 passed (9). Reverse leg (ResourceEditPage.tsx + SchemaForm.tsx restored to 6285203d, marker counts fieldRequired 0 / onRequiredRowFieldsChange 0) -> Tests 6 failed | 3 passed (9): 5 SchemaForm report cases + page (a) 'Unable to find an element by: [data-testid=\"schema-form-issue\"]' in the Label row; restore proven by empty git diff HEAD. All ResourceEditPage.*.test.tsx + SchemaForm*.test.tsx + i18n studio-namespace.test.ts -> Test Files 78 passed (78), Tests 568 passed (568). pnpm --filter @object-ui/app-shell --filter @object-ui/i18n run type-check -> exit 0 (after dts build of @object-ui/app-shell^...). No ablation beyond the reverse leg.",
     "gates": "local, head 75f14a8c: dispatch-gates --commands derived 34 families, all exit 0 (incl. node scripts/check-sdui-manifest.mjs + --self-test, pnpm --dir ui exec vitest run scripts/, check:adr-0087-registration, check:changeset-no-major, check:empty-changeset, check:published-files, check:type-check-coverage, check:type-check-debt, check:test-source-alias, check:cross-package-test-inputs, check:undeclared-dep-imports, check:nul-bytes); dispatch-gates --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. Outside derivation: pnpm --dir ui run check:new-line-citations exit 0 (0 new); eslint changed files exit 0 (0 errors). CI check-runs: in_progress at report time (draft just opened).",
     "line_budget": "412 additions / 19 deletions over 7 files (2 new test files ~235 lines); under the 3000-line class",
     "files_changed": [
      "ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx",
      "ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx",
      "ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.requiredRow-28179.test.tsx",
      "ui/packages/app-shell/src/views/metadata-admin/SchemaForm.requiredRows-28179.test.tsx",
      "ui/packages/i18n/src/namespaces/studio/en.ts",
      "ui/packages/i18n/src/namespaces/studio/zh.ts",
      ".changeset/28179-required-form-row-holds-save.md"
     ],
     "deviations": [
      "SchemaForm.tsx edited beyond error display: seat-approved surface (claim 6538007323).",
      "Hold judged only where the served schema does not already require the field (order test 3 read as: a schema-required field keeps its old verdict; pinned as case (c), which is the create-seed placeholder refusal).",
      "Session context asks to set PR assignee/reviewer via GitHub MCP; not done, FRAME and os-dev.md forbid it (seat lands)."
     ],
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "mcp_calls": "6 — reads only: issue_read x3, pull_request_read x1, tool-search loads x2 (not GitHub calls); 0 writes",
     "api_writes": "2 — fleet-write relay pr_create (objectstack-ai/objectstack#28293); post-stamped comment on #28179 (this report). Plus git push.",
     "open_questions": [],
     "out_of_scope_findings": [
      "carrier: none · noted, not filed: a required row in an inactive tab of a tabbed served form draws its issue only once its tab mounts; meanwhile it is named in the summary banner (not separately pinned)"
     ]
    }
  4. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#3 · os-tesla · session_01L9qibz8HEj53Wx2uphTo2o

    Landed · 2026-10-31T04:08Z

    probe reading
    PR #28293 merged through the queue at 2026-10-31T04:07:57Z, merge commit 91e46522c1 (ACCEPT 6538640369)
    this card closed completed by the PR's Fixes line

    State: pm:dispatched removed (closed card).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:studioChanging a running app without code — authoring, publish, docs and the portalbugSomething isn't workingdomain:uifindingpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions