Skip to content

fix(ui): on a phone the record page keeps Edit in its bottom bar, a compact stage bar and two-column key fields - #34684

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-34595-phone-record-page
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/issue-34595-phone-record-page

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

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

Fixes #34595

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:手机记录页三处——底栏在可编辑记录上固定为「编辑 + 主操作 + ⋯」;阶段条在窄屏改为紧凑模式(进度条 + 「第 N 步,共 M 步 · 当前阶段全名」,点开列出全部阶段并可切换);手写记录页的关键字段条在窄屏改为两列栅格。桌面不变。
  • 为什么改:实测商机在 375 宽下「编辑」被两个自定义动作挤进更多菜单第 5 项;7 个阶段被截成「Pr… Q… Ne…」读不出当前阶段;6 个关键字段每行一个占满首屏。
  • 风险与回滚:只改三个渲染文件的窄屏分支,无元数据、无 spec、无新 i18n key、无导出改动。底栏顺序改变了 console mobile (≤ 640 px): list as card rows with view chips and a FAB, the record page with a compact header, sticky tabs and a bottom action bar, related records pushed as full pages with a path row and back — the record is always a page on a phone #27058 当时的实现选择(宿主按钮排在页面动作之后)。回滚即 revert 本 PR。
  • 先看:ui/packages/components/src/renderers/layout/containers.tsx(barQueue 那一处排序)、ui/packages/plugin-detail/src/renderers/record-path.tsx(Mobile: compact path 块)、ui/packages/plugin-detail/src/HeaderHighlight.tsx(max-sm:grid 两行)。
  • 两分钟验证:手机宽度(375)打开一条可编辑的商机,预期底栏是「编辑」「生成报价单」「⋯」,阶段条下方一行写「第 5 步,共 6 步 · 商务谈判」且点开能看到全部阶段,关键字段两列三行。
  • 需要你做的:无,席位落地。

What changes

  1. Phone bottom bar (containers.tsx, PageHeaderActions bar face). The bar's queue is now: the host's buttons first (on an editable record, Edit), then the primary action (the first action declaring variant: 'primary', else the first action), then the page's other actions. With the default budget of two the bar is Edit, the primary, then the ⋯. This changes the queue order objectstack#27058 introduced, where the host's buttons queued after the page's own actions, so a page with two record actions pushed Edit into the ⋯. A destructive host action (sys_delete) is still never a bar button and always folds. page:header.mobileMaxVisible still sets the budget: with 1 the slot is Edit's, with 3 the next page action joins. A record the reader cannot edit (no host Edit) keeps the primary and one more, as before. The desktop row is unchanged.
  2. Compact stage bar (record-path.tsx, below sm). The old phone row (an equal share per stage, labels truncated) is replaced by: one decorative rail segment per stage (no names), then a summary button reading the step and the current stage's full name, e.g. "Step 5 of 6 · Negotiation", through the existing form.stepOf key. The step counts the forward stages (open stages plus the won terminus); a record on a lost stage shows that stage, marked lost, with no step; a record on no stage shows the path's name. Pressing the summary toggles (aria-expanded) a list of every stage by its full name; on a path with allowStageChange each reachable stage there is the same useStageChange press, behind the same field-access and state-machine gates, as on desktop. The mode is internal and viewport-driven: no prop was added to RecordPathProps, no new locale key. The desktop rail is unchanged.
  3. Key-field strip on a hand-written page (HeaderHighlight.tsx, non-grid branch, below sm). The row becomes max-sm:grid max-sm:grid-cols-2 max-sm:gap-x-4 max-sm:gap-y-3, the default page's phone grid, and each chip one cell (max-sm:basis-full replaced by max-sm:min-w-0), so six fields read as three rows. Badge truncation and relative-time wrapping are untouched (that is 窄记录抽屉:关键字段里的徽标被截成一个字母,相对时间逐词换行 #34614).

Why

The card's three acceptance items, measured on staging at 375 px: Edit was the fifth entry of the ⋯; the 7-stage path read "Pr… Q… Ne… Pr…"; the six key fields took one line each.

Tests

New pins:

  • ui/packages/components/src/__tests__/page-header-phone-bar-27058.test.tsx, new top-level describe "the phone bar keeps Edit visible on an editable record (objectstack#34595)": the opportunity case ([Edit][Generate Quote][⋯], the primary picked by variant, filled; Clone and Print and Delete in the ⋯, Delete last), mobileMaxVisible: 3, a non-editable record (no host Edit) keeping the primary and one more, the no-action case, and a desktop control (row order unchanged). Placed in the existing phone-bar harness file rather than a new file, per AGENTS.md's shared-harness rule (ruling record 6583487846).
  • ui/packages/plugin-detail/src/renderers/__tests__/record-path.compact-34595.test.tsx (8 cases): compact block only below sm; rail segments decorative with states; summary reads "Step 5 of 6" plus the full name (and the zh stepOf copy); the summary opens and closes the full list with aria-expanded, and the list is the button's next sibling with no generated id (fix round bc7e812: a useId id/aria-controls broke record-block-record-reach.test.tsx's same-record-twice byte check); lost and no-stage readings; desktop control.
  • ui/packages/plugin-detail/src/__tests__/HeaderHighlight.phoneGrid-34595.test.tsx (4 cases): the row's two-column phone grid; six chips one cell each, wide types included; desktop control (wrapping row, separators); default-page grid control.

Assertion-only edits to existing tests that pinned the old behaviour, each citing #34595:

  • page-header-phone-bar-27058.test.tsx: the three bar-order cases now expect Edit first (plus an optional hostActions prop on the file's two hosts for the new describe, and a module-top import '@object-ui/react-runtime' that check:test-source-alias requires of an edited file).
  • ui/packages/app-shell/src/views/RecordDetailView.phoneFace-27058.test.tsx: the two bar-order cases (the real record view with synthesized sys_edit) now expect [Edit][Convert Lead].
  • record-path.phoneRow-26897.test.tsx: the two equal-share / truncation cases now pin the compact path (rails one equal share, list labels wrapping).
  • HeaderHighlight.lineFitAndPhoneLayout-12523.test.tsx: the phone layout token list (max-sm:min-w-0 instead of max-sm:basis-full).

Deviation from the claimed file surface, declared: ui/e2e/record-path-phone-row.spec.ts (the Chromium geometry pin that read the old phone row's constants out of record-path.tsx) is rewritten rather than assertion-edited, because the row it measured no longer exists; it now measures the compact path's rail and summary at 320/375/390 px.

Ablations (each a committed fix, mutated through scripts/ablation-replace.mjs, restored to the HEAD blob with an empty git diff HEAD):

Acceptance notes

  • Claim surface amendment 6940603112 (area o3-A): the out-of-surface test pins and the rewritten ui/e2e/record-path-phone-row.spec.ts are covered.

  • Deviation from the card's "Edit one slot, the primary the other" (accepted by seat repo:objectstack#3): on a queue record where the host offers Claim (sys_claim, a host button ordered ahead of Edit), Claim and Edit fill the default two slots and the primary folds; mobileMaxVisible: 3 shows all three. The card names only Edit and the primary; host buttons leading the bar matches the desktop rule that a host button never folds. Reason: on a queue record Claim is the task, so it keeps a visible slot.

  • An approval-locked record still draws Edit in its slot, disabled (the desktop behaviour); the card's "editable" reading is "the host offers Edit".

  • The figure's 「已停留 7 天」 (days in stage) is not built: no such reading exists on the path and the card's items do not ask for it.

  • The bar buttons keep equal widths (flex-1, pinned by e2e/record-flow-phone-targets.spec.ts); the figure's narrower Edit is a sketch detail.

  • ui AGENTS.md ✨ Set up Copilot instructions #2 asks for README / content/docs/frontend/ updates; no page there describes the phone bar order, the phone stage row or the phone strip, so none was edited.

Verification

All on head fa5f2a016d unless noted; logs folded.

Targeted tests (plugin-detail and components packages, two app-shell record-page files)
pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/ packages/components/ packages/app-shell/src/views/RecordDetailView.phoneFace-27058.test.tsx packages/app-shell/src/views/RecordDetailView.recordPageTiers-26678.test.tsx
 Test Files  865 passed | 2 skipped (867)
      Tests  8059 passed | 42 skipped (8101)
os-verify-lock: VERDICT command-exit 0

Also green before the main merge (same diff): actionDialogFocus-27521, RecordDetailView.onSuccessNavigateHost-13396, RecordDetailView.accessEndedAfterDecision-26589 (4 files, 56 tests).

Type check
pnpm --workspace-concurrency=2 --filter @object-ui/plugin-detail --filter @object-ui/components run type-check
ui/packages/components type-check: Done
ui/packages/plugin-detail type-check: Done
os-verify-lock: VERDICT command-exit 0

@object-ui/app-shell type-check (an assertion-only test edit there) is left to CI's Type Check UI.

Derived gate families (dispatch-gates --commands, 38 families)

Every command in the derived list exited 0, including check:test-source-alias, check:nul-bytes, check:cross-package-test-inputs, check:published-files, check:type-check-coverage, check:type-check-debt (0 raw tsc error(s) total), the changeset gates, and pnpm --dir ui exec vitest run scripts/ (Test Files 171 passed | 2 skipped, Tests 5077 passed | 2 skipped). Reconciliation: Run reconciliation — 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN.

ui lint on the changed files: 0 errors, 124 warnings (all pre-existing no-explicit-any warnings). check:new-line-citations: 0 new citation(s). Full lint farm: CI.

Chromium at 375 px

ui/e2e/record-path-phone-row.spec.ts and ui/e2e/record-flow-phone-targets.spec.ts with the preinstalled Chromium: 10 passed (the compact rail fits at 320/375/390 with equal segments, the current stage name is whole on a 44 px target, a long name wraps, a 20-stage rail fits; the bar's 44 px targets unchanged). Run on commit 62a7d5e107, whose record-path.tsx and spec blobs are byte-identical at head.

The key-field strip, from a throwaway fixture with real Tailwind compiled for the classes read out of HeaderHighlight.tsx (not committed): at 375 px columns=2 rows=3 for the six opportunity fields; at 1280 px columns=6 rows=1 (the wrapping row, unchanged).

NOT MEASURED: the live Console against a running backend at 375 px, reason: no stack was started in this session; the three items are covered by the unit pins above and the fixture readings.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX

@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
…o a render is stable for the same record

Claude-Session: https://claude.ai/code/session_01WGufzg2evNa1V3zxrQq3KX
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

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

L1: ACCEPT
Head-sha: bc7e812
Card: #34595 · claim 6938560309 · surface amendment 6940603112 · os-dev reports 6940580900 (head fa5f2a0) and 6941163170 (fix round, head bc7e812)

The three card items are built as asked, the desktop paths are untouched, and every out-of-surface test file is covered by the amendment. The fix round's cause and repair are read and hold. No must-fix and no should-fix. The notes below are for the seat and are not bars.

Must-fix

None.

Should-fix

None.

Readings that hold

Item Reading
PR shape Draft, base main, Fixes #34595, with no other closing verb. No ! and no (narrowing), so no dogfood battery is owed.
Scope 11 files: the three claimed sources (containers.tsx +17/−11, record-path.tsx, HeaderHighlight.tsx), two new tests named by card, the changeset, four existing tests and the rewritten ui/e2e/record-path-phone-row.spec.ts. The amendment 6940603112 names all four existing tests and the e2e rewrite. No source file is outside the original surface, and no locale file is touched.
Clause-② / Metadata-protocol Clause-②: no, Metadata-protocol: none in the claim, amendment, PR body and changeset. Read against the diff: no export is added (PageHeaderActionsProps.face only changes its jsdoc, and RecordPathProps is untouched). There is no spec, schema or locale key. form.stepOf and detail.pathLabel are existing keys. page:header.mobileMaxVisible keeps its meaning as the bar's budget.
Changeset patch on @object-ui/components and @object-ui/plugin-detail, the two published packages whose src moved. @object-ui/app-shell is private and only its test moved. Sentences read against the diff:
• "On an editable record the bar is now Edit, the primary action, then the ⋯" = barQueue = [...ranked.filter(isHostButton), primary?, ...authoredButtons], deduped, with inlineActions = barQueue.slice(0, maxVisible).
• "A destructive host action (Delete) still always goes in the ⋯" = isHostButton excludes it, so it never enters the queue.
• "A record the reader cannot edit keeps the primary and one more" = no host button, so the queue starts at the primary.
• "The step counts the forward stages; a record on a lost stage … with no step" = total: forwardStages.length. forwardStages is pathStages.slice(0, firstLostIdx) and the lost group is the suffix, so currentIdx + 1 is the forward position. phoneStep is null when currentInLost.
• "each reachable stage there moves the record, behind the same permission and state-machine checks" = the list lines go through the same renderStage, whose press is stageChange.pressable && state !== 'current' && stageChange.admits(...).
• "Below sm the strip is a two-column grid" = max-sm:grid max-sm:grid-cols-2 on the row and max-sm:min-w-0 on each chip.
All true. Desktop: the row face keeps isHostButton(a) || inlineAuthored.has(a) over authoredButtons.slice(0, maxVisible), the same set as before. The desktop rail block is untouched, and the strip's max-sm: tokens do not apply from sm up.
Fix round (bc7e812) Root cause: React.useId in the compact list made two renders of the same record differ, so record-block-record-reach.test.tsx's byte-identity control failed. The fix removes the id and aria-controls. The list is the button's next sibling and aria-expanded carries the open state, and the new test pins both. The red leg (record-path.tsx from fa5f2a0 makes 1 of 13 fail in that file) and the green leg (114 files / 1178 tests) are in report 6941163170. Restored, with git diff HEAD empty.
Existing-test edits Each one changes only the pinned order or layout tokens to the new behaviour and cites #34595, and none drops a guard. The bar tests still assert that Delete is last in the ⋯ and that the header draws no action row. They also add not.toContain('Edit') in the ⋯. record-path.phoneRow-26897 keeps "no truncate, no whitespace-nowrap", adds [overflow-wrap:anywhere], and drops the title pin because the label is no longer cut. HeaderHighlight…12523 swaps max-sm:basis-full for max-sm:min-w-0 and keeps the other three tokens.
E2E rewrite record-path-phone-row.spec.ts still reads its classes out of record-path.tsx at run time (PHONE_RAIL_ROW_CLASS, PHONE_RAIL_SEGMENT_CLASS, PHONE_SUMMARY_CLASS, PHONE_SUMMARY_STAGE_CLASS), so the source and its geometry pin cannot drift apart. It measures 320/375/390 px, a wrapping long name, and a 20-stage rail.
UI strings The only visible strings are t('form.stepOf', …) and t('detail.pathLabel'). stepOf is in all 11 packs (zh-Hans 第 {{current}} 步,共 {{total}} 步), and so is pathLabel (zh-Hans 记录路径). The inline defaultValue matches en byte for byte. · and ✗ are aria-hidden glyphs.
Docs Searched content/docs, skills and the ui READMEs for the phone bar order, the phone stage row and the phone highlight strip. None describes them, so nothing is made false (see Notes 1 for an older sentence).
Acceptance 1: [Edit][Generate Quote][⋯] is pinned in the components harness and in the app-shell record page ([Edit][Convert Lead][⋯]). 2: "Step 5 of 6 · Negotiation" plus the zh copy is pinned, and Chromium shows the name whole at 320/375/390. 3: six chips in three rows is pinned by class, and a compiled-Tailwind fixture reads columns=2 rows=3 at 375 px. The live Console at 375 px is declared NOT MEASURED.
Tests Real commands with output: 865 files / 8059 tests on fa5f2a0 under the verify lock, plus the fix-round legs on bc7e812. Three ablations: 5/11, 1/4 and 2/8 red, each restored to an empty git diff HEAD. 38 derived gates, 38 run.
Tier check-governed-merges --pr 34684: NOT governed, 0 of 11 paths, 833 lines. Tier S, lands through o3-A.
CI on this head 62 check-runs, all success or skipped, none pending. Test UI 16/16 shards plus the aggregate are success, so the fa5f2a0 red shard 11/16 is green on this head. Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Check Changeset, Lint & Repo Gates, TypeScript Type Check, Governed Surface Queue Guard and PR-body guards are all success.

Notes

  1. An older page doc does not describe the phone bar (not made false here). The generated content/docs/ui/components/page.mdx (from the spec description) says host buttons "take no slot and never fold" and mobileMaxVisible defaults to 1. On the phone bar Edit has taken a slot since console mobile (≤ 640 px): list as card rows with view chips and a FAB, the record page with a compact header, sticky tabs and a bottom action bar, related records pushed as full pages with a path row and back — the record is always a page on a phone #27058, and the bar's budget is PHONE_ACTION_BAR_BUTTONS = 2. That was already true before this PR, and the text lives in packages/spec, outside this surface. A p3 docs card would line it up with the bar face.
  2. The strip reverses objectui#12523's full-line choice on purpose. That PR kept one chip per line because a ~150 px cell cuts a phone number or email and a touch screen cannot hover a title. Card item 3 (maintainer epic 专题:控制台核心业务操作体验(详情、表单与子表、审批、通知、手机端、应用与 Studio 往返、云端入口) #34571) asks for two columns, and the PR comment says so. Long phone and email values now end in an ellipsis on a phone. That ties to 窄记录抽屉:关键字段里的徽标被截成一个字母,相对时间逐词换行 #34614 (badge truncation and wrapping, serial after this card).
  3. Lost stage in the compact summary. The ✗ and the destructive colour are visual only, so on a lost record the summary button's accessible name is just the stage label. The list lines still announce state through stageAriaLabel. Small, and not in the card.
  4. Declared deviation: Claim plus Edit on a queue record. On a queue record the primary folds when Claim is offered. Host buttons lead, and mobileMaxVisible: 3 shows all three. The PR body records that the seat accepted it. I read it as consistent with the desktop rule that a host button never folds.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing · 2026-11-17T07:47Z · area o3-A

Probe Reading
check-governed-merges.mjs --pr 34684 NOT governed (0 of 11 paths hit the register) · 833 changed lines (+654/−179) ≤ 3000 · Tier S
L1 + checks on head f5ff317eb1033917bd0963dcff2ef23ef175957f L1-a ACCEPT 6941562972 at bc7e812; o3-A then merged origin/main (17 first-parent commits behind, landing rule K ≥ 15), a clean merge with no conflict, overlap-check exit 0, the PR's own 11-file patch unchanged · 58 check-runs on the merge head: 45 success, 13 skipped, 0 failing · mergeable_state clean · main 1 commit ahead since; this PR touches no locale or skills budget input

State: pr_ready + automerge_enable now; #34595 closes on merge via Fixes. Declared deviation (Claim + Edit take the two phone-bar slots on a claimable queue record, primary in ⋯) accepted by the seat.

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/l tests 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.

手机端记录页:底部操作栏里「编辑」被自定义动作挤进更多菜单;阶段条文字全部被截断

2 participants