Skip to content

The record drawer's per-field save asks for the fields a change makes required, like the record page does #35995

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Split from #35956 by the seat (PR #35994, PR 1 of that card, leaves it out on purpose). Part of epic #34571.

What a user sees

In the record drawer opened from a list, a user changes a field (for example status to "completed") and saves it. If that change makes another field required (requiredWhen) and the field is empty, the save is refused with the server's message. After #35994 the same change on the list cell, on the record page's inline Save and on the kanban opens a small fill-in dialog instead. The drawer is the one place left that refuses.

Why

The drawer saves field by field through the onFieldSave callback mode of InlineEditSaveBar (@object-ui/plugin-detail). #35994 wires the shared prompt (requiredWhenPrompt + RequiredFieldsDialog, now in @object-ui/fields) into the atomic mode only, and its tests pin that the callback mode never asks.

To do

  1. Before the drawer's per-field save writes, collect the fields the change makes required against the object schema and the record, with the same fillable test the record page uses.
  2. When fields come back, write nothing and open the shared dialog. Its Save sends the changed field plus the filled values in one guarded update (If-Match the version the edit began on). A 409 re-reads and keeps the dialog open with the reason. Cancel closes the dialog and keeps the field's edit.
  3. Turn the feat(list,detail): a change that makes other fields required asks for them in place #35994 pin "the callback mode never asks" into a pin that it asks.

Not doing

Acceptance

  • In the drawer, a change that makes an empty field required opens the dialog; Save writes once; Cancel writes nothing.
  • A change that makes nothing required saves at once, as today.
  • Light and dark, desktop and 375 px wide.

Blocked-by: #35994.
Reader: area:ux (ui/packages/plugin-detail, ui/packages/fields).

Activity

  1. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (plugin-detail) · pm:queue; rationale: area:ux · Bug · the record drawer's per-field save still refuses a change that makes another field required (requiredWhen), while the list cell, record page and kanban now open the fill-in dialog (#35994); split from #35956 → p2 (UX rule) · size S.

  2. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 21, 2026
  3. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL

    Claim: PM loop round 1
    Session: session_01FEkQ5oLLK7uoxp33riiBJL
    Account: os-project-manager
    Branch: claude/issue-35995-drawer-required-prompt
    Worktree: objectstack-issue-35995
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-G
    File surface: ui/packages/plugin-detail/src/InlineEditSaveBar.tsx (the onFieldSave callback mode), ui/packages/plugin-detail/src/RecordDetailDrawer.tsx / RecordDetailPanel.tsx only if the guarded write needs them, ui/packages/fields read-only reuse of requiredWhenPrompt / RequiredFieldsDialog, the #35994 pin in __tests__/InlineEditSaveBar.requiredPrompt-35956.test.tsx flipped, a new card-named test + one changeset (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: opus (dispatch-gates --tier at a5a5312f: no path-derived mandate; default judgement tier), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: InlineEditSaveBar callback mode in @object-ui/plugin-detail (objectstack) refuses with the server message instead of asking | the shared prompt from #35994 already exists and covers the atomic mode | every user saving a field in the record drawer opened from a list on an object with requiredWhen
    Thread-read: 7058170951
    Premise: holds
    Serial constraints cleared: none — no open PR touches this file surface (open-PR file scan at origin/main a5a5312, 02:58Z). Seat 1 still edits RecordDetailView.tsx (#36147, not pushed yet; and #36076 through PR #36208) and RelatedList.tsx (#35901, #36005); this card stays out of both, and the dev runs overlap-check.mjs before each push.

    Pre-claim lane: ui/packages/plugin-detail/** (domain:ui), not governed.
    Pre-claim deps: Blocked-by: #35994 — PR #35994 MERGED 2026-11-21T08:18:53Z (pr-state).
    Prior rulings read: check-prior-rulings.mjs --card 35995 at a5a5312: 285 keyword hits, 0 ruling comments on the card; ADR hits (ADR-0014/0050/0077/0080/0089/0148) are general form/record decisions, none on the drawer prompt. Governing text: #35956 / PR #35994 (the shared prompt, its fillable rule). No conflict.
    Fold-or-serial: no fold. The other first-wave cards of area a4-G (#35997 #35995 #36078 #35483 #36036) fix different defects in disjoint files; #35995 and #36036 both use the shared requiredWhen prompt but one wires it into the drawer's per-field save and the other recomputes the stage menu's list after a 409, so gate ① (same defect shape, same fix) fails. They run in parallel on separate branches.

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 22, 2026
  5. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL
    os-dev-report

    {
     "issue": 35995,
     "status": "done",
     "branch": "claude/issue-35995-drawer-required-prompt",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/36298",
     "session": "session_01FEkQ5oLLK7uoxp33riiBJL (parent's; subagent run)",
     "premise_still_valid": true,
     "summary": "InlineEditSaveBar's callback mode (the record overlay RecordDetailPanel / RecordDetailDrawer) now runs the same collectRequiredWhenPromptFields + fillable check as the atomic mode before its first onFieldSave; when fields come back it writes nothing and opens the shared RequiredFieldsDialog, whose Save sends the changed field plus the typed values in ONE dataSource update with If-Match at the version the edit session began on, Cancel keeps the draft, and a 409 reuses the atomic mode's conflict dialog over the fill-in dialog (buildConflict / conflictWriteRef). RecordDetailPanel hands the bar its existing dataSource/objectName/recordId/data props and wraps the bar alone in a RecordContextProvider carrying objectSchema: no new prop or callback shape on any published component. Zone 2.1 measured at a5a5312f: the callback mode has exactly one caller, RecordDetailPanel (RecordDetailDrawer renders it), the overlay of ObjectKanban/ObjectCalendar/ObjectGantt/ObjectTree when the host routes no row click; inside the console a list row click opens RecordDetailView in the drawer stack (objectViewRecordOverlay.tsx), which is the atomic mode and already asked since #35994 - so the premise holds for the overlay, while the console's list drawer was not the refusing path. Without a data source the overlay saves field by field as before (pinned CONTROL); the plain callback save's 409 stays a refusal (gated !onFieldSave).",
     "tests": "HEAD c03f926b. (1) `cd ui && pnpm exec vitest run --maxWorkers=2 packages/plugin-detail/src/__tests__/InlineEditSaveBar.requiredPrompt-35956.test.tsx` under os-verify-lock: VERDICT command-exit 0, Test Files 1 passed (1), Tests 15 passed (15) - the #35994 pin flipped to 'asks too, and writes nothing yet' plus a new top-level describe (Save writes once with both fields + ifMatch v1 and never calls onFieldSave; the guard is the edit-begin version after a mid-edit re-read to v2; Cancel writes nothing and keeps the draft; CONTROL nothing-required goes through onFieldSave at once; 409 keeps the fill-in dialog under the conflict dialog and Overwrite resends both at v2; CONTROL no dataSource never asks; one test through the real RecordDetailPanel + DetailView). (2) the 25 plugin-detail test files naming InlineEditSaveBar/RecordDetailPanel/RecordDetailDrawer: VERDICT command-exit 0, Test Files 25 passed (25), Tests 163 passed | 10 skipped. (3) `pnpm exec turbo run build --filter='@object-ui/plugin-detail^...' && pnpm --filter @object-ui/plugin-detail run type-check` (tsc --noEmit + tsconfig.test.json): VERDICT command-exit 0, 52/52 cached. (4) Ablation, one, via scripts/ablation-replace.mjs (subject imported by relative src path, no dist leg): anchor `if (canAtomic && data && typeof data === 'object')` -> `if (!onFieldSave && canAtomic && ...)`, anchor x1->x0, blob ac0eb2b6 -> f871599d; run: 6 failed | 9 passed (the flipped pin, Save, version guard, Cancel, 409, panel test red; both CONTROLs green); restored blob == HEAD ac0eb2b6, git diff HEAD empty. Full plugin-detail package run (404 files) NOT run locally - narrowed to the 25 files above; CI Test UI (16 shards) ran it: success.",
     "gates": "Local: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 38 families for the 4-path diff; all 38 ran at HEAD c03f926b, each exit captured before any pipe, all exit 0 (incl. pnpm --dir ui exec vitest run scripts/: Test Files 172 passed | 2 skipped, Tests 5122 passed). `--ran` reconciliation: 'Run reconciliation - 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN' / '✓ dispatch-gates --ran: 38 derived famil(ies) accounted for'. First pass had check:dispatcher-error-vocabulary and check:query-options-erasure exit 1 because the gitignored packages/spec/src/migrations/registry.ts was absent after `pnpm install --ignore-scripts`; generated it with `pnpm --filter @objectstack/spec gen:migration-registry`, both then exit 0 (environment, not diff). overlap-check.mjs before pushes: VERDICT clean exit 0 (0 PR heads). PR #36298 check-runs at c03f926b (55): Lint & Repo Gates success, TypeScript Type Check success, Test Core success, Governed Surface Queue Guard success, Lint UI success, Type Check UI success, Test UI success (shards success), Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success, Check Changeset success, PR-body guards success; Build Core skipped (no core paths); no failure or pending run.",
     "dogfood_battery": "n/a - no `!` in the PR title and Clause-②: no without a (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "2 - relay pr_create (repository_dispatch POST /repos/objectstack-ai/objectstack/dispatches -> fleet-write run 44987550571 -> PR #36298, read-back identical 5986 bytes); post-stamped.mjs os-dev-report comment on #35995",
     "files_changed": [
      ".changeset/35995-drawer-required-prompt.md",
      "ui/packages/plugin-detail/src/InlineEditSaveBar.tsx",
      "ui/packages/plugin-detail/src/RecordDetailPanel.tsx",
      "ui/packages/plugin-detail/src/__tests__/InlineEditSaveBar.requiredPrompt-35956.test.tsx"
     ],
     "line_budget": "none set by the order (size S)",
     "net_added_lines": "+252 / -53 = +199 (tests +143 net, source +44 net, changeset +12)",
     "deviations": [
      "Tests went into the shared harness file InlineEditSaveBar.requiredPrompt-35956.test.tsx as a new top-level describe, not a new card-named file as Zone 3 suggested: AGENTS.md (ruling record 6583487846) puts a new pin for a component with a shared harness file into that file; AGENTS.md outranks the dispatch's suggested route.",
      "Commit trailers are the model-free pair (Co-Authored-By: Claude / Claude-Session) per the order and AGENTS.md; the harness reminder asked for a model-named Co-Authored-By, which AGENTS.md outranks.",
      "Local package test narrowed from the full plugin-detail run (404 files) to the 25 files naming the changed components, to stay under the container's foreground limit on a shared lock; declared here, CI Test UI ran the full package green.",
      "Root deps installed with --ignore-scripts as the dispatch allowed; the gitignored spec migration registry had to be generated by hand before two gates could read the tree."
     ],
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none - noted in the PR's Acceptance notes, not filed: the overlay's single combined write goes through the data source, so a host that patches its own list only inside onFieldSave does not see that patch for this one write (kanban/calendar re-read on the data source's mutation event; the panel's record prop is the host's navigation.selectedRecord snapshot either way, as after a per-field save today) - an observation, no reach measured.",
      "carrier: none - noted, not filed: handing the bar `data` turns on two existing behaviours in the overlay (the changed-elsewhere notice, and a refusal naming a record field reading as a field hint labelled with the machine name, since RecordDetailPanel passes no fieldLabelFor) - observation.",
      "Visual check (375 px / dark): not run; the dialog is the shared RequiredFieldsDialog, unchanged here and checked on #35994; behaviour pinned in tests only."
     ]
    }
  6. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL

    Delivered: PR #36298 merged as 0d0ed816dc (Fixes #35995). The record overlay of kanban, calendar, gantt and tree now shows the inline-edit save bar's per-field hints and the 409 conflict dialog the same way the record page does. L1-d ACCEPT 7074798693. Out-of-scope item filed as #36310 (overlay shows machine field names). Closing stroke: pm:dispatched removed.

  7. removed
    pm:dispatched
    on Nov 22, 2026
  8. added a commit that references this issue on Nov 22, 2026
    0d0ed81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:uxdomain:uipriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions