Skip to content

The opportunity's 详情 tab renders two fields out of the fourteen it authors — highlight fields are dropped and the sections left empty disappear #1211

Description

@os-zhuang

Restart-when: the @objectstack/console this repo installs was built from an objectui commit containing 542718f45 (objectui PR #9627, objectui#8603 ruling A) — probe: read that release's .objectui-sha, then compare/542718f45...<sha> answers ahead or identical

The opportunity's 详情 tab renders two fields out of the fourteen it authors — every field that is also a highlight is dropped, and a section left with nothing disappears

What renders

opportunity_detail_page → 详情 / Details, on a live deal:

阶段与预测
  阶段        需求分析
  预测类别     最佳情况
创建人 Dev Admin · 1小时前   更新人 Dev Admin · 1分钟前

That is the whole tab. Two fields.

What it authors

src/pages/opportunity_detail.page.ts:115-140 — three sections, fourteen fields:

sections: [
  { name: 'info',        label: 'Opportunity Information',
    fields: ['name','crm_account','owner_id','type','lead_source','crm_campaign'] },
  { name: 'crm_forecast',label: 'Stage & Forecast',
    fields: ['stage','probability','amount','expected_revenue','close_date','forecast_category'] },
  { name: 'description', label: 'Description', columns: 1, collapsible: true,
    fields: ['description','next_step'] },
]

Of the fourteen:

  • name, crm_account, owner_id, amount, close_date, probability, expected_revenue are also highlightFields, and record:details does not repeat a field the highlights already show — so they are removed from the sections;
  • type, lead_source, crm_campaign, description, next_step are empty on this record and collapse into the "+ N 个为空" affordance;
  • what survives is stage and forecast_category.

A section whose fields all fall into those two buckets does not render an empty shell — it vanishes. So 商机信息 and 描述 are absent from the page entirely, and the tab looks broken rather than concise.

The same shape hits case_detail_page: its 工单信息 section renders 案例编号 and "显示 3 个空字段", with 主题 / 客户 / 联系人 all lifted into the highlights.

Why it matters

This is the app's flagship record. A seller opening 详情 expecting the deal's full picture — source, campaign, type, next step, description — gets a two-row card, and there is no other surface in the page that shows those fields. The information is not hidden behind a toggle; it is simply not on the page.

Direction

The de-dup against highlights is the platform's behaviour and is reasonable on its own. What needs a decision here is what the sections should hold given that behaviour:

  • author the detail sections with the fields that are not highlights (drop name / crm_account / owner_id / amount / close_date / probability / expected_revenue from them, since the highlights already carry those), so each section renders the fields it is actually responsible for; and
  • keep 描述 as its own section — a deal with no description and no next step is exactly the case where an empty, promptable section is more useful than no section.

Worth doing the same read on case_detail_page and lead_detail_page in the same pass; all three were authored as if record:details and highlightFields were independent.


Found by driving the app as a seller in a browser against a fresh pnpm dev on 17.1.0.


Generated by Claude Code

Activity

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

    bugSomething isn't workingmetadataDeclarative metadata — schema, security posture, UI surfacesui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions