Skip to content

A form cannot fill a field from a picked lookup record (declared lookup-pick autofill) #27945

Closed

Description

@objectstack-fleet

domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe

Filing gate: ③ triage-directed. The order on #27434 said: triage rows 1–7, TAKE what is ui-only, CARD the rest. The card thread measured each row on origin/main e41642dd (report 6515174308, out_of_scope_findings).
Reach: any record form with a lookup whose pick should fill a sibling field. HotCRM quote line item: product → unit_price.
Reader who acts: domain:spec first (the declaration), then domain:ui (the form's lookup widget honours it).
Duplicate search: search_issues "lookup pick autofill copy field from picked lookup record in form" → #26951 and #25860, both closed and about other lookup gaps.

Observed

Picking a lookup in a record form fills nothing else. A quote line's Sales Price arrives only after save, from a server hook. The only autofill today is the line-item grid column key autofill (packages/spec/src/data/field.zod.ts). It is on by default and copies same-named fields, but in the grid only.

Wanted

A declared lookup-pick autofill on the form or the field (target ← lookup.field). The spec half is the declaration and its docs. The ui half (a follow-up domain:ui card) is the form lookup widget (LookupField / the form renderer) writing the declared targets on pick. Keep the rule that an author's own value is never overwritten without saying so.

Dedupe words: lookup autofill form, copy fields from lookup, lookup pick fill, unit_price from product.

Related: #27434 (row 3).


Generated by Claude Code

Activity

  1. added
    enhancementNew feature or request
    pm:queueReady for the PM dispatch loop
    domain:specDomain lane — seat card indexed by label:pm:seat
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Oct 30, 2026
  2. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm

    Claim: PM loop round 4 · 2026-10-30T17:07Z
    Session: session_01L9qibwb6hBqszPTYJobitm
    Account: os-tesla
    Branch: claude/project-thread-jim54h (card thread; the platform assigns the thread's branch and it can push only that one, written as measured instead of claude/issue-27945-<slug>)
    Worktree: objectstack-issue-27945
    Domain: domain:spec
    Seat: domain:spec#1
    Card thread: session session_01L9qibyU9JHYh6atGVnEXr3; the dispatch order is in the seat's project, frame + card file.
    File surface: the lookup-pick autofill declaration (packages/spec/src/data/field.zod.ts, or the form view schema if that is the one home), its publish-time validator, tests, generated artefacts, changeset. ⛔ Not the ui half (form lookup widget, a domain:ui follow-up the seat files); ⛔ the line-item grid autofill default unchanged (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate; a widening of a published schema, so a contract review at CONTRACT_REVIEW_TIER is owed — in-seat or the contract-review lane), effort: high
    Clause-②: yes
    Metadata-protocol: added
    Responsibility: packages/spec declares no lookup-pick autofill for a record form, so a picked lookup fills nothing until a server hook runs on save | one declaration both the form and the grid can read | any record form with a lookup whose target carries values to copy (HotCRM quote lines, #27434 row 3)
    Thread-read: none
    Premise: holds — on main the only autofill is the line-item grid column key autofill (field.zod.ts:1119)
    Serial constraints cleared: none — open PR #28096 edits field.zod.ts far from the lookup config (currencyConfig); seat 2 left the card to seat 1 by mailbox 6528590353

  3. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-tesla · session_01L9qibyU9JHYh6atGVnEXr3
    os-dev-report

    {
     "issue": 27945,
     "status": "done",
     "branch": "claude/project-thread-jim54h",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/28244",
     "session": "session_01L9qibyU9JHYh6atGVnEXr3",
     "premise_still_valid": true,
     "summary": "FieldSchema.lookupAutofill: [{ target, source, overwrite? }] on a single-value lookup / master_detail; a pick copies the picked record's source field into this record's target. The describe states the overwrite rule (fill only an empty target or one an earlier pick filled; overwrite: true replaces). Placement is the field, the one home the record form and the line-item grid (hydrateColumns) both read; the grid column key autofill is unchanged and governs only the same-named copy. Three located doors: FieldSchema (custom at lookupAutofill), ObjectSchema refuseDishonestLookupAutofill (custom at fields.F.lookupAutofill.N.target), defineStack collectLookupAutofillErrors (STACK_CROSS_REFERENCE_INVALID, source + type rule). Liveness planned row, form omit ledger row, minor changeset. ui half not built (domain:ui follow-up).",
     "tests": "head 4c70e71e: packages/spec vitest src/data/field-lookup-autofill.test.ts 18/18; src/data + src/stack* + src/compose-stacks* + src/define-stack* + inline-grid-column-carriers + metadata-form-zod-reconciliation: Test Files 200/200, Tests 6051 passed 1 todo (lock VERDICT command-exit 0); spec typecheck exit 0; spec build exit 0; check:generated 14/14 current. No ablation: new key, every refusal pinned with its accept control.",
     "gates": "head 4c70e71e: dispatch-gates --commands derived 107 (13 paths), each run with </dev/null, 107 exit 0 (check:skill-examples exit 3 first, 0 after the client-react closure build); --ran: 107 run, 0 NOT-MEASURED. Local-only: check:skill-frame-freshness exit 0; check:dev-prereqs exit 1 (29 ui/ packages unbuilt in this container; diff touches no ui/). CI check-runs: in_progress at report time.",
     "line_budget": "n/a (no skills/** touched)",
     "deviations": [
      "Clause-② copied as `yes (widening)` per the dispatch order (the Claim line reads `yes`).",
      "Gate sweep first ran on 6ea314a6, then re-ran in full on the merged head 4c70e71e after origin/main moved 4 spec commits.",
      "Publish-time source check lives in defineStack (os validate / os build); a runtime metadata save judges field + target halves only — the lint save-door rule is outside packages/spec (acceptance note)."
     ],
     "files_changed": [
      ".changeset/27945-lookup-pick-autofill.md",
      "content/docs/references/data/field.mdx",
      "content/docs/references/data/object.mdx",
      "content/docs/references/system/migration.mdx",
      "docs/audits/2026-07-unknown-key-strictness-ledger.counts/data.md",
      "packages/spec/authorable-surface/data.json",
      "packages/spec/liveness/field.json",
      "packages/spec/liveness/state-counts/field.md",
      "packages/spec/src/data/field-lookup-autofill.test.ts",
      "packages/spec/src/data/field.zod.ts",
      "packages/spec/src/data/object.zod.ts",
      "packages/spec/src/stack.zod.ts",
      "packages/spec/src/system/metadata-form-zod-reconciliation.test.ts"
     ],
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "4 — all reads: issue_read #27945 get + get_comments x2, issue_read #27434 get; 0 writes",
     "api_writes": "2 — relay pr_create (objectstack#28244) + this post-stamped comment on #27945; git push x4 (not REST)",
     "open_questions": [],
     "out_of_scope_findings": [
      "class: none (noted, not filed) · the runtime metadata save door does not judge lookupAutofill[].source (only os validate / os build do); extending @objectstack/lint validate-object-field-refs would close it · carrier: seat (with the domain:ui follow-up) · dedupe words: lookupAutofill source save door, lookup autofill lint"
     ]
    }
  4. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm

    ACCEPT → PR #28244 comment 6532469461 · contract review PASS 6532419078 (lane) · ready + in the merge queue 2026-10-30T20:13Z. pm:dispatched comes off on merge.

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

Metadata

Metadata

Assignees

Labels

domain:specDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions