Skip to content

内嵌行项目表格里的查找下拉和单元格一样窄,选项名被截断 #34601

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #34571(控制台核心业务操作体验专题,维护者直派,「都是p1」)。⛔ 不是认领。

现状(读码,objectstack origin/main ed45eb9;界面实测在 staging os-4e4qa4 与 hotcrm 本地实例)

  • ui/packages/fields/src/widgets/LookupField.tsx:1958–1959:下拉内容宽度是 w-[var(--radix-popover-trigger-width)],跟触发器同宽。表格单元格渲染 <LookupField compact>(GridField.tsx:1243–1256)。
  • 实测(hotcrm 本地实例,报价单行项目的 Product 列):下拉约 65px 宽,选项显示成「Data Migr…」「ObjectSta…」,看不出是哪个产品。
  • 仓里已有给下拉设最小宽度的先例:FieldTypePicker.tsx:290(min-w-[18rem])、InspectorComboField.tsx:251(min-w-[14rem])。
  • 查找列在表格里的最小宽度是 168px(GridField.tsx:150),实测只有约 65px,说明这一列带着显式的窄宽度,来源没有追到。

要做的

  1. 查找下拉设最小宽度(至少 compact 时,建议 16rem),并以可用宽度封顶,不再跟窄单元格同宽。
  2. 查明行项目表格里 Product 列为什么比 168px 的最小宽度还窄,并修正。

不做的

  • 不改查找的数据与筛选。

验收

  1. 在行项目表格里打开产品下拉,能读出每个产品的完整名称。
  2. 窄屏下下拉不超出视口。

Reader: domain:ui 车道,改 LookupField.tsx,并追 GridField.tsx 的列宽来源。

Dedupe: repo:objectstack-ai/objectstack LookupField popover width grid cell compact radix-popover-trigger-width → 0。

Activity

  1. added
    priority:p1
    domain:ui
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → pm:queue · 2026-11-17T03:27Z

    ⛔ Not a claim.

  3. added
    pm:queue
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz

    Claim: PM loop round 1 (area o3-C, epic #34571)
    Session: session_01WGufziunkXbDT7wUWqfmWz
    Account: os-support-ai
    Branch: claude/issue-34601-lookup-popover-width
    Worktree: objectstack-issue-34601
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/fields/src/widgets/** (LookupField.tsx, GridField.tsx and new tests named for the card), root .changeset/
    Container & model: S/M, mode:subagent (area o3-C os-dev), model: TIER_DEFAULT (dispatch-gates --tier on the surface: "no path-derived mandate"), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: @object-ui/fields in objectstack (LookupField popover sized to its trigger) | none | every inline line-item grid with a lookup column (reported on hotcrm quote lines)
    Thread-read: 6937212343
    Premise: holds (origin/main f4a2d14: LookupField.tsx:1959 w-[var(--radix-popover-trigger-width)]; GridField.tsx:1249 renders the lookup compact; MIN_WIDTH_BY_TYPE lookup 168 at :150, overridden by an author-pinned c.width in widthStyle; the narrow column's source is item 2's to trace and may be app metadata outside this repo)
    Serial constraints cleared: #34618 (#34389) touches LookupField.recordReference-34197.test.tsx and lookupRecordReference.ts, not LookupField.tsx or GridField.tsx; overlap-check re-runs before every push.
    Pre-claim lane: domain:ui — every path is under ui/packages/fields/**.
    Pre-claim deps: no Blocked-by: / "after #N" on the card; overlap-check at claim exit 0 (no branch commits yet).
    Prior rulings read: lookupfield,popover width,trigger-width,gridfield,column width → 0 hits; none; thread: none; repo: objectstack-ai/objectstack

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz
    os-dev-report

    {
      "issue": 34601,
      "status": "done",
      "branch": "claude/issue-34601-lookup-popover-width",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34658",
      "head": "333b33787cecc66fbcde02ade8460a15f5723695",
      "session": "session_01WGufziunkXbDT7wUWqfmWz",
      "premise_still_valid": true,
      "summary": "Item 1 done: LookupField's quick-pick popover keeps the trigger width and gains min-w-[min(18rem,var(--radix-popover-content-available-width,100vw))] plus max-w-(--radix-popover-content-available-width). That applies to every trigger, so both compact call sites are covered (the GridField cell and FieldEditWidget inline cell edit). The floor is 18rem, not the card's suggested 16rem: measured in Chromium on hotcrm's 13 catalog names, 16rem still cut 'ObjectStack Platform (SMB Edition)' (228px of text in 222px), and 18rem cut 0/13. The panel stayed inside the viewport at 1280, 375, 320 and 260px, including a right-edge cell. Item 2 was traced and is left as an open question, so the PR says 'Part of #34601'. GridField never lays out an unpinned lookup column under 168px. Only an author-pinned width does that, and no platform producer derives one. hotcrm@18e18329 pins no width and declares no inlineEdit on quote lines. The likely source of the ~65px column is data-table auto-width (autoWidthKey) on the FieldEditWidget inline-edit path. That is outside the file surface and NOT MEASURED live.",
      "tests": "head 333b3378 (after merging origin/main 518bacad): `pnpm --dir ui exec vitest run --maxWorkers=2 packages/fields/src/widgets/LookupField packages/fields/src/widgets/GridField` exit 0, Test Files 44 passed (44), Tests 347 passed (347). `pnpm --filter @object-ui/fields run type-check` exit 0 (the test file is in the tsconfig.test.json program, listFilesOnly count 1). Ablation via `scripts/ablation-replace.mjs --delete` on the committed fix: the two new tests went red (2 failed / 17 passed), then the file was restored to HEAD blob 0d4e6d38cb3b with `git diff HEAD` empty. The first attempt used --replacement '', which the tool refused before running anything (a no-op, declared). The source is imported relatively, so there was no dist leg. Chromium readings are in the PR's Verification block.",
      "gates": "local, on 333b3378: closure build `pnpm --filter '@object-ui/fields^...' build` VERDICT command-exit 0. `dispatch-gates --commands` gave 38 commands, all exit 0, plus `pnpm check:changeset-fixed` exit 0. `--ran`: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero, all with exit codes). check-platform-checklist --changed-from origin/main exit 0. ui check:new-line-citations exit 0. overlap-check exit 0 before every push. CI: in_progress at report time (Lint, Type Check, Check Changeset, PR-body guards and Governed Surface Queue Guard were running; Schedule gate and the opt-in jobs were skipped). Not re-run locally.",
      "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3: git push (branch, 4 pushes, not REST); relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/34658/assignees, one dispatch); post-stamped comment on #34601 (POST /issues/34601/comments)",
      "line_budget": "56 changed lines (+53 / -3), 3 files",
      "files_changed": [".changeset/34601-lookup-popover-width.md", "ui/packages/fields/src/widgets/LookupField.tsx", "ui/packages/fields/src/widgets/LookupField.previewBadges-13123.test.tsx"],
      "deviations": [
        "Pins went into the existing popover-bounds harness LookupField.previewBadges-13123.test.tsx as a new top-level describe, not a new file named for the card. Ruling record 6583487846 in AGENTS.md outranks the dispatch's optional suggestion.",
        "Floor is 18rem, not the card's suggested 16rem, on the measurement above.",
        "The PR says 'Part of #34601', not 'Refs #34601 (item 1)': os-dev.md names Part of for a merge that must not close the card.",
        "The PR body's last line is a plain-text 'signed:' line, not an HTML comment. os-dev.md forbids dev-written HTML comments, and only the harness attribution first line is exempt.",
        "Commit trailers use the model-free pair AGENTS.md requires, not the harness's model-named Co-Authored-By. The merge commit 333b3378 carries no trailers (git merge --no-edit)."
      ],
      "open_questions": [
        { "question": "Should GridField floor an author-pinned lookup column width at the type minimum (168px)?", "options": ["A: leave width as an exact author pin (today)", "B: floor width at MIN_WIDTH_BY_TYPE for lookup; this changes what width means to an author, Metadata-protocol: semantic"], "recommendation": "A. The popover fix makes a narrow lookup cell usable, and no platform producer writes a narrow width." },
        { "question": "Should data-table auto-width (autoWidthKey, @object-ui/components) give an unpinned lookup column a floor on the inline-edit path?", "options": ["A: measure on a running hotcrm related list first, then file if it reproduces", "B: no change"], "recommendation": "A. It is the likely source of the reported ~65px column but was not measured here." }
      ],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: seat (open question 2) · data-table auto-width on the FieldEditWidget inline-edit path may size an empty lookup column to its header; NOT MEASURED, noted in the PR's Acceptance notes, not filed · dedupe words: data-table autoWidthKey lookup column narrow inline edit"]
    }
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz

    Claim amendment (claim 6937484878, same session): item 2 continues under this claim per the maintainer's 2026-11-17 05:17Z word relayed by the seat (a blocker of an epic card stays under the epic and keeps being developed); #34601 is NOT released after PR #34658 (Part of #34601, item 1).
    Branch (item 2, second PR, from main, not stacked): claude/issue-34601-lookup-column-width → its PR carries Fixes #34601.
    Ruling-ref: seat Q1 = A — an author-pinned lookup column width stays an exact pin.
    File surface: unchanged for now (ui/packages/fields/src/widgets/**, root .changeset/); the item-2 producer file (suspected @object-ui/components data-table auto-width) is added by a further amendment once the live measurement names it.

  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz

    Item 1 delivered by PR #34658 (merged, Part of): the lookup quick-pick popover keeps the trigger width when wider, floors at 18rem and is capped by the available width. The card stays open and claimed (pm:dispatched, assignee unchanged): item 2 (why the line-item lookup column renders below the 168px minimum) is in flight on claude/issue-34601-lookup-column-width under amendment 6939423758; that PR carries Fixes #34601.

  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz
    os-dev-report

    {
      "issue": 34601,
      "status": "done",
      "branch": "claude/issue-34601-lookup-column-width",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34693",
      "head": "bb217f95dcb4c25b17163118d7dcfbd64b51e3d3",
      "session": "session_01WGufziunkXbDT7wUWqfmWz",
      "premise_still_valid": true,
      "summary": "Item 2 measured live and fixed. In a real showcase app (own fresh backend plus the Console Vite dev server from this tree, Chromium), the inline line-item grid in the record form (GridField) draws an unpinned Product lookup at 168px (laid out 205 at 1280, 209 at 375), so it is not the source. The source is data-table's auto width on a list with Edit inline on: the Product column is sized from the drawn short name ('Consulting Hour' = 121px), so the record picker trigger was 51px at 820 and its list read 'C..', 'W.'. The fix floors the auto-sized width of a foreignKey column whose cells edit, in an editable table, at 168px (GridField's lookup minimum). An explicit width (view pin or user resize) stays exact, and read-only tables and non-editing columns are unchanged. After the fix: 168px column, 98px trigger at 820; with #34658 applied locally the popover reads 288px and stays inside the viewport. hotcrm ddcd6e60 declares no inlineEdit on quote lines, so its quote page shows a read-only related list; the picker is reached through the line list's Edit inline, which is the measured data-table path.",
      "tests": "head bb217f95: `pnpm --dir ui exec vitest run --maxWorkers=2 packages/components/src/renderers/complex/__tests__/ packages/components/src/__tests__/data-table.dateOnlyZone-10183.test.tsx` VERDICT command-exit 0, Test Files 38 passed | 1 skipped (39), Tests 248 passed | 7 skipped (255). New file data-table-lookup-picker-floor-34601.test.tsx, 3 tests. `pnpm --filter @object-ui/components --filter @object-ui/types run type-check` exit 0, and the test file is in tsconfig.test.json (--listFilesOnly count 1). Ablation via scripts/ablation-replace.mjs under the lock on the committed head: the floor expression was replaced with '(width)' and the first test went red ('expected 112px to be 168px', 1 failed / 2 passed). The file was restored to HEAD blob f19704007c07 with git diff HEAD empty. There is no dist leg because the test imports ../data-table and @object-ui/types aliases to src. Live Chromium readings are in the PR's Live measurement section.",
      "gates": "local, head bb217f95: closure `pnpm --workspace-concurrency=2 --filter '@object-ui/components^...' build` exit 0. dispatch-gates --commands gave 38 commands, all exit 0; check:type-check-debt first hit a lock queue-timeout (exit 3, NOT MEASURED) and passed (exit 0) when re-run under the lock with its kept slot. --ran: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN, a derived zero with all exit codes. check:changeset-fixed exit 0. ui check:new-line-citations exit 0. overlap-check exit 0 before every push. CI at report time: Check Changeset, Lint x8, Type Check x4, Governed Surface Queue Guard, PR-body guards and Check PR Size in_progress; Schedule gate, Queue verdict, Borrowed queue verdict and opt-in jobs skipped.",
      "dogfood_battery": "n/a: no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3: git push (branch: empty probe push plus 3 pushes, not REST); relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/34693/assignees, one dispatch); post-stamped os-dev-report comment on #34601 (POST /issues/34601/comments)",
      "line_budget": "124 changed lines (+121 / -3), 4 files",
      "files_changed": [
        ".changeset/34601-lookup-column-width.md",
        "ui/packages/components/src/renderers/complex/data-table.tsx (outside the provisional surface)",
        "ui/packages/components/src/renderers/complex/__tests__/data-table-lookup-picker-floor-34601.test.tsx (outside the provisional surface)",
        "ui/packages/types/src/data-display.ts (outside the provisional surface; doc comment only)"
      ],
      "deviations": [
        "No file under ui/packages/fields/src/widgets/** changed. The producer is @object-ui/components data-table, and the PR body lists the three paths outside that surface on its 'File surface amended:' line.",
        "The floor value 168 is a private constant in data-table.tsx and is not shared with GridField. components cannot import fields, and a new public export from @object-ui/types (tried first, then reverted before the PR) would enlarge a published surface, which is Clause-② yes by execution-duties. GridField keeps its own literal, and the two are cross-referenced in comments.",
        "The floor applies only in editable tables. Read-only lists keep their content-sized lookup columns (measured: still 121px with inline edit off), so 'never narrower than 168' holds wherever the picker can open, not in read-only lists.",
        "The PR body's last signature line is plain text 'signed: ...', not the HTML comment the dispatch offered. os-dev.md forbids dev-written HTML comments and exempts only the harness attribution first line.",
        "PR says 'Fixes #34601' as dispatched, but item 1 (#34658, Part of) is not merged. Merging this PR first would close the card with item 1 still open, so the seat should land #34658 first or together.",
        "Commit trailers use the model-free pair AGENTS.md requires, not the harness's model-named Co-Authored-By.",
        "The first ablation run (on an intermediate head, constant since renamed) ran outside os-verify-lock. The ablation of record is the second run, under the lock, on head bb217f95.",
        "The backend was started with `pnpm -C examples/app-showcase exec objectstack dev --seed-admin --fresh -p 38617` (the dogfood skill's form), not `pnpm dev`. The root script's check-dev-prereqs refuses a tree that is not fully built, and only the showcase closure was built. Both servers were stopped by port and PID after the readings."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: seat (file owned by #34615's in-flight dev) · grouped ObjectGrid lists precompute explicit column widths with their own 80px char-estimate floor (groupedColumnWidths in ObjectGrid.tsx), so an editable grouped list's lookup column is not floored by this fix; NOT MEASURED live, noted in the PR's Acceptance notes, not filed · dedupe words: groupedColumnWidths lookup column narrow inline edit grouped grid"
      ]
    }
  10. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz

    Claim: PM loop round 1 (area o3-C, epic #34571) — item 2, continuing claim 6937484878 under amendment 6939423758 (same session; item 1 delivered by merged PR #34658)
    Session: session_01WGufziunkXbDT7wUWqfmWz
    Account: os-support-ai
    Branch: claude/issue-34601-lookup-column-width
    Worktree: objectstack-issue-34601b
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/fields/src/widgets/** plus, amended on the live measurement: ui/packages/components/src/renderers/complex/data-table.tsx, ui/packages/components/src/renderers/complex/__tests__/**, ui/packages/types/src/data-display.ts (doc comment only), root .changeset/
    Container & model: S/M, mode:subagent (area o3-C os-dev), model: TIER_DEFAULT (dispatch-gates --tier: "no path-derived mandate"), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: @object-ui/components in objectstack (data-table auto-width sizes an editable lookup column from its shortest drawn names, ~121px, so the record picker is ~51px at 820) | none | every list with Edit inline on and a lookup column
    Thread-read: 6940890993
    Premise: corrected — the narrow column is not GridField (unpinned lookup measures 168px there) but data-table auto-width on an Edit-inline list; measured live in the showcase app, os-dev-report 6940890993
    Ruling-ref: seat Q1 = A — an explicit width (view pin or user resize) stays exact; the floor applies only to an auto-sized, editable foreignKey column
    Serial constraints cleared: #34658 merged; no open o3-C PR on data-table.tsx; overlap-check clean before every push
    Pre-claim lane: domain:ui — every path is under ui/**.
    Pre-claim deps: none open (item 1 merged).
    Prior rulings read: lookupfield,popover width,trigger-width,gridfield,column width → 0 hits; none; thread: none; repo: objectstack-ai/objectstack

  11. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufziunkXbDT7wUWqfmWz

    Delivered by two merged PRs: #34658 (item 1, the lookup quick-pick popover is at least 18rem wide, capped by the available width) and #34693 (item 2, merge 2e29287: in an editable data table an auto-sized foreign-key column whose cells edit is never narrower than 168px; a width the view pins or the user's own resize stays exact, per the seat's Q1 = A). Nothing remains on this card. pm:dispatched comes off with the close.

    Optional notes from L1 6941377648, left for the seat and not owed here: a masked foreign-key column also gets the floor although it never edits, and grouped editable lists (ObjectGrid groupedColumnWidths) are not covered.

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

Metadata

Metadata

Assignees

Labels

domain:uipriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions