Skip to content

Studio form: a refused save marks a field row only when an issue's path equals the row's key, so nested causes (label.xx, visibleWhen.*, columns.N.*) leave the row unmarked (form side of #35400) #35499

Closed

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

Filing gate: ② maintainer-directed. The scope ruling on #35400 (7008570921) picked 「每层都去掉,表单另立单」: the server drops the bare 「输入无效」 union head at every layer, and the form side goes on its own card. This is that card. ⛔ Not a claim; triage sets lane and grade.

What the author sees

After a refused metadata save, Studio's form editor draws an issue under a field row only when the issue's path equals that row's top-level key. A cause at a nested path (label.not_a_locale, visibleWhen.dialect, columns.0.field) lights no row today. Until #35400 the row was lit only by the bare union head at the top-level key, which said 「输入无效」 and nothing more. Once #35400 drops that head, about 25 keys across 12 metadata types show no red line under the field after a refused save. For types with no live client validator (dataset, field, book, seed, plus view), the line stays missing until the next edit. The place is still named in the Save button's tooltip and, for types with a live validator, in the banner.

Where (read at ee40658d0d, not driven in a browser)

  • ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx:1196-1202: issuesByPath keys by i.path verbatim. Rows read it at :1327 and :1733, and nested SchemaForm instances get no issues (:2349-2356). The row draws a red text line (:1915, :2046-2048, :2107-2111), with no border and no aria-invalid.
  • ResourceEditPage.tsx: the 422 map is at :2215-2218 and set at :2232. drawnInline (:2257-2259) and the banner filter (:3414-3416) compare paths exactly. The live client pass replaces issues 200 ms after mount and on each edit (:894-938). The banner for types without a live validator reads the stored body's verdict (:3385-3391).
  • EmbeddedItemEditor.tsx:204-213 trims its prefix and feeds the same SchemaForm.
  • The Studio Design surface (studio-design/metadataError.ts:190-208) already locates by prefix and is not affected.

Fix direction (to be designed on this card)

A naive rollup onto the top-level row is not enough. drawnInline and the banner filter would show one mistake twice, and the client walk's nested issues (object fields.*, view config.columns.*, flow nodes) would light top-level rows for every type. The analysis notes that a rollup onto the top-level row is not the form's end state either. Ui PR #28395 (+340/−10, 9 files) is the size reference.

Evidence: /mnt/project-files/objectstack-seat5/area-ux/ux-3/decision-35400-scope-fable.md (A-1 row and Evidence), report-35400.md (readings.A1).

Dedupe: issue search SchemaForm issuesByPath exact path nested, form row nested issue path not highlighted, refused save row red line nested → only #35400.

Activity

  1. added
    finding
    on Nov 19, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:build · Bug · Impeded (after a refused metadata save, Studio's form marks a field row only for an exact top-level path, so nested causes such as label.xx show under no row) · builders, often → p2 · the form half of the maintainer's #35400 scope ruling (7008570921).

  3. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 19, 2026
  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

    Related finding for this card (read from source, not reproduced) · 2026-11-19T14:52Z
    The Save button's refusal tooltip joins the held slices' labels, and the label of a root entry (path: '') is empty, so a refused view save can read , Columns … with a leading comma (ResourceEditPage.tsx:2236-2250, :2823-2825). PR #35520 removes the root head only when it is zod's bare Invalid input; a view whose root head carries its own sentence (the retirement prescription) keeps it, so the comma can remain in that case. Worth fixing in the same pass as the row display, since both live in the refusal display.

  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUjtFEFN5FLe377MBT

    Claim: PM loop round 1 · card thread of repo:objectstack#1 (a size-M card of area b1-U, in its own thread) · 2026-11-19T17:08Z · one os-dev subagent, one draft PR (Fixes #35499)
    Session: session_01L6bhgUjtFEFN5FLe377MBT
    Thread session: session_01L6bhgUjtFEFN5FLe377MBT
    Account: os-sales
    Branch: claude/project-thread-g62vj4 (the branch this card thread's harness assigns and the only one it may push, so the repo's claude/issue-35499-* spelling is not available here; the PR body says so for the Duplicate Fix Guard)
    Worktree: objectstack-issue-35499 (the thread's own clone on that branch)
    Domain: domain:ui
    Seat: repo:objectstack#1 (card thread)
    Area: b1-U
    File surface: ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx (issue placement, the nested-form hand-down, the inline register), ui/packages/app-shell/src/views/metadata-admin/ResourceEditPage.tsx (the 422 branch's drawnInline, the banner filter, the refusal summary behind the Save tooltip), ui/packages/app-shell/src/views/metadata-admin/issuePath.ts (a shared placement helper beside describeIssuePath, if one is needed), ui/packages/app-shell/src/views/metadata-admin/EmbeddedItemEditor.tsx only if its trimmed issues need the same placement, new card-named test files under ui/packages/app-shell/src/views/metadata-admin/*-35499.test.tsx, existing pins those lines move, and one changeset. No new language-pack key (the trail reuses describeIssuePath); a new key is a deviation to report. Stop and report before touching any other path (in particular packages/metadata-protocol/**, packages/spec/**, studio-design/**).
    Container & model: M, mode:subagent, model: default (opus) — dispatch-gates --tier: no path-derived mandate on this surface, PM judgment, effort: high (seat order for this card: M with a design judgement)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack: Studio's form placement of issues, ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx and ResourceEditPage.tsx (the private @object-ui/app-shell package, not published) | none on the form (the Save tooltip names the slice; the banner lists the cause only for types with a live validator) | every Studio author whose metadata save is refused for a nested cause; since #35520 merged (97f342037d) about 25 keys across 12 types show no red line under the field
    Thread-read: 7012656101
    Premise: holds — read at origin/main e35cf035: SchemaForm.tsx:1196-1202 keys issuesByPath by i.path verbatim and rows read issuesByPath[key] (:1327, :1733); a nested SchemaForm gets no issues (:2349-2356); ResourceEditPage.tsx drawnInline (:2257-2259) and the banner filter (:3414-3416) compare whole paths; the refusal summary joins held labels with ', ' and labelForIssuePath('') returns '' (:2248-2250, :1955-1957), so a root entry puts a leading comma in the Save tooltip (:2823-2825).
    Pre-claim lane: ui/packages/app-shell/src/views/metadata-admin/** — area b1-U's path root (ui/**, the Studio files this card names); no other seat's or area's claim on these files.
    Pre-claim deps: none named on the card; #35400 closed, its PR #35520 merged (97f3420). No open PR changes SchemaForm.tsx, ResourceEditPage.tsx, EmbeddedItemEditor.tsx, the metadata-admin i18n or the studio namespace (files of all 51 open PRs read 2026-11-19T17:08Z). #34931 (b1-U, in flight) claims studio-design/StudioDesignSurface.tsx and metadataError.ts only: disjoint. overlap-check runs on the branch before each push.
    Prior rulings read: check-prior-rulings.mjs --card 35499 over the three files → 32 hit lines; the ones this design must keep: objectstack#27865 (one message per mistake: an issue the form draws on a field is not repeated in the banner or the refusal line), 9073cf018 (the refusal is held against the slices its paths name; a path that does not localise gates nothing), ResourceEditPage.tsx:3055 (⛔ issues.length stays out of the Save gate), ResourceEditPage.tsx:2195 and EmbeddedItemEditor.tsx:200 (⛔ never re-read err.body). Maintainer scope ruling 7008570921 on #35400 (「每层都去掉,表单另立单」): the form side is this card. No ruling on where a nested issue is drawn. Thread: none.
    Serial constraints cleared: none (no in-flight claim or open PR on these files; the last change to them, 609b675, is merged)

    Fold-or-serial: no fold. No other queued p1/p2 card names these files (open area:build cards whose body names SchemaForm / ResourceEditPage / EmbeddedItemEditor / issuesByPath: this card only). The p3 rider is the card's own 14:52Z note (7012656101, the Save tooltip's leading comma), carried in this PR.

    Design

    Rule: an issue is drawn on the deepest row the form renders for a prefix of its path. One rule for every issue source (the live client pass, a 422, load-time diagnostics), because the live pass replaces issues 200 ms after the next edit: a rule for server issues only would light a row on the refusal and drop it on the next keystroke for the same cause.

    1. SchemaForm groups issues by their head segment. An issue whose head names a row of this form goes to that row: exact path as today; a longer path goes to the same row, its line led by the trail of the rest (the describeIssuePath shape, Label → not_a_locale: <message>), unless step 2 places it deeper.
    2. A row whose face is a nested SchemaForm (nested-form) hands the issues whose next segment names one of the nested schema's properties down to that form, prefix trimmed, and the nested form places them by the same rule. An issue whose next segment names no nested row stays on the host row. Collection faces (object-rows repeater, record maps, code / CEL widgets) do not descend in this PR: an issue below them is drawn on the host row with its trail (Columns → #1 → field: …).
    3. Hidden and canvas-owned keys (effectiveHiddenFields, CANVAS_OWNED_KEYS: object fields, flow nodes, …) mount no row, so their nested issues stay in the banner exactly as today.
    4. The inline register reports a top-level key while its row shows issues (mounted, not deferred), as today. drawnInline and the banner filter test the issue path's HEAD against it, the same rule the form draws by, so one mistake is one message (Setup → metadata edit page saves a bad name anyway and stacks three messages (server refusal, client summary, inline error) (#27521 row 16) #27865) and never two.
    5. The refusal summary skips empty labels; when every held slice is the root, the tooltip carries the root entry's own message instead of an empty or comma-led list. Same in the refusal error line.

    Out of scope, noted for a later card only if measured: descending into repeater item rows, and aria-invalid on a row with issues (the card notes neither is drawn today).

    Acceptance (dogfood-verification, visible behaviour): a refused save of a view whose label carries a non-locale key, and one with a nested visibleWhen / columns cause, each draws the cause under the right row, once (not again in the banner), and the Save tooltip has no leading comma. Pins: one per step above plus the #27865 one-message pin for a nested path.

    Writes: the PR only through the relay's pr_create; comments and labels only through the relay. Zero GitHub MCP writes.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 19, 2026
  7. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUjtFEFN5FLe377MBT

    Close-out 2026-11-19T19:21Z: PR #35623 MERGED as 36e02fd3f0; Fixes closed this card. After a refused metadata save, Studio's form now draws a nested cause (label.not_a_locale, areas.main.navigation) under the deepest row it renders for the path, led by the path trail, once: the banner and the refusal line leave out what a row draws (#27865). The Save button's refusal reason no longer opens with a comma when the root entry is held (the p3 rider from 7012656101).
    Reviews: L1-a ACCEPT 7018769397; landing 7018800142. No L2 face (Clause-②: no, private package).
    Follow-up: #35628 (types edited in a registered default inspector, view and object among them, still mark no row), taken by this card thread in series. pm:dispatched off.

  8. removed
    pm:dispatched
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:builddomain:uifindingpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions