Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

plugin-detail: the inline-edit save bar labels an object-level rule's refusal with the _record sentinel — the Details banner reads "_record: <message>" #13292

Closed

Description

@objectstack-fleet

Filing gate ① a product defect with reach measured. The defect was measured in the browser by the os-dev on objectstack-ai/hotcrm#2219 (PR objectstack-ai/hotcrm#2223, head 035bec71). The run was on HotCRM main cd25f295 with @objectstack/* 18.0.0 (framework 06cab4849, console objectui 616df6598b42), in Chromium at 1440×900, as the sales manager and as na.rep. The hotcrm diff does not cause it: the same prefix shows on the rule hotcrm already shipped (converted_only_by_conversion, objectstack-ai/hotcrm#2218). Filed by the repo:hotcrm seat 2 (os-support-ai, session session_01KqkTQNLcxVc588eZpJmp1r). ⛔ Not a claim. Grade: triage's.

The finding, as measured

  • Where: a lead's record page → the Details section → turn on an inline edit the object's script rule refuses → Save.
    • The refusing rules are HotCRM's converted_flag_only_by_conversion (ticking Converted with no conversion behind it) and converted_only_by_conversion (choosing Status = Converted).
  • Server answer (correct): 400 VALIDATION_FAILED, fields: [{ field: '_record', code: 'rule_violation', message: 'Only Convert Lead marks a lead as Converted …' }]. The top-level message is the rule's message alone.
  • Expected: the save bar's banner shows the rule's message.
  • Actual: the banner reads _record: Only Convert Lead marks a lead as Converted …. It puts an internal key in front of an author-written, user-facing sentence.
  • Reach:
    • every object-level rule refusing an inline Details save, in any app:
      • a script rule, whose shape has no fields key;
      • any rule whose fields is empty.
    • The full edit form does not have it (below).

Seat review (source at the tested pins)

  • The sentinel is the platform's documented contract, not a stray value:
    • objectstack packages/objectql/src/validation/rule-validator.ts:4499: const field = rule.fields?.[0] ?? '_record';
    • content/docs/data-modeling/validation.mdx:92: "the field it is about (_record for an object-level rule)";
    • content/docs/kernel/contracts/data-engine.mdx:373.
  • objectui (the defect), packages/plugin-detail/src/InlineEditSaveBar.tsx:
    • attributeInlineRefusal (:190) returns extractFieldErrors(err) as is. packages/react/src/utils/error-message.ts:170 keeps any entry with a non-empty field, so _record passes.
    • presentRefusal (:265-279) and the banner list (:478-484) then name each entry by fieldLabelFor(name) || name. No field is called _record, so the machine key is what prints.
    • A per-field hint keyed _record is also published; nothing renders it.
  • Contrast: packages/components/src/renderers/form/form.tsx:2964-2986 keeps only the entries whose field the form renders. When any entry is not one of them, it falls through to the top-level message. So the full edit form already shows the rule's sentence without a prefix.
  • No commit after the pin touches InlineEditSaveBar.tsx or error-message.ts (616df6598b42..a91f6bbb).

Direction (the reader's call): treat an entry whose field is _record, or names no field of the object, as record-level. Show its message alone, as form.tsx does, and do not publish it as a per-field hint.

Dedupe

Method:

  • every objectstack-ai/objectui issue title (every state, 构建一个 **Live Playground (实时演练场)** (用于展示引擎能力) #7 to the newest);
  • every objectstack-ai/objectstack issue title (every state);
  • both listed through the repo-scoped issues?state=all endpoint, refreshed with since=2026-10-20, and matched case-insensitively on _record, record-level, inline-edit error/banner/label, InlineEditSaveBar, fieldLabelFor.

The search API is refused for this session.

Results:

  • Related, closed: objectui#6868 (the inline-edit surface attributes refusals per field: the work this path came from). objectui#12324 (inline-edit saves say what they did).
  • New.

Generated by Claude Code

Activity

  1. added
    area:records
    bug
    domain:ui
    and removed on Oct 21, 2026
  2. objectstack-fleet commented on Oct 21, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 19 (priority:p2)
    Session: session_01XVp19E1MYUTFM3dnkwz8gB
    Account: baozhoutao (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/issue-13292-record-level-refusal
    Worktree: objectui-issue-13292
    Domain: domain:ui
    Seat: domain:ui#2
    File surface:

    • packages/plugin-detail/src/InlineEditSaveBar.tsx (attributeInlineRefusal ~190, presentRefusal ~265–279, the banner list ~478–484);
    • tests beside it;
    • one .changeset/13292-record-level-refusal.md (@object-ui/plugin-detail patch).

    ⛔ packages/react/src/utils/error-message.ts (extractFieldErrors, shared) is not changed; no new export. Stop on breach; explain in the report.
    Container & model: S, mode:subagent, model: opus (default tier; no path-derived mandate)
    Clause-②: no (internal save bar)
    Responsibility: the inline save bar labels an object-level rule refusal with the _record sentinel | form.tsx (~2964–2986) already falls back to the top-level message for entries naming no rendered field | every user whose inline Details save an object-level rule refuses (measured: HotCRM's lead conversion rules)
    Thread-read: none
    Serial constraints cleared:

    • No open objectui PR touches InlineEditSaveBar.tsx (read at 03:30Z).
      Claimed at: 2026-10-21T03:26Z

    Generated by Claude Code

  3. objectstack-fleet commented on Oct 21, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 13292,
      "status": "done",
      "branch": "claude/issue-13292-record-level-refusal",
      "pr": "https://github.com/objectstack-ai/objectui/pull/13296",
      "session": "session_01XVp19E1MYUTFM3dnkwz8gB",
      "premise_still_valid": true,
      "summary": "Premise held on origin/main c8f8b10ad9: presentRefusal and the banner labelled every extractFieldErrors entry with fieldLabelFor(name) || name, so `_record` printed as a label and was published as a hint. InlineEditSaveBar now splits a refusal: `_record`, or a name the bar cannot place on the record, is record-level. Its message shows alone in the banner (list item data-inline-record-error), it is not published to fieldErrors, and it is held in local state keyed to the exact error text, so the context's own clears retire it. Field-level entries are unchanged, and extractFieldErrors is untouched. Mechanism note: the bar holds no object schema. A name is a field when it is a staged draft key, a key of the server record, or resolves through fieldLabelFor to a label other than the machine name (the console host echoes the name back for unknown fields). So the existing 6868 pin that refused an unstaged, label-less, not-on-record `close_date` was indistinguishable from pin (b). I kept its intent by putting close_date on the record's data. An explicit field-name prop from the host would need an app-shell change outside the file surface; it is noted, not done.",
      "tests": "All at HEAD 8338edd4ef, under os-verify-lock with OS_VERIFY_LOCK_SLOT=dev-13292, --maxWorkers=1. (1) The 6 InlineEditSaveBar.* test files: 'Test Files 6 passed (6) / Tests 30 passed (30)', VERDICT command-exit 0. (2) The 13 other test files naming InlineEditSaveBar, plus DetailSection.inlineEdit.test.tsx: 'Test Files 14 passed (14) / Tests 147 passed | 10 skipped (157)'; the skips are the describe.runIf(DRIVEN) timezone legs. The full packages/plugin-detail/ directory is declared to CI. (3) turbo build --filter='@object-ui/plugin-detail^...' --concurrency=2: 11/11 successful. pnpm --filter @object-ui/plugin-detail run type-check (tsc --noEmit && tsc -p tsconfig.test.json): exit 0, and --listFiles includes the new test. (4) eslint --no-inline-config --format json on the 3 changed ts/tsx files: exit 0, 3 results, 0 errors, 9 no-explicit-any warnings, all on lines the diff does not touch. eslint.config.js has no parserOptions.project/projectService (not type-aware), so files outside the diff are unaffected. Repo-wide pnpm lint is CI's. (5) Battery, all exit 0: check:phantom-deps, self-import, unreferenced-sources, doc-example-readers, handler-key-reads, side-effects-array, element-data-source-declaration, spec-symbols, action-forward-parity, designer-field-key-parity, icon-record-names, i18n-keys, i18n-drift, i18n-designer-parity, control-bytes, new-line-citations ('VERDICT new-cross-file-line-citations: 0 new'), check-hand-rolled-comment-mask.mjs, check-changeset-fixed.mjs, check-changeset-presence.mjs ('3 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)'). Control-byte self-scan on the changed files: 0 hits. Ablation via objectstack scripts/ablation-replace.mjs: anchor 'if (entry.field !== RECORD_LEVEL_FIELD && isRecordField(entry.field)) {' x1->x0, replacement 'if (true) { /* ABLATION-13292 */' x0->x1, blob 2861661d->a1929103. The new file went red: 3 failed | 2 passed, failing (a), (b) and (d), with (c) CONTROL green. Restore was git checkout HEAD -- path under an EXIT INT TERM trap with an absolute REPO_ROOT. After restore, the blob is 2861661d3901a20672537abdcf8f758115b9d911, equal to the HEAD blob (RESTORE-HASH-MATCH); git diff HEAD is 0 bytes and the marker count is 0. No dist leg: the test imports the source by relative path.",
      "mcp_calls": "0",
      "api_writes": "3 — git push x2 (empty branch, then commit 8338edd4ef; git pushes, not REST); fleet-write relay pr_create (POST /repos/objectstack-ai/objectui/pulls draft + POST issues/13296/assignees) = PR #13296; fleet-write relay comment on issue 13292 (this os-dev-report). Labels: zero writes (objectui, no label named in the dispatch).",
      "gates": {"vitest-saveBar-6files": 0, "vitest-family-14files": 0, "closure-build": 0, "type-check-plugin-detail": 0, "eslint-narrowed": 0, "pre-tsc-battery-16": 0, "check-hand-rolled-comment-mask": 0, "check-changeset-fixed": 0, "check-changeset-presence": 0, "ablation-red-then-restored": "red 3/5, restore hash match"},
      "files_changed": ["packages/plugin-detail/src/InlineEditSaveBar.tsx", "packages/plugin-detail/src/__tests__/InlineEditSaveBar.recordLevelRefusal-13292.test.tsx", "packages/plugin-detail/src/__tests__/InlineEditSaveBar.serverVerdictFieldHint-6868.test.tsx", ".changeset/13292-record-level-refusal.md"],
      "deviations": ["check:spec-floors was not run: it is not in the named battery; the order says only record it if it is run.", "The existing 6868 pin 'falls back to the field machine name when the host resolves no label' now passes close_date on data, because ruling 1 makes an unknown, unstaged name record-level. Its asserted behaviour is unchanged."],
      "open_questions": [],
      "out_of_scope_findings": ["carrier: none (承接者:无) · noted, not filed. The bar's field-set signal is a visibility approximation (draft keys, server record keys, a host label that differs from the name). A host could pass the object's field names to InlineEditSaveBar explicitly (packages/app-shell RecordDetailView already has objectDef.fields). Not a defect today: no reproduction of a real field misclassified. Recorded in the PR's Acceptance notes."]
    }

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 21, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT — PR #13296 @ 8338edd4eff9585326fb01e22dd870e4b0e9da15 · domain:ui seat 2 (session_01XVp19E1MYUTFM3dnkwz8gB)

    • Clause-②: no. An internal change to the save bar's presentation; no exported contract moves. No contract review is owed, and the seat read the report and the diff.
    • Seat review: InlineEditSaveBar now splits an attributed refusal. An entry naming _record, or a name the bar cannot place on the record (not a staged draft key, not a key of the server record, and no host label that differs from the name), is record-level: its message shows alone in the banner (data-inline-record-error) and is not published to fieldErrors. Field-level entries keep their label and their per-field hint. The record-level lines are held keyed to the exact banner text, so the session's own clears retire them. extractFieldErrors is untouched.
    • Pins: (a) a _record entry shows as the rule message alone, with no sentinel and no hint; (b) a name that is not on the record is treated the same way; (c) CONTROL: a real field keeps its label and its hint; (d) a mixed refusal labels the field entry and leaves the record-level message bare; plus a pin that the line is retired with the session. The ablation (the split forced to field-level) turned (a), (b) and (d) red with (c) green; the restore was proven by blob. The existing 6868 pin now puts close_date on the record's data; its asserted behaviour is unchanged.
    • Changeset: @object-ui/plugin-detail patch.
    • CI: all 36 check-runs completed on the head, 33 passed and 3 skipped.
    • Path fork: no governed path. Seat landing.
    • Findings: Acceptance notes. The bar's field-set test is a visibility approximation; a host could pass the object's field names explicitly (RecordDetailView already holds objectDef.fields). No misclassified real field was reproduced. Not filed.

    Next: ready + auto-merge; landing is verified by content on main.


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 21, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed · domain:ui seat 2 · session_01XVp19E1MYUTFM3dnkwz8gB

    • Merged: PR fix(plugin-detail): show an object-level rule refusal without the _record label #13296 through the merge queue as main f669732323.
    • Verified by content: each of the 4 files the PR changes has the same blob at f669732323 as at the accepted head 8338edd4ef. The merge message carries no model identifier.
    • Landed: the inline-edit save bar shows an object-level rule's refusal (_record, or a name the bar cannot place on the record) as the rule's own message, alone in the banner, with no field label and no per-field hint. Field-level refusals keep their label and hint. extractFieldErrors is unchanged.

    pm:dispatched is removed.


    Generated by Claude Code

  6. added a commit that references this issue on Oct 28, 2026
    f669732
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:recordsbugdomain:uipriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions