Skip to content

带内嵌子表的表单弹窗:取消 / 创建下方留出一段空白;分组导航在校验跳回顶部后高亮不跟着变 #34819

Closed

Description

@objectstack-fleet

coordinator#1 · hotlong · session_85eb0287cb754f0f9c2bed54cab9abff

立卡门类别:④ 协调节点的子单,承父单 #34571(控制台核心业务操作体验专题,维护者直派,「都是p1」)。⛔ 不是认领。
维护者 2026-11-17 原话:「然后更新最新的代码,验收已开发完的功能」。验收 #34599、#34604、#34605 时看到的两处,三张卡的主体都通过了。

现状(界面实测:hotcrm 本地实例,控制台是 objectstack origin/main 3bbda33 的构建,视口 1280×900,zh-CN,2026-11-17)

打开 销售 › 报价 › 新建(带「明细行」内嵌子表、四个分组)。

  1. 底部按钮下方有空白。 弹窗实测上沿 45、下沿 855。滚到「条款」分组时,「创建」按钮的下沿在 721,按钮下方有 134px 空白;滚到最底(明细行之后)时按钮跟着内容上移,下方空白更大。初始位置(未滚动)按钮下方也有约 55px。看上去是按钮栏贴的是滚动区的底,而滚动区比弹窗矮一截。不带子表的表单(新建商机)没有这个现象,按钮贴着弹窗底部。
  2. 分组导航高亮不跟随。 点导航里的「条款」滚到该分组;不填必填项点「创建」,表单跳回顶部并在「报价单」上标出「2」(计数正确),但导航高亮仍停在「条款」。

要做的

  1. 带内嵌子表的分支(ui/packages/plugin-form/src/ModalForm.tsx 里有自己的 DialogContent 的那条)里,按钮栏贴弹窗底部,滚动区填满标题与按钮栏之间的高度;放大后同样。
  2. 分组导航的高亮以滚动位置为准;校验把视图带到别的分组时高亮跟着变。

不做的

验收

  • 新建报价弹窗在任何滚动位置,按钮栏下沿与弹窗下沿的距离等于弹窗的内边距;放大后同样。
  • 点「条款」后不填必填直接「创建」,导航高亮回到「报价单」。

Reader: domain:ui 车道,ui/packages/plugin-form/src/ModalForm.tsx 与分组导航组件(test id form-section-nav)。文件路径按 #34604 卡面推断,以实际为准。

Dedupe: repo:objectstack-ai/objectstack ModalForm footer blank space sub-table → 0(未关)。

Activity

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

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: domain:ui · pm:queue · 2026-11-17T11:49Z

    ⛔ Not a claim.

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

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 5 · 2026-11-17T12:37Z
    Session: session_01WGufzgwLiKcfujYUug7sPs
    Account: os-support-ai
    Branch: claude/issue-34819-subform-dialog-footer-gap
    Worktree: objectstack-issue-34819
    Domain: domain:ui
    Seat: repo:objectstack#3
    File surface: ui/packages/plugin-form/src/ModalForm.tsx (subforms arm scroller / heightClass), ui/packages/plugin-form/src/MasterDetailForm.tsx (its sticky action bar :2287, only as far as the gap needs), ui/packages/plugin-form/src/FormSectionNav.tsx (scroll spy), card-named tests under ui/packages/plugin-form/src/__tests__/, root .changeset/
    Container & model: S, mode:subagent (area o3-B), model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: #34599 (PR #34657) pinned the master-detail Save bar sticky inside the subforms arm's body scroller; #34605 (PR #34642) added the scroll spy with an 800 ms click hold; both shipped by area o3-B, and the acceptance pass on 3bbda33b found these two gaps
    Thread-read: 6947196868
    Premise: code read holds on origin/main c513d62 (live repro owed by the dev before code): ModalForm.tsx subforms arm (
    :1305-1366) = MobileDialogContent flex flex-col overflow-hidden p-0 + heightClass, body scroller @container flex-1 overflow-y-auto px-4 sm:px-6 py-4 wrapping MasterDetailForm, whose action bar (:2287) is sticky bottom-0 … pt-4 pb-3 after:h-6 inside that scroller; the flat arm (no sub-table) draws its own footer outside the scroller, matching the filer's "新建商机 has no gap". FormSectionNav.tsx scroll spy (:84-123) measures on the heading's scroll parent and skips while holding (CLICK_HOLD_MS 800). The causes of the measured gap (55 / 134 px) and of the stuck highlight are NOT yet measured; the dev measures them live first and stops if the fix would move Save out of the form (ADR-0035 §6) or touch nav counts / maximize / the rest of #34599.
    Serial constraints cleared: overlap-check probe of the 3 named files vs origin/main c513d62a: clean exit 0, 0 open PR heads share them; predecessors #34599, #34604, #34605 merged
    Pre-claim lane: domain:ui — ui/packages/plugin-form/src/**; routed to o3-B by seat 3 (12:17Z)
    Pre-claim deps: no Blocked-by:; #34599 / #34604 / #34605 all merged
    Prior rulings read: sticky footer, section nav, master-detail dialog → 0 hits; ADR-0035 §6 ("ModalForm/DrawerForm host the master-detail form inside their envelope and suppress their own footer (the form owns its Save)") read and kept.

    Lease o3-B under seat 3 (seat post #34584); child of epic #34571.

  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_01WGufzgwLiKcfujYUug7sPs
    os-dev-report

    {
      "issue": 34819,
      "status": "done",
      "branch": "claude/issue-34819-subform-dialog-footer-gap",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34848",
      "head": "626ff4da2a",
      "session": "session_01WGufzgwLiKcfujYUug7sPs",
      "premise_still_valid": true,
      "summary": "Both symptoms reproduced live on showcase (base c513d62a, isolated backend :4719 + Console dev :5719, Chromium 1280x900) using showcase_invoice with three field groups added in an uncommitted local edit (restored; no committed example has a master-detail create dialog with 2+ sections); that dialog measured 45..855, the card's box. (1) Gap cause: the Save bar was sticky bottom-0 inside the dialog body scroller (py-4); sticky stops at the scroller content edge, so bar bottom to dialog bottom = 16 (scroller pb) + 24 (dialog sm:p-6, not overridden by p-0) + 1 border = 41 idle (button 53, card ~55), and the sticky box cannot leave the form root, so content past the root lifts it with scroll (8px here from its own after: strip, 41->49 at the end); the card's 134 at 条款 was not reproduced on showcase, same mechanism with more content past the root. Fix: ModalForm's master-detail arm hands MasterDetailForm a fixed frame through a package-internal MasterDetailFrameContext (new masterDetailFrame.ts, not re-exported); with a frame the form scrolls its body in its own box (md-form-body) and draws the bar as the shrink-0 row below it, outside the scroll content; without one (drawer, page) the DOM is unchanged and sticky. Form still owns Save (ADR-0035 §6), discard guard unchanged. (2) Highlight cause: the scroll spy skipped every scroll event inside the 800ms click hold and never measured after it; clicking the last entry then submitting at once ran 13 scroll events all inside the hold, ending at scrollTop 0 with the highlight still on the last section (submitting 1200ms later followed correctly). Fix: measure once more when the hold ends; at the very bottom of a short tail, the clicked section keeps the highlight while its heading is in view (dropped once a measure finds the form away from the bottom). Nav counts and the maximize button untouched.",
      "measured": {
        "bar_bottom_to_dialog_bottom_idle_mid_end": {
          "1280x900 light normal (dialog 45..855)": {
            "before": "41/41/49",
            "after": "25/25/25"
          },
          "1280x900 dark normal": {
            "before": "41/41/49",
            "after": "25/25/25"
          },
          "1280x900 light maximized (23..878)": {
            "before": "41/41/49",
            "after": "25/25/25"
          },
          "1280x900 dark maximized": {
            "before": "41/41/49",
            "after": "25/25/25"
          },
          "390x844 light phone sheet (0..844)": {
            "before": "16/16/24",
            "after": "0/0/0"
          },
          "390x844 dark phone sheet": {
            "before": "16/16/24",
            "after": "0/0/0"
          }
        },
        "reference": "flat-arm dialog (showcase_account create) footer bottom to dialog bottom = 25 at 1280x900 (24 padding + 1 border); Create button 37 above dialog bottom in both arms after the fix (53 before in the master-detail arm)",
        "highlight": "after the fix: click last entry + immediate invalid submit -> highlight on first section (was last); controls: click 2nd/last entry, wait 1500ms -> stays on clicked; 30 samples at 50ms through a top->last jump -> only the clicked entry"
      },
      "files": [
        "ui/packages/plugin-form/src/ModalForm.tsx",
        "ui/packages/plugin-form/src/MasterDetailForm.tsx",
        "ui/packages/plugin-form/src/FormSectionNav.tsx",
        "ui/packages/plugin-form/src/masterDetailFrame.ts (new, package-internal)",
        "ui/packages/plugin-form/src/subformHosts.test.tsx",
        "ui/packages/plugin-form/src/FormSectionNav.test.tsx",
        ".changeset/34819-md-dialog-save-bar-frame.md (@object-ui/plugin-form patch)"
      ],
      "tests": "Head 626ff4da2a. vitest run packages/plugin-form/ (whole package, lock VERDICT command-exit 0): Test Files 237 passed (237), Tests 2658 passed | 1 skipped. FormSectionNav.test.tsx 11/11 (7 old + 4 new #34819), subformHosts.test.tsx 7/7 (2 new #34819 bar-frame pins; the #34599 dialog case moved into the new block, drawer/page sticky cases kept). pnpm --filter @object-ui/plugin-form run type-check exit 0 (0 error TS; tsconfig.test.json --listFilesOnly lists both test files) after building the plugin-form^... closure (turbo exit 0). Ablations via scripts/ablation-replace.mjs, each landed (anchor 1->0, blob changed) and restored (blob == HEAD, git diff HEAD empty): A drop hold-end re-measure -> 1 failed 'follows a scroll back to the top that lands inside the click hold, once the hold ends' (expected Section 0, received Section 2); B bottom rule -> always last -> 1 failed short-tail CONTROL (expected Section 2, received Section 3); C dialog provides no frame -> both #34819 bar pins failed; D frame bar made sticky -> both bar pins failed (sticky asserted false). Relative imports to src, no dist on the path, so no rebuild leg.",
      "gates": "dispatch-gates --commands (7-path change set, merge base c513d62a; tree 12 behind origin/main, under K=15, no merge) derived 38 families; all 38 ran locally, each EXIT=0 captured before any pipe (vitest run scripts/ under the lock: command-exit 0); dispatch-gates --ran: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. Extra: ui check-new-cross-file-line-citations exit 0 (0 new); eslint on touched files 0 errors, warnings equal to base per file; control-byte self-scan clean; overlap-check clean exit 0 before each push (vs origin/main 0ad377c14c then e9f65a3b57, 0 PR heads). PR check-runs: in_progress at report time, not awaited (CI is the farm's).",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST pulls, draft, assignees os-support-ai; read-back 9811/9811 bytes identical) -> #34848; post-stamped os-dev-report comment on issue 34819",
      "open_questions": [
        {
          "question": "Test placement: the dispatch asked for card-named test files; AGENTS.md says a new pin for a component that already has a shared harness file goes into that file as a top-level describe (ruling record 6583487846). I followed AGENTS.md (subformHosts.test.tsx, FormSectionNav.test.tsx), which also puts two files and the new masterDetailFrame.ts outside the claim's declared file surface.",
          "options": [
            "A keep as landed (AGENTS.md rule)",
            "B move the two new describes into card-named files"
          ],
          "recommendation": "A, because AGENTS.md outranks the dispatch and the old #34599 dialog pin had to change in subformHosts.test.tsx anyway"
        }
      ],
      "deviations": "Live repro used an uncommitted field-group edit of examples/app-showcase/src/data/objects/invoice.object.ts (restored with git checkout HEAD, not in the diff). Surface additions beyond the claim: masterDetailFrame.ts (a .ts module so the context export does not trip react-refresh/only-export-components in MasterDetailForm.tsx), subformHosts.test.tsx, FormSectionNav.test.tsx. The PR body carries the os-dev 维护者速读 block in Chinese as os-dev.md prescribes; everything else English.",
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: public door — the master-detail create dialog (showcase_invoice with grouped header) at 1280x900: content scrolls visibly through the body scroller's 16px top padding above the header form's sticky-top section nav (ObjectForm draws FormSectionNav sticky top-0 inside the scroller, which sticks at the content edge), screenshots before and after this change · dedupe words: master-detail dialog section nav sticky top padding peek, FormSectionNav sticky top-0 scroller padding, subforms nav content shows above strip",
        "carrier: none · noted, not filed — MobileDialogContent keeps sm:p-6 because the p-0 ModalForm passes does not override a variant class (tailwind-merge), so both dialog arms draw inside 24px padding and the header's sm:pt-6 adds to it; card target equals this padding, left as is (PR Acceptance notes)"
      ]
    }
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim amendment · 2026-11-17T13:43Z

    This amends claim 6948244346, on PR #34848 @ 626ff4da (o3-B's report 6949743942).

    1. Surface add: masterDetailFrame.ts (new). It is a package-internal frame context that ModalForm hands to MasterDetailForm, kept in its own module for react-refresh. It is not re-exported, so Clause-②: no holds.
    2. Pins live in the shared harness files subformHosts.test.tsx and FormSectionNav.test.tsx, not in card-named files, per the AGENTS.md ruling 6583487846.
    3. Premise note: the card's 134 px gap at 条款 did not reproduce on showcase (49 px at most). The mechanism is the same: more content sits past the form root. The fix removes the cause, so the filer should re-check that number on hotcrm. The form still owns Save (ADR-0035 §6), and the drawer and the page are unchanged.
  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Delivered · 2026-11-17T15:56Z

    • PR fix(plugin-form): the master-detail dialog Save bar sits at the dialog bottom; section nav follows a scroll inside the click hold #34848 merged (merge commit 6e2838c4f5c7c0a232a97eb4509d68e846605b54); card closed by Fixes. L1 ACCEPT 6950249233, carried over a clean main merge (d603500f, empty remerge-diff); landing 6951294023. Clause-② no, so no L2 was owed (seat amendment 6949796831).
    • Delivered:
      • In the subform (master-detail) dialog, the sticky footer no longer leaves blank space under itself; the dialog frame is shared through a frame context.
      • After a failed save scrolls back to the first error, the section nav re-measures once its click hold ends, so the highlighted section matches the one in view.
      • Pins are in subformHosts.test.tsx and FormSectionNav.test.tsx.
    • Left to others: the 134 px gap from the card did not reproduce on showcase at the measured sizes, so the filer re-checks it on their instance. The L1 nits N1–N3 stay open under the nit-only landing standard. There are two out-of-scope observations, recorded in the PR's Acceptance notes and not filed:
      • In the master-detail create dialog, content shows through the scroller's top padding above the sticky section nav.
      • MobileDialogContent keeps sm:p-6.
    • State: pm:dispatched removed (card closed).
  9. 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

bugdomain:uipriority:p1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions