Skip to content

Lookup pick fills the declared fields in the record form and the line-item grid (lookupAutofill, ui half of #27945) #28245

Closed

Description

@objectstack-fleet

domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm

Filing gate: ③ triage-directed. This is the ui half that #27945 names; #27945 came from #27434 row 3. The spec half is PR #28244, which declares FieldSchema.lookupAutofill. Filed by domain:spec seat 1. ⛔ Not a claim. Triage sets the grade and routes the card to the ui/ lane.

Reach: any record form with a lookup whose target carries values to copy, such as a quote line's Sales Price from the product (HotCRM, #27434 row 3). Today a pick fills nothing until a server hook runs on save. Once #28244 merges, an author can declare lookupAutofill: [{ target, source, overwrite? }] on a single-value lookup or master_detail field, but no renderer performs the fill yet.

Wanted (the rule as #28244 declares it, read from its describe)

  • On a pick in the record form (LookupField or the form renderer) and in the line-item grid (GridField / hydrateColumns), write each declared target from the picked record's source.
  • Overwrite rule: fill only a target that is empty or that an earlier pick filled. overwrite: true replaces the value.
  • The grid column key autofill (same-named copy, on by default) is unchanged. A declared pair takes its target out of the same-named copy.
  • Tests:
    • a pick fills an empty target;
    • an author's own value is kept;
    • overwrite: true replaces it;
    • the grid with a declared pair;
    • control: a lookup without the key fills nothing new.

This lands after PR #28244 merges. The skills and docs text is #28246's job, and it lands with this card.

Links: #27945, PR #28244, #27434 (row 3).

Blocked-by: #28244

Activity

  1. added
    area:records
    domain:ui
    enhancement
    pm:blocked
    on Oct 30, 2026
  2. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: 能用的表单 | none | P②

    Triage: p3 · domain:ui · area:records · pm:blocked on #28244 · 2026-10-30T19:04Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. removed
    pm:blocked
    on Oct 30, 2026
  4. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: unblocked · p3 · 2026-10-30T22:55Z

    ⛔ Not a claim.


    Generated by Claude Code

  5. added
    pm:dispatched
    on Oct 31, 2026
  6. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-tesla · session_01L9qibxgfM8p8t3fo6y9eFK

    Claim: PM loop round 1 · 2026-10-31T03:22Z
    Session: session_01L9qibxgfM8p8t3fo6y9eFK (seat; card thread session_01L9qibzEPqxBYQbxn2d72r5)
    Account: os-tesla
    Branch: claude/project-thread-t2cn2e (card thread; the platform assigns the thread's branch)
    Worktree: objectstack-28245
    Domain: domain:ui
    Seat: domain:ui#2
    File surface: ui/packages/fields/** (lookup), ui/packages/plugin-form/** (form renderer), the grid field / hydrateColumns file, a lookupAutofill liveness row only if one exists, tests, root changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: TIER_DEFAULT (default judgment tier), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6535248023
    Premise: holds
    Serial constraints cleared: seat 1's #28252 (save-toast notice) works the form save path, not the lookup pick; PR #28116 does not touch ui/packages/fields or plugin-form

  7. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-tesla · session_01L9qibxgfM8p8t3fo6y9eFK

    Claim amendment (same claim 6538361669, same branch claude/project-thread-t2cn2e) · 2026-10-31T03:25Z

    • File surface adds, as measured by the dev on origin/main 73b72709: ui/packages/components/src/renderers/form/form.tsx (one host prop: a sibling-field writer for lookup-family widgets, passed through stripRegisteredFieldProps like dependentValues; not the submit/save path) and ui/packages/types/src/field-types.ts (lookupAutofill on LookupFieldMetadata, by reference to the spec field). No live claim of seats 1, 3, 4 or 5 names either file.
    • Clause-②: yes (widening) expected — a new prop and type member on published @object-ui/* surfaces; the dev measures on the built declarations, and the PR owes a contract review (needs:contract-review).
  8. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-tesla · session_01L9qibzEPqxBYQbxn2d72r5
    os-dev-report

    {
      "issue": 28245,
      "status": "done",
      "branch": "claude/project-thread-t2cn2e",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/28322",
      "session": "session_01L9qibzEPqxBYQbxn2d72r5",
      "premise_still_valid": true,
      "summary": "A lookup pick fills its declared FieldSchema.lookupAutofill targets under the spec's overwrite rule: one helper (ui/packages/fields/src/widgets/lookupAutofill.ts declaredLookupAutofillPatch); in the record form LookupField fills on every single-value pick path through a new onAutofill widget prop that the form renderer (components form.tsx) wires to form.setValue; in the line-item grid GridField takes the child's pairs through a new lookupAutofill host prop from MasterDetailForm and LineItemsPanel, and a declared target leaves the same-named autofill copy. The browse-all dialog in a grid now hands the host the record once. Liveness row lookupAutofill planned -> live. Surface extension (form.tsx, types field-types.ts) agreed with the seat before editing.",
      "tests": "head 12601c27d: 2 new files, Tests 17 passed (17). Touched suites at 0d887457 (later commits ledger/changeset only): pnpm --dir ui exec vitest run packages/fields/ packages/plugin-form/ packages/components/src/renderers/form/ packages/types/ -> Test Files 973 passed | 1 skipped, Tests 17791 passed | 25 skipped, VERDICT command-exit 0. Ablation at 0d887457 via scripts/ablation-replace.mjs (src aliased, no dist leg): `patch[target] = picked[source]` -> no-op: 10 failed | 7 passed of 17 (fill cases red, keep/control green); restored, blob == HEAD, git diff HEAD empty. Reverse type check: grid prop pair without source -> TS2741 against rebuilt fields d.ts.",
      "gates": "dispatch-gates --commands at 12601c27d, every line </dev/null, codes on disk (/mnt/project-files/ui-seat-2/r2026-10-31/out/28245-gates-ran-12601c27d.list); --ran: 70 derived accounted, 69 run exit 0, 1 NOT-MEASURED (check:dual-build-cjs-loads exit 3, needs full pnpm build). check:liveness red once on stale state-counts shard -> gen:liveness-counts, green; check-plugin-teardown-shape --self-test exit 3 on shallow clone -> pinned fixture fetched, 48 cases pass. ui type-check of types/fields/components/plugin-form green on full-dts closure. check:new-line-citations 0 new. CI check-runs: in_progress at report time.",
      "line_budget": "14 files, +678 / -25 before the counts regen (+1/-1); no governed surface",
      "deviations": [
        "file surface extended (seat-agreed): ui/packages/components/src/renderers/form/form.tsx (writer prop + stripRegisteredFieldProps pass-through only), ui/packages/types/src/field-types.ts (by-reference lookupAutofill on LookupFieldMetadata)",
        "Clause-② yes (widening) per seat and measured on built declarations, against the order's expected no",
        "check:dual-build-cjs-loads NOT MEASURED locally (exit 3, full build prerequisite)"
      ],
      "files_changed": [
        ".changeset/28245-lookup-autofill-fill.md",
        "packages/spec/liveness/field.json",
        "packages/spec/liveness/state-counts/field.md",
        "ui/packages/components/src/renderers/form/form.tsx",
        "ui/packages/fields/src/index.tsx",
        "ui/packages/fields/src/widgets/GridField.lookupAutofill-28245.test.tsx",
        "ui/packages/fields/src/widgets/GridField.tsx",
        "ui/packages/fields/src/widgets/LookupField.tsx",
        "ui/packages/fields/src/widgets/lookupAutofill.ts",
        "ui/packages/fields/src/widgets/toHostProps.ts",
        "ui/packages/fields/src/widgets/types.ts",
        "ui/packages/plugin-form/src/LineItemsPanel.tsx",
        "ui/packages/plugin-form/src/MasterDetailForm.tsx",
        "ui/packages/plugin-form/src/ObjectForm.lookupAutofill-28245.test.tsx",
        "ui/packages/types/src/field-types.ts"
      ],
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "7 reads (issue_read x4, list_pull_requests x1, ToolSearch loads excluded); 0 writes",
      "api_writes": "2 relay writes: pr_create objectstack#28322 (fleet-write run 41169244955), this os-dev-report comment (post-stamped)",
      "open_questions": [],
      "out_of_scope_findings": [
        "carrier: #28246 · its PR must merge AFTER #28322, not with it (skills/** is Tier H); its text should state the bound that a fully authored master-detail entry loads no child schema and fills only the same-named copy",
        "carrier: none · noted, not filed: MasterDetailForm skips the child-schema fetch for a fully authored entry, so declared pairs never reach that grid (acceptance notes)"
      ]
    }
  9. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-tesla · session_01L9qibxgfM8p8t3fo6y9eFK

    Claim amendment (same claim 6538361669, same branch claude/project-thread-t2cn2e) · 2026-10-31T04:38Z · the dev's measure on the built declarations (os-dev-report 6539093606, PR #28322):

    Clause-②: yes (widening)
    Metadata-protocol: none

    The PR adds onAutofill to the published @object-ui/components form widget props, a lookupAutofill host prop on GridField, and lookupAutofill on @object-ui/types LookupFieldMetadata. Contract review owed before ACCEPT (needs:contract-review on #28322). #28246 (skills text) merges after #28322.

  10. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#2 · os-tesla · session_01L9qibxgfM8p8t3fo6y9eFK

    Landed · 2026-10-31T15:25Z

    reading value
    PR #28322 merged through the merge queue at 2026-10-31T15:25Z, head 8f9ef9ee (PASS 6539660422 + delta PASS 6545292611, ACCEPT 6540305963 + delta ACCEPT 6545070006), merge commit ea1751bea1
    landing go the maintainer, 2026-10-31T14:22Z in the seat thread: 「使用 pm-dispatch 技能审核和落地pr」
    origin/main contains ea1751bea1 (git merge-base --is-ancestor)

    Delivered: picking a lookup / master-detail record fills the fields its lookupAutofill declares, in the form and in the line-item grid (Clause-②: yes (widening)). pm:dispatched removed. #28246 (skills text, Tier H) can now merge after this.

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

Metadata

Metadata

Assignees

Labels

area:recordsdomain:uienhancementpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions