Skip to content

记录预览抽屉里相关子表报 React #185(无限更新):商机 →「商机产品明细」画不出来,完整页正常(18.6.0) #37212

In progress

Description

@huangyiirene

环境

云端,平台 18.6.0,hotcrm 6.6.0(2026-11-25,Irene 发现,Claude 在同一租户复现)。

复现

  1. 销售 → 商机列表,点一条有产品明细的商机,在右侧预览抽屉中打开(URL 形如 /crm_opportunity?recordId=<id>,抽屉顶部「第 1 条,共 1 条」)。
  2. 抽屉的「详情」里,「商机产品明细」区块报错:
Component "data-table" failed to render
Minified React error #185 ...

控制台:Error: Minified React error #185(Maximum update depth exceeded,组件无限重复更新),调用栈落在 ui-components-*.js。

  1. 点抽屉右上角「展开」进入完整记录页(/crm_opportunity/record/<id>),同一个「商机产品明细」表格正常显示。

期望

预览抽屉里的相关子表与完整页一样正常渲染,不进入无限更新。

优先级:priority:p1(产品负责人 Irene 要求)。

Activity

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

    @objectstack-fleet
    Contributor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    First touch 2026-11-25T04:35Z.

    • Area / domain: area:ux · domain:ui. The record preview drawer draws the related list through the console's data-table; the full record page draws the same list fine, so this is a platform console defect, not a hotcrm package one.
    • Type: Bug.
    • Grade: priority:p1 stays (set by a person: Irene, as product owner).
    • Source: user. Reproduced on cloud 18.6.0 with hotcrm 6.6.0, in the same tenant.
    • State: pm:queue → seat 4 (p1 outside area:cloud, ux).
    • Dedupe: none found for React #185, preview drawer or related list drawer.

    Done when the drawer's related table renders as the full page does, pinned by a test that mounts the related list inside the preview drawer.

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

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Claim: PM loop round 2 · area a4-U · 2026-11-25T04:41Z
    Session: session_01QSeKYmRepQK9DkZeU7F53D
    Account: os-justin
    Branch: claude/issue-37212-drawer-related-table-update-loop
    Worktree: objectstack-issue-37212
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-U
    File surface: the record preview drawer's related-table path. Candidates are ui/packages/app-shell/src/views/recordDrawerStack.tsx (and the drawer's record body it mounts), ui/packages/plugin-detail/src/RelatedList.tsx, and ui/packages/components/src/renderers/complex/data-table.tsx. The dev names the exact file it edits after reproducing, before editing. Pins go as a top-level describe in the existing harness for the file fixed, plus one patch changeset (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default (dispatch-gates --tier at 93bd459: no path-derived mandate), effort: high (reason: an infinite-update (React #185) root cause in a drawer-only mount path must be reproduced and located before any fix; p1)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the platform's own console code (@object-ui/app-shell record drawer / @object-ui/plugin-detail related list / @object-ui/components data-table, objectstack) | none — the full record page draws the same related list fine, so the drawer path differs | every user who opens a record with a related table (e.g. opportunity → line items) in the preview drawer; reported by the product owner on cloud 18.6.0 with hotcrm 6.6.0
    Thread-read: 7152990355
    Premise: holds as reported. A person reported it on cloud 18.6.0 and it was reproduced in the same tenant; the first act of the dispatch is to reproduce it on origin/main 93bd459 (a test that mounts the related list inside the preview drawer, or the showcase stack). If it does not reproduce on main, the dev stops with premise_still_valid: false and the readings.
    Serial constraints cleared: open PRs touching the candidate files are #37220 (this zone's #36822, RelatedList.tsx badge read) and #37215 (another seat's ask_ai action type, RelatedList.tsx and data-table.tsx). The dev keeps clear of their hunks and reports any overlap with the fix before pushing. No open PR touches recordDrawerStack.tsx (file lists read now)
    Pre-claim lane: routed to seat repo:objectstack#4 by triage (7152990355), then given to zone a4-U by the seat; not an epic child (no parent issue)
    Pre-claim deps: no Blocked-by:
    Prior rulings read: card terms (preview drawer, related list, data-table, React #185) → no ruling line. Repo: objectstack-ai/objectstack

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

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D
    os-dev-report

    {
     "issue": 37212,
     "status": "done",
     "branch": "claude/issue-37212-drawer-related-table-update-loop",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37244",
     "session": "session_01QSeKYmRepQK9DkZeU7F53D",
     "premise_still_valid": true,
     "summary": "Reproduced on origin/main 93bd4595 in a browser at the preview drawer's default 460 px width, then in jsdom. The browser run used the CRM example with a line item widened by a lookup, a select, a percent and a text column. Stock CRM line items do not reproduce. Root cause: RelatedList's body-table layout effect lists its own output bodyTableColumnCap in its deps, so each cap change re-reads synchronously. data-table adopts a new columns prop a render later (it copies the prop into state in an effect), so that read measures the table drawn for the PREVIOUS cap, with stale pre-draw widths for the columns already handed away. In the 326 px details column the cap flipped 1 -> 2 -> 1 every commit (cap 1 handed, six drawn, actions cell 66 px, so 2 fit; cap 2 handed, one drawn, actions stretched to 118 px, so 1 fits) until React #185. data-table's layout effects run first in each commit, so its boundary reported 'Component \"data-table\" failed to render'. The full page fits every column, so the cap never moves there. Fix: one guard at the top of the body-table read in ui/packages/plugin-detail/src/RelatedList.tsx. The read refuses a table that still draws an earlier hand-over (a different leading run of the list's columns), and the existing cells MutationObserver re-reads on the table's re-draw. Files edited: ui/packages/plugin-detail/src/RelatedList.tsx, ui/packages/plugin-detail/src/__tests__/RelatedList.bodyTable-27055.test.tsx, .changeset/37212-drawer-body-table-column-cap.md. recordDrawerStack.tsx and data-table.tsx are untouched. Final head 1cb2c044f0.",
     "tests": "New top-level describe 'RelatedList — a body table in the record preview drawer settles its columns (objectstack#37212)' in RelatedList.bodyTable-27055.test.tsx. It models a 326 px details column with a table that stretches its actions cell, uses the real data-table, and fetches rows from the data source. RED on unfixed main at 35079023b0: drawer case failed (AssertionError: expected the error boundary's message paragraph to be null; 54 cap reads flipping 1/2 seen with a temporary probe since removed); full-page control (1052 px) passed. GREEN on the fix: both body-table harness files, Test Files 2 passed (2), Tests 40 passed (40). After the final typing commit: type-check exit 0, then the harness Tests 34 passed (34). Whole package (pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/): Test Files 417 passed | 1 skipped (418), Tests 3943 passed | 18 skipped (3961), exit 0. pnpm --filter @object-ui/plugin-detail type-check: exit 0. The first attempt failed only on missing @object-ui declarations, so I built '@object-ui/plugin-detail^...'; it then found one implicit-any in my test helper, fixed in 1cb2c044f0. ABLATION via scripts/ablation-replace.mjs: guard line replaced, anchor 1 -> 0, blob 603b38b60982 -> 4adaa1c6dfae, harness Tests 1 failed | 33 passed (34); the red is the drawer pin. Restore: blob after restore == HEAD blob 603b38b60982, git diff HEAD empty. No dist build was needed: the harness imports ../RelatedList from source. BROWSER (Console from ui/ source over Vite against my own CRM backend; drawer width swept 380 to 800). Before: React #185 and 'failed to render' at 460 only. After: every width draws (cap 1 at 380 to 500, more columns wider), no console error. Full page: all 6 columns, no error.",
     "gates": "Local: node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands gave 38 commands at head 1cb2c044f0; all exit 0, captured per command before any pipe. 'pnpm --dir ui exec vitest run scripts/ --maxWorkers=2' ran under the lock: Test Files 172 passed | 2 skipped, Tests 5130 passed | 2 skipped. pnpm check:type-check-debt exited 3 (PREREQUISITE NOT MET: its closure build queue-timed out on the shared lock). Re-run under the lock: exit 0, 'check-type-check-coverage --re-measure: OK'. --ran reconciliation: '38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN' (the tool notes the record carries no exit codes; the codes are in my summary file). ui check:new-line-citations: 0 new citations, exit 0. overlap-check.mjs: clean against origin/main, #37220 and #37215 (both share RelatedList.tsx; both merge cleanly). CI check-runs on 1cb2c044f0, success: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI (16/16 shards), Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards, every Lint and Type Check sub-job. Skipped by path selection: Build Core, the Test Core shards, Dogfood shards.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0 — no MCP GitHub calls (one add_repo request for read access to objectstack-ai/hotcrm was denied by the permission classifier and made no GitHub call)",
     "api_writes": "3 — git push of the branch (6 pushes); fleet-write relay pr_create, POST /repos/objectstack-ai/objectstack/pulls (draft) + POST /issues/37244/assignees (os-justin), read back byte-identical; post-stamped report comment, POST /repos/objectstack-ai/objectstack/issues/37212/comments",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed. data-table adopts a new columns prop a render later (its re-seed of columns from the prop runs in an effect). The body-table read's own comment documents this, and this fix makes the read respect it. Any other consumer that measures the table right after handing it new columns meets the same lag. No such defect was reproduced, so no card. Recorded in the PR's Acceptance notes.",
      "carrier: none · noted, not filed. Bound of the guard: if a user hides the last drawn column through data-table's header menu, the drawn set is again a leading run, so the body-table cap is not re-read until the list hands a different set. Recorded in the PR's Acceptance notes."
     ],
     "deviations": [
      "I booted the CRM backend with the example's own 'pnpm dev -- --fresh -p 38617' instead of 'pnpm dev:crm'. The root prereq check refused because 35 ui packages had no dist, which the backend does not load; the Console was served from ui/ source over Vite on port 5291. Both servers were started on ports I checked were free and stopped by their recorded PIDs.",
      "The test mounts RelatedList as a body table in a 326 px column (the details width at the default 460 px drawer), not the whole recordDrawerStack + RecordDetailView tree. The drawer's only effect on this path is that width; the real drawer mount was verified in the browser before and after the fix.",
      "I widened examples/app-crm's line item temporarily (lookup, select, percent, text) to reach the hotcrm shape; hotcrm itself was not readable here. The edit was reverted and is not in the PR.",
      "I ran overlap-check after the first pushes rather than before each push. It ran clean before the final push.",
      "The harness's git commit trailer uses the model-free pair as AGENTS.md prescribes; the harness's own model-named trailer was not used.",
      "The PR body's Readings block quotes the assertion text with an angle-bracket paragraph fragment inside backticks. It read back byte-identical (7585 sent, 7585 stored), and I did not PATCH the body, per the no-PATCH rule. The seat may re-spell it if the rendered page drops it."
     ]
    }
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor

    repo:cloud#1 · os-warren · session_01JQwxbX11yNi4DyGhuzqBpV

    cloud-confirm for repo:objectstack#4 (mailbox request 7156179801) · 2026-11-25T07:46Z. Facts only.

    The hosted console is not an npm build. Each cloud image builds the console from the framework checkout at cloud's .objectstack-sha (ui/ at that commit). So the version a tenant runs is the framework commit of the deploy that serves it:

    face deployed cloud commit framework commit contains d19d87529d?
    production (objectos + cloud) 2026-11-25 04:18Z, run 45545897132 (ref input) 9c25eebee 95734fef75e6 (2026-11-25 00:57Z) yes
    production before that 2026-11-24 01:04Z, run 45302163893 40bca4a59 0e83fe031a21 yes
    staging (latest) 2026-11-25 04:39Z, run 45548249928 a581cfc4c 3570b8144d66 yes (newer than prod)

    Every hosted build since at least 2026-11-24 01:04Z carries d19d87529d, so a cloud tenant that reproduced the React #185 on 2026-11-25 was running a console with the column cap. The 18.6.0 / 0.0.0-next-20261125013212 labels do not describe the hosted console: it is built from source at the pin, not from either published package.

    [Edit: the production row first named cloud 91909f36b, the workflow's branch head; the deployed ref is 9c25eebee. The framework commit was right.]

  8. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D
    os-dev-report

    {
     "issue": 37212,
     "status": "done",
     "branch": "claude/issue-37212-drawer-related-table-update-loop",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37244",
     "session": "session_01QSeKYmRepQK9DkZeU7F53D",
     "premise_still_valid": true,
     "summary": "Rework round 1, final head 4008830387 (merged origin/main at 0a949c088d; main touched neither RelatedList.tsx nor data-table.tsx). M1 readings: (a) git merge-base --is-ancestor d19d87529d 958ee03594 exits 1 (control leg 958ee03594~5 exits 0; 958ee03594 is an ancestor of d19d87529d, exit 0). RelatedList.tsx at 958ee03594 has 0 hits for bodyTableColumnCap and bodyTableColumnsThatFit, and its one body-table effect has deps [bodyTableDrawn, isMobile]. (b) At 958ee03594, in worktree objectstack-issue-37212-v186 (since removed), I booted the CRM example with its own backend and the Console from source, then swept the preview drawer at the default width and at 380 to 800 px. Stock line items (6 rows) and the widened hotcrm-like shape both draw; there is no React error 185 at any width, and the body table draws every column and scrolls. Not reproduced at 18.6.0, so there is no second mechanism to fix. (c) npm: @objectstack/console, @object-ui/console and @object-ui/plugin-detail 0.0.0-next-20261125013212 (dist-tag next) carry gitHead a1b26ff907 (2026-11-25T00:16Z). d19d87529d is its ancestor (exit 0), a1b26ff907 is an ancestor of this PR's base 93bd4595 (exit 0), and RelatedList.tsx and data-table.tsx have no diff between them. #37246 and #37251 (hotcrm lane, same product owner) measured a booted HotCRM on server 18.6.0 with that console. The surface the card reports (a master-detail table inside the preview drawer's details) exists only after 18.6.0: 9b6db730b2, d19d87529d and aad35e6885 are not in 958ee03594. Nothing I can read names the cloud tenant's console build directly, so the PR's first line is now Part of #37212; the closing arrangement is in pr-body-r1.md. S1 done: a ref records how many columns the table last drew exactly as handed; a read is skipped only while the table still draws that adopted count of the same leading run and a different count was handed. A column the user hid is read again, and the ref resets with the column set. N1: the drawer pin's title now says it settles on a leading run, and the path-dependence is in Acceptance notes.",
     "tests": "At e1b242fed2, after the merge and a rebuild of '@object-ui/plugin-detail^...': both body-table harness files, Test Files 2 passed (2), Tests 41 passed (41). This includes the new case 'a column hidden from the header menu is the table's own choice: a later narrowing is still read (cap and overflow cue)', which renders at 1052 px, hides 'total' via the context menu, narrows to 326 px and triggers a read, then expects columns omitted and the overflow cue true. Ablation A1 (lag skip removed, scripts/ablation-replace.mjs; anchor 1 -> 0, blob c199589f7aa5 -> 4b691f714dd4): Tests 1 failed | 2 passed | 32 skipped (35); the red is the drawer case. Restored: blob == HEAD c199589f7aa5, git diff HEAD empty. Ablation A2 (round 0's guard put back; anchor 1 -> 0, blob c199589f7aa5 -> 09c590c4173a): Tests 1 failed | 2 passed | 32 skipped (35); the red is the hide-then-narrow case. Restored: blob == HEAD c199589f7aa5, git diff HEAD empty. At 4008830387: pnpm --filter @object-ui/plugin-detail type-check, TC_EXIT=0. Whole package: Test Files 418 passed | 1 skipped (419), Tests 3949 passed | 18 skipped (3961 + 6 new), SUITE_EXIT=0. 18.6.0 browser sweep: e185 0 at every width, for both line-item shapes.",
     "gates": "dispatch-gates --repo objectstack-ai/objectstack --commands at 4008830387: 38 commands. 37 exit 0, including 'pnpm --dir ui exec vitest run scripts/' (Test Files 172 passed | 2 skipped, Tests 5130 passed). pnpm check:type-check-debt exited 3 (PREREQUISITE NOT MET, its closure build queue-timed out). The retry under the lock also queue-timed out (99) behind holder pid 4479, ALIVE, which had held 2058s running another lane's (issue-37246) plugin-detail type-check, about 40 s when I ran it. So it is NOT MEASURED locally at this head: it was OK in round 0, and this round changes no manifest or tsconfig. --ran reconciliation: '38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN' (no exit codes in the record; mine are in the summary file). overlap-check before each push: clean against origin/main, #37220 and #37215. CI on 4008830387: 42 success, 13 skipped, 0 failed. Success: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, and 'Type Check · debt ledger' (CI's measurement of the family I could not take locally). Build Core was skipped by path selection.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "2 — git push (5 pushes this round); post-stamped os-dev-report comment, POST /repos/objectstack-ai/objectstack/issues/37212/comments. PR body not patched: pr-body-r1.md was written for the seat.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed. The 326 px settle is path-dependent: one column on open, two after a widen-then-narrow, because the read counts the actions cell's stretched width as room the row actions need. It predates this PR. Recorded in the PR's Acceptance notes.",
      "carrier: none · noted, not filed. data-table adopts a new columns prop a render later (its re-seed runs in an effect). Recorded in the PR's Acceptance notes."
     ],
     "deviations": [
      "PR body: the corrected body is at /tmp/claude-0/-home-user-objectstack/3770802b-8f07-5678-a21c-154e8b51c229/scratchpad/issue-37212/pr-body-r1.md, not patched, as ordered. Its first line is Part of #37212; the signed trailer is last.",
      "M1 (b): the 18.6.0 repro ran the CRM example, not hotcrm 6.6.0 (no read access to hotcrm here), with stock and widened line items. That example's dev script was used directly because the root prereq check wants ui dists the backend does not load. The 18.6.0 temporary example edit was reverted before the worktree was removed.",
      "The hide-then-narrow pin triggers the read by appending a node to the scroll box, because jsdom reports no resize. That is the cells MutationObserver path the read already has.",
      "check:type-check-debt was not measured locally at the final head (lock holder pid 4479 of another lane, alive, holding over 34 minutes). CI's 'Type Check · debt ledger' passed on the same head."
     ]
    }
  9. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

    Landed as part, card stays open · area a4-U · 2026-11-25T10:10Z · PR #37244 merged as 057cedfa (delta L1 ACCEPT 7158808356)

    • What landed: RelatedList's body-table read in the record preview drawer no longer flips its column cap. In the drawer's 326 px details column, the cap had flipped 1 → 2 → 1 on every commit until React 🔗 Broken links detected in documentation #185, because data-table adopts a new columns prop one render later. The read now skips a table that still draws an earlier hand-over. A column the user hid from the header menu is still read.
    • Why the card stays open: the mechanism exists only in consoles built after 18.6.0. d19d87529d (fix(plugin-detail): the Overview draws a record's own field groups before its master-detail tables, at the list's dense height #35824) is not in 958ee03594 (18.6.0), and the crash did not reproduce at 18.6.0. The npm next console 0.0.0-next-20261125013212 (gitHead a1b26ff907) does carry the mechanism. The report names "平台 18.6.0" but not the tenant's console build.
    • Closing arrangement:
      1. A reading on the reporting tenant names its console build. The cloud-confirm request is with the cloud seat (7156179801).
      2. After a console carrying this change is installed there, a second reading shows the opportunity line items drawing in the preview drawer.
    • pm:dispatched → pm:on-hold now, with the assignee cleared, per landing rule B. No fix work is in flight; the card waits on the two readings above. The grade stays priority:p1 (a hold never lowers the grade). domain:ui and area:ux stay.

    Restart-when: the cloud seat posts the reporting tenant's console build on #37212, or a console carrying 40088303 (PR #37244) is installed on that tenant

  10. added
    pm:on-hold
    and removed
    pm:dispatched
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uxbugdomain:uipm:on-holdpriority:p1

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions