Skip to content

fix(ui): phone list card shows its amount whole; field-tab strip scrolls at phone width - #34695

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-34615-phone-card-amount-tabs
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-34615-phone-card-amount-tabs

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #34615
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:手机列表卡片把金额(第一个 currency 列)从副标题里拿出来,单独放在副标题下面一行的右侧、完整显示,状态徽标移到这一行左侧;表单字段页签条在手机宽度(sm 以下)不再撑宽页面,放不下的页签横向滑动、不显示滚动条,当前页签始终滚到可见处。
  • 为什么改:375 宽下商机卡片的金额和客户名平分一行,「CN¥1,200,000.00」被截成「CN¥1,2…」;5 个页签的编辑表单整条页签超出弹窗,页面出现横向滚动(维护者专题 专题:控制台核心业务操作体验(详情、表单与子表、审批、通知、手机端、应用与 Studio 往返、云端入口) #34571「都是p1」)。
  • 风险与回滚:只影响手机布局:卡片只在手机上画,页签条新增的样式全部带 max-sm: 前缀,桌面表格与页签外观不变;没有金额列的列表卡片与原来一样。回滚即还原本 PR 两个源文件。
  • 先看:ui/packages/plugin-grid/src/ObjectGrid.tsx(amountCol 的选取规则与金额行)、ui/packages/components/src/renderers/form/form.tsx(页签条 max-sm: 样式与把当前页签滚入可见区的 effect)、ui/packages/plugin-grid/src/__tests__/phoneCardAmount-34615.test.tsx。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/phoneCardAmount-34615.test.tsx packages/components/src/renderers/form/__tests__/form-field-tabs.test.tsx,预期两个文件全部通过。
  • 需要你做的:无,席位落地

What changes

Phone list card (buildMobileCardRenderer). The card's amount is now the first shown body column whose resolved field type is currency (the column draft's type; no new metadata key). It no longer takes a subtitle slot. When the list has such a column, every card draws an amount line under the subtitle: the status chip on the left (min-w-0 truncate) and the amount on the right (ml-auto shrink-0 whitespace-nowrap tabular-nums, drawn through the column's own desktop cell, so the currency rules of objectui#10423 still hold). The subtitle takes the next shown column instead. A masked amount column is not promoted. A list with no currency column keeps the objectstack#28484 row unchanged (chip at the right), and its pins still pass untouched.

Form field-tab strip (fieldTabs). I took the scroll route rather than a 「More」 menu. The scroll route meets acceptance 2 with no i18n key, no overflow measurement and no second control to keep in sync with the error markers. Below sm the horizontal strip gets max-w-full overflow-x-auto overflow-y-hidden justify-start, with no scrollbar drawn ([scrollbar-width:none] and [&::-webkit-scrollbar]:hidden, the idiom record-path.tsx and studio-tokens.ts already use). An effect keyed on the active tab moves only the strip's own scrollLeft so the active trigger is inside its window. That covers a tap, defaultFieldTab, and a failed submit jumping to the first offending tab, whose red dot rides on the trigger. A strip that fits (every desktop strip) is never touched. Vertical strips are unchanged.

Before/after, real rendered DOM measured in Chromium (method under Verification):

375 px base 62d9d0d9 head
card amount CN¥1,200,000.00 in subtitle, box 75.2 px of 104 px: clipped own line, 121.6 px of 122 px: whole
card amount CN¥94,000.00 (long account name) box 42.6 px of 85 px: clipped whole
page horizontal overflow 165 px 0 px
5-tab strip 523.8 px wide, overflow visible, past the 359 px dialog edge 343 px (= dialog), overflow-x: auto, scrollbar-width: none, scrollWidth 524 > clientWidth 343
5th tab reachable + error dot visible after the scroll n/a (page scrolls) yes / yes

At 1280 px the strip measures 523.8 px with overflow-x: visible on both trees: desktop is unchanged.

Tests

  • New ui/packages/plugin-grid/src/__tests__/phoneCardAmount-34615.test.tsx (375 px): full amount text in its own slot with no truncating box between it and the card; amount out of the subtitle; chip at the left of the amount line; a row with no amount keeps the shape; control without a currency column keeps the objectstack#28484 row.
  • form-field-tabs.test.tsx gains a top-level describe (the shared field-tabs harness, per the shared-harness rule): phone-gated classes, with no ungated overflow-* / max-w-* tokens; the vertical strip is left alone; tap, failed submit and defaultFieldTab each scroll the 5th tab into a stubbed 343 px strip; control: a strip that fits is never scrolled. jsdom has no layout engine, so the geometry is stubbed there and was measured in Chromium once (below).
  • mobileCardFieldCurrency-10423.test.tsx reads the amount from grid-card-amount instead of the first subtitle part (the same assertion, at the slot the amount now occupies).
Ablations (each mutation landed on disk via scripts/ablation-replace.mjs, then restored: blob == HEAD, git diff HEAD empty)
  • amountCol predicate → false: 10 red / 4 green (all four 34615 card cases and the six 10423 card-amount cases red; the 34615 control and the three 10423 desktop controls green), as predicted.
  • Tab effect trigger → null: tap, failed-submit and defaultFieldTab cases red, 3 green (classes, vertical, fits-control), as predicted.
  • Phone classes line → '': the class case red, the rest green, as predicted.

Acceptance notes

  • Acceptance 1 and 2 were measured at 375 px on the real rendered DOM of these components (jsdom render dumped to HTML, Tailwind v4 compiled from the classes present, Chromium at 375 x 812), not in a running Console with the CRM 商机 metadata. A permanent geometry pin in the ui/e2e Playwright style would sit outside this claim's file surface, so this PR does not add one.
  • On the scroll route, a second errored tab that is not the active one shows its dot once it is swiped into view. A failed submit always activates and scrolls to the first offending tab.
  • A vertical (left/right) field-tab strip on a phone is unchanged. It was not part of this card.
  • Docs: no page under content/docs/** or the two package READMEs describes the card's layout or the strip's overflow, so nothing published became false.

Verification

Local gates at a40a744 (exit codes captured before any pipe)

Derived union (node scripts/pm/dispatch-gates.mjs --commands, 39 families), run at a40a744:

  • node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
  • node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
  • node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
  • node scripts/check-closing-keyword-parity.mjs :: exit 0
  • node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
  • node scripts/check-comment-mask-corpus.mjs :: exit 0
  • node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
  • node scripts/check-empty-changeset.mjs --self-test :: exit 0
  • node scripts/check-sdui-manifest.mjs :: exit 0
  • node scripts/check-sdui-manifest.mjs --self-test :: exit 0
  • node scripts/ci/snapshot-next.mjs --self-test :: exit 0
  • node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
  • node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
  • node scripts/release-pending-publish.mjs --self-test :: exit 0
  • pnpm --dir ui exec vitest run scripts/ :: exit 0
  • pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
  • pnpm check:adr-anchors :: exit 0
  • pnpm check:changeset-gate-self-tests :: exit 0
  • pnpm check:closed-ceremony-text :: exit 0
  • pnpm check:cross-package-test-inputs :: exit 0
  • pnpm check:dispatcher-error-vocabulary :: exit 0
  • pnpm check:driver-memory-census :: exit 0
  • pnpm check:engine-double-contract :: exit 0
  • pnpm check:error-status-conformance :: exit 0
  • pnpm check:gitlink-declared :: exit 0
  • pnpm check:nul-bytes :: exit 0
  • pnpm check:published-files :: exit 0
  • pnpm check:query-options-erasure :: exit 0
  • pnpm check:refd-timer-probe :: exit 0
  • pnpm check:registry-log-declared :: exit 0
  • pnpm check:rest-log-spy-declared :: exit 0
  • pnpm check:skill-identifier-liveness :: exit 0
  • pnpm check:test-source-alias :: exit 0
  • pnpm check:tier-file-adoption :: exit 0
  • pnpm check:type-check-coverage :: exit 0
  • pnpm check:type-check-debt :: exit 0
  • pnpm check:undeclared-dep-imports :: exit 0
  • pnpm check:watch-hint-literal :: exit 0
  • pnpm check:where-matcher :: exit 0

dispatch-gates --ran: 39 derived, 39 run, 0 NOT-MEASURED (a derived zero: all 39 carry an exit code).

Targeted, beyond the derived list:

  • pnpm --filter @object-ui/plugin-grid --filter @object-ui/components run type-check :: exit 0 (both tsc --noEmit && tsc -p tsconfig.test.json; the test programs list the touched test files)
  • pnpm --dir ui exec vitest run packages/plugin-grid/ packages/components/ packages/app-shell/src/views/ObjectView.cardFacesOpenNothing-33548.test.tsx :: exit 0 (Test Files 768 passed, 1 skipped; Tests 7095 passed, 24 skipped)
  • pnpm --dir ui check:new-line-citations :: exit 0 (0 new citations)
  • node scripts/pm/overlap-check.mjs --branch=claude/issue-34615-phone-card-amount-tabs :: exit 0 (clean against origin/main and feat(plugin-form): section navigation for stacked sectioned forms #34642, which shares form.tsx)
  • Dependency closure pnpm turbo run build --filter='@object-ui/plugin-grid^...' --filter='@object-ui/components^...' --concurrency=2 :: exit 0 (53/53 tasks)

Not run locally, owned by CI: the type-check lanes (Type Check UI, workspace typecheck), pnpm lint, test:repo, full dogfood (n/a: no !, no narrowing arm).

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


Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

CI red on a40a744 · runner timeout, re-run by a main merge

  • Test UI (aggregate) is red because shard 2/16 (job 133881208836) hit the 30-minute job limit ("The job has exceeded the maximum execution time of 30m0s") and was cancelled before its summary.
  • The one × in that shard's log is ResourceEditPage.heldBadName-27865.test.tsx (b), which ran 8805 ms against its own 8000 ms findBy/waitFor budget. That is the metadata-admin edit page; this PR touches neither it nor its form path's behaviour in jsdom (the new tab-strip effect returns early when scrollWidth <= clientWidth, which is always true in jsdom).
  • Every other check on a40a744 passed. The relay rerun-failed does not take a cancelled shard, so origin/main was merged in by relay pr_update_branch (run 44040796658, clean merge commit 49b15fe), which re-runs every workflow. If (b) reds again on the new head I will reproduce it locally before saying more.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

席位核对 · L1 (seat 3, L1-a) · 2026-11-17T08:06Z

L1: ACCEPT
Head-sha: 49b15fe
Card: #34615 · claim 6939332200 · os-dev-report 6941285145 (head a40a744) · CI note 6941957261

Both card items are built inside the claim's surface. Every new class is phone-gated, and a list with no currency column is unchanged. The head is a clean main merge over the reported a40a744. No must-fix and no should-fix.

Must-fix

None.

Should-fix

None.

Readings that hold

Item Reading
PR shape Draft, base main, Fixes #34615, with no other closing verb. No ! and no (narrowing), so no dogfood battery is owed.
Scope 6 files: ObjectGrid.tsx (+33/−7), form.tsx (+33/−1), the new phoneCardAmount-34615.test.tsx, a new describe in the shared form-field-tabs.test.tsx harness, a repointed mobileCardFieldCurrency-10423.test.tsx, and the changeset. All are inside claim 6939332200 (plugin-grid/src/**, components/src/renderers/form/**, .changeset/). tabs.tsx is not touched: TabsList already forwards its ref.
Merge head 49b15fe9 has parents a40a7445 and main b1da9f55 (which carries #34642's section nav in form.tsx). git show --remerge-diff 49b15fe9 is empty, so there is no hand resolution. form.tsx on this head carries both #34642's FormSectionNavContext and this PR's fieldTabListRef. git diff origin/main...49b15fe9 is the same 6 files, +388/−13.
(1) Tab strip classes The horizontal arm adds max-sm:max-w-full max-sm:justify-start max-sm:overflow-x-auto max-sm:overflow-y-hidden and the hidden-scrollbar pair, all max-sm:. The vertical arm is unchanged. A pin asserts there is no ungated overflow-* / max-w-* token. From sm up the classes do not apply, so desktop is unchanged (measured: 523.8px, overflow-x: visible on both trees at 1280).
(2) Active-tab effect Keyed on activeFieldTab. It returns when scrollWidth <= clientWidth, so every fitting strip, every desktop strip and jsdom is untouched. It moves only list.scrollLeft by the trigger's overhang, never scrollIntoView and never an outer scroller. It covers a tap, defaultFieldTab and the failed-submit jump, and each is pinned against a stubbed 343px strip. A "strip that fits is never scrolled" control is included. The scroll route is one of the two the card offers (要做的 2), and it adds no i18n key.
(3) Phone card amount amountCol is the first body column, not the status column, with c.type === 'currency' and not masked. It is drawn through the column's own desktop cell (cardCell), so objectui#10423's currency rules hold, and the repointed 10423 file still asserts them at grid-card-amount. Classes: ml-auto shrink-0 whitespace-nowrap tabular-nums, so the amount is never truncated. The status chip moves to that line's left (min-w-0 truncate), and the subtitle takes the next column. With no currency column, statusOnAmountLine is false and the #28484 row (chip at the right, max-w-[45%]) is drawn as before. phoneCardRow-28484 passes unedited.
Clause-② / Metadata-protocol no / none in the claim, PR body and changeset. No export, no key and no locale string. data-testid="form-tab-strip" and the card test ids are DOM hooks, not API.
Changeset patch on @object-ui/plugin-grid and @object-ui/components, the two published packages whose src moved. Both bullets match the code, including "A list with no currency column draws its cards as before" and "Desktop strips and vertical strips are unchanged".
Tests Real commands with output: 768 files / 7095 tests under the lock, plus type-check for both packages. Three ablations: amountCol → false gives 10 red; the effect's trigger → null gives 3 red; the class line → '' gives 1 red. Each is restored with git diff HEAD empty. 39/39 derived gates.
UI strings None added.
Docs Searched content/docs, skills, packages/spec/src and the plugin-grid README for the phone card layout and the field-tab strip's overflow. None describes them, so nothing is made false.
Acceptance 1: CN¥1,200,000.00 whole at 375 (121.6px box of 122px, was clipped at 75.2 of 104). 2: page overflow 0 (was 165px), the strip is 343px with scrollWidth 524 > clientWidth 343, and the 5th tab and its error dot are visible after the scroll. Both were measured on the components' real DOM with compiled Tailwind in Chromium. The live Console with CRM metadata is declared NOT MEASURED.
Tier check-governed-merges --pr 34695: NOT governed, 401 lines. Tier S, lands through o3-C.
CI on this head 58 check-runs, all success or skipped, none pending: Test UI 16/16 shards plus the aggregate, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Check Changeset, Lint & Repo Gates and TypeScript Type Check. The earlier shard 2/16 red on a40a744 was the 30-minute job limit (6941957261). It is green here.

Notes

  1. No e2e geometry pin. The 375px readings were taken once, and the jsdom pins hold the class contract and the scroll arithmetic. A ui/e2e Playwright pin for both readings would make them re-derivable in CI. That is outside this surface; the report records it as a carrier-less note.
  2. Stale comment above isMaskedCardColumn: it still mentions field-name branches for amount and stage that no longer exist (report out-of-scope finding 2). It costs nothing to fix next time the file is touched.
  3. Signature line (point 4 of the request): the plain-text signed: line is not an L1 bar. The os-dev.md / standard-order mismatch is the seat's to reconcile. No patch is needed for this verdict.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing · area o3-C · head 49b15fe

Probe Reading
check-governed-merges.mjs --pr 34695 NOT governed; 401 changed lines (+388/−13) ≤ 3000 → Tier S
CI + review L1 ACCEPT 6942387084 on this head (a clean relay main merge over a40a744, remerge diff empty); 45 check-runs success, 13 skipped, 0 failed; mergeable clean; K = 2. The earlier Test UI red on a40a744 was a shard job timeout (6941957261).

State: ready + auto-merge now; on MERGED, #34615 closes via Fixes and its pm:* state label comes off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

手机端:列表卡片的金额被截断;表单页签在 375 宽下横向溢出

2 participants