Skip to content

fix(app-shell): the list title no longer prints a record count beside the view name - #34634

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-34603-switcher-count
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-34603-switcher-count

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #34603
Clause-②: no
Metadata-protocol: none
File surface amended: content/docs/ui/views.mdx, per L1 REWORK 6938542041 (claim amendment 6938557606).

维护者速读

  • 改了什么:控制台列表标题(即视图切换器)不再在视图名后面显示「· 记录数」,桌面和手机都一样;列表底部的「N records」不变。
  • 为什么改:维护者 2026-11-17 原话「列表视图切换的位置也不应该有记录数,这个有点反人类」,撤回 Console lists: the list-view switcher becomes a dropdown on the list title (search, pinned default, recent), the flat view-tab row retires, and a starred view appears in the sidebar's 收藏 group #27594 那一轮有意加的计数。
  • 风险与回滚:只删显示和喂它的那条内部连线(viewTotal 状态与列表的 onTotalChange 回调),不动元数据、接口和底部计数;回滚 = revert 本 PR。
  • 先看:ui/packages/app-shell/src/views/objectViewTitleSwitcher.tsx(删掉的计数 span 与 count 属性)、ObjectView.tsx(删掉的 viewTotal)、ObjectView.titleViewSwitcher-27594.test.tsx(手机端底部计数的钉子)。
  • 两分钟验证:打开任一对象列表,标题应是「对象 / 视图名 ▾」,后面没有数字;底部仍有「N records」;手机宽度下同样只在底部看到记录数。
  • 需要你做的:无,席位落地。

What changes

The Console list title, which is the view switcher, drew 「VIEW ▾ · COUNT」 (data-testid="list-view-switcher-count"). It now draws 「VIEW ▾」 on every width, per the maintainer's ruling quoted on #34603.

  • objectViewTitleSwitcher.tsx: the count span and the count prop of ObjectViewTitleSwitcher are removed; useObjectViewTitleSwitcher no longer takes viewTotal.

  • ObjectView.tsx: the viewTotal state and handleListTotalChange are removed; objectViewListRenderer.tsx no longer passes onTotalChange to ListView (it fed nothing else). ListView's optional onTotalChange itself is untouched; the list-view page block's tab badge still uses it.

  • Public surface: @object-ui/app-shell is private: true and its package entry does not export the switcher, so removing the prop narrows nothing published. The change ships to users through @object-ui/console, hence the patch changeset on both (precedent: other app-shell changesets).

  • Phone (acceptance 2): measured, not assumed. ListViewCompactHeader draws only in the compact posture of the list-view page block (a page region narrower than half the page), never on the Console object list. The object list's footer record-count-bar has no phone-only hiding class, and at 390 px it renders 「1 record」 outside the toolbar's leading slot (new assertions in the 27594 test). So the phone keeps exactly one count, in the footer, away from the view name; no plugin-list change was needed. The card's note that the footer is hidden on a phone did not hold in the source at 97defd60.

  • ui/e2e/list-toolbar-view-name-phone.spec.ts: its fixture drops the · 10 span (it read the count element's classes from the switcher source, which would now throw).

  • ObjectView.titleViewSwitcher-27594.test.tsx gains the module-top import '@objectstack/lint' that check:test-source-alias asks of an edited test reaching the dynamic import.

  • Fix round 1 (L1 6938542041): content/docs/ui/views.mdx § Switching views drops the count clause and the · 12 from the example (now Leads / My Leads ▾) and says the record count is in the list's footer. Four stale title comments (objectViewPageHeader.tsx ×2, ObjectView.tsx, ObjectView.objectListTitle-27950.test.tsx) now read 「OBJECT / VIEW ▾」 or 「VIEW ▾」; the 27950 test also gains the module-top import '@objectstack/lint' that check:test-source-alias asks of an edited test. git grep -nE "▾ · |VIEW ▾ · COUNT|number of records the view holds" ui content skills (CHANGELOGs aside): 0 hits.

Out of scope, unchanged: the list footer's record count and summaries.

Tests

Head 44015884, origin/main base 97defd60 (overlap-check: merges cleanly).

Fix round 1, head a4a08660: vitest on ObjectView.objectListTitle-27950, ObjectView.titleViewSwitcher-27594, objectViewTitleSwitcher, objectViewTitleSwitcher.phoneWidth-29074: 4 files, 34 tests passed, exit 0. dispatch-gates --commands for the new change set derived 70 commands (the 38 above plus docs families such as check:docs, check:doc-anchors, check:doc-authoring); all 70 exit 0; --ran: 70 derived, 70 run, 0 NOT MEASURED, 0 UNRUN. overlap-check clean before each push.

app-shell vitest (touched and neighbouring files)

pnpm --dir ui exec vitest run --maxWorkers=2 on objectViewTitleSwitcher.test.tsx, ObjectView.titleViewSwitcher-27594.test.tsx, objectViewTitleSwitcher.phoneWidth-29074.test.tsx, ObjectView.objectListTitle-27950.test.tsx, ObjectView.chartViewTabs-13114.test.tsx, ObjectView.recordCountFooter-10636.test.tsx, ObjectView.starredView-27594.test.tsx: Test Files 7 passed (7), Tests 54 passed (54), lock VERDICT command-exit 0. After the last commit the two edited files re-ran: 2 files, 22 tests passed, exit 0.

Ablation (one, on the changed behaviour)

Fix committed first. node scripts/ablation-replace.mjs re-inserted a list-view-switcher-count span after the switcher's popover (anchor 1 to 0, blob 60485dd9 to 7f0f0572). The three new assertions went red (the unit title test, the desktop title test, the phone footer test): Test Files 2 failed, Tests 3 failed / 19 passed, exit 1. Restored with git checkout HEAD --: git diff HEAD empty, working-file hash equals the HEAD blob.

Type check and lint
  • pnpm --filter @object-ui/app-shell type-check (src and tsconfig.test.json): exit 0.
  • eslint --no-inline-config on the six touched ui files: exit 0, 0 errors (warnings pre-existing).
  • The e2e spec is declared to CI (Build & E2E UI).

Verification

Derived gates: 38 of 38 run locally, reconciled with --ran

node scripts/pm/dispatch-gates.mjs --commands derived 38 commands. All exited 0, except pnpm check:test-source-alias, which exited 1 on its first run (it asked the 27594 test for the @objectstack/lint module-top import) and exited 0 after the fix. Among them: pnpm --dir ui exec vitest run scripts/ (171 files passed, 2 skipped; 5077 tests passed), check:duration-unit-keys, check:nul-bytes, check:published-files, check:type-check-coverage, check:type-check-debt, check:adr-0087-registration, check:empty-changeset, check:changeset-no-major and check:sdui-manifest. dispatch-gates --ran: 38 derived, 38 run, 0 NOT MEASURED, 0 UNRUN. check:new-line-citations found 0 new citations.

Families CI runs on the whole tree (Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI and the rest) are left to this PR's check-runs.

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


Generated by Claude Code

… the view name

The view switcher drew 'VIEW ▾ · COUNT'. The count is removed from the
switcher on every width, with the plumbing that fed it (the page's
viewTotal state and the list's onTotalChange wire). The list's footer
still says how many records the view holds, on a phone too.

Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
Co-authored-by: Claude <noreply@anthropic.com>
…ne's footer count

Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
Co-authored-by: Claude <noreply@anthropic.com>
… at collection in the 27594 test

Claude-Session: https://claude.ai/code/session_01WGufziunkXbDT7wUWqfmWz
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s 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
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

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

L1: REWORK
Head-sha: 4401588
Card: #34603 · claim 6937462744 · os-dev-report 6938162064

The code change is right and the premise correction holds (readings below). One published doc is made false by this PR, so it cannot land as is.

Must-fix

  1. content/docs/ui/views.mdx § "Switching views" (lines 402–404 at this head) now states the removed behaviour. It says the switcher reads the view's label and a ▾, "and on a grid the number of records the view holds", with the example Leads / My Leads ▾ · 12. After this PR the title is Leads / My Leads ▾ with no number, so the published page is false. Checklist rule: a published defect this round makes false is fixed in the same PR. Fix: drop the count clause and the · 12 from the example, and if useful say the count is in the list's footer. A grep -nE "▾ · |number of records the view holds" content skills at this head finds only these two lines, so nothing else in docs or skills/** needs the edit.
    • content/docs/** is outside the claim's file surface (ui/packages/app-shell/src/views/**, ui/packages/plugin-list/src/**, ui/e2e/list-toolbar-view-name-phone.spec.ts, root .changeset/). The claim's file surface must be amended to add content/docs/ui/views.mdx in the same round, and the PR body must name the amendment.

Should-fix (same round, cheap)

  1. Source comments this PR makes false, all in the claim's surface:
    • ui/packages/app-shell/src/views/objectViewPageHeader.tsx:36 and :133: 「OBJECT / VIEW ▾ · COUNT」.
    • ui/packages/app-shell/src/views/ObjectView.tsx:1208: 「 ▾ · N」.
    • ui/packages/app-shell/src/views/ObjectView.objectListTitle-27950.test.tsx:15 (header comment): 「OBJECT / VIEW ▾ · COUNT」.
      Found with git grep -nE "▾ · |VIEW ▾ · COUNT" ui at this head. The two files the PR edited were updated; these four lines were missed.

Readings that hold (no change needed)

Item Reading
PR shape Draft, base main, Fixes #34603; no other closing verb in the body (#27594 stands verb-free). No !, no (narrowing): no dogfood battery owed.
Scope 7 files, all inside the claim surface except the must-fix above (which is missing, not extra). No plugin-list change, as the report says.
Published surface (your point 1) Verified. ui/packages/app-shell/package.json has "private": true; its single . export is dist/index.js, and src/index.ts re-exports from ./views/index.js only ObjectView, RecordDetailView, RecordFormPage, DashboardView, PageView, ReportView, SearchResultsPage, ViewConfigPanel, DeclaredActionsBar, FlowRunner plus their types. ObjectViewTitleSwitcher / useObjectViewTitleSwitcher / count / viewTotal are not exported. Nothing published narrows; Clause-②: no is right. ListView's own onTotalChange (published, @object-ui/plugin-list) is untouched; it is only no longer passed here, and the page:tabs badge still uses it (plugin-list/README.md § "The tab badge"). useDisplayLocale is still used at objectViewTitleSwitcher.tsx:457, so the import stays live.
Changeset Names @object-ui/app-shell (private, versioned per privatePackages.version: true; 26 recent changesets name it) and @object-ui/console (not private, the shipping package). Sentences read against the diff: 「VIEW ▾ · COUNT」 → 「VIEW ▾」 "on every width" (span and count prop removed, desktop and phone tests pin it); "count still shown in the list's footer, on a phone too" (see next row); "footer's count and summaries unchanged" (no plugin-list hunk). True.
Premise correction, acceptance 2 (your point 2) Verified at this head. ListViewCompactHeader is drawn only under compactPosture (plugin-list/src/ListView.tsx:6491–6497, objectui#12703); the footer record-count-bar (ListView.tsx:7794–7797) is gated on listChromeShown && (recordCountShown || …) with classes border-t px-4 py-2 flex …, no max-sm:hidden / hidden / sm:flex. The 27594 test pins the phone (390 px) footer reading 「1 record」 outside list-toolbar-leading. The card's "footer hidden on phone" did not hold; the correction is stated in the PR body. Acceptance 2 is met with the footer as the phone's one count.
Acceptance 1 / 3 Met: desktop title reads View 1 only (/^View 1$/ on the switcher's outer span); objectViewTitleSwitcher.test.tsx, ObjectView.titleViewSwitcher-27594.test.tsx and e2e/list-toolbar-view-name-phone.spec.ts all updated as the card names.
Removed CONTROL CONTROL: no count is drawn until the list reports one is deleted; with no count prop left it has nothing to control, and the new title test asserts the absence directly. Fine.
import '@objectstack/lint' in the 27594 test @objectstack/lint is an app-shell dependency (package.json:96); asked by check:test-source-alias for an edited test reaching ObjectView's dynamic import. In surface, justified.
Tests Real commands with output; ablation re-inserts the span and turns the 3 new assertions red (3 failed / 19 passed), restored to the HEAD blob.
Tier check-governed-merges --pr 34634: NOT governed, 0 of 7 paths, 98 lines. Tier S, lands through o3-C after the fix.
CI on this head 51 check-runs: 38 success, 13 skipped, none failing or pending.
Deviations (your point 3) Plain-text signature line and model-free trailers: no action.

Notes

  • Real-browser visual check NOT MEASURED (declared). Acceptable for an S card.
  • After the fix push, send the new head: I owe a delta read (docs sentence + comment lines + the claim amendment), not a full re-review.

@github-actions github-actions Bot added size/m and removed size/s labels Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Fix round 1 (L1 REWORK 6938542041) · head a4a0866

File surface amended: content/docs/ui/views.mdx (claim amendment 6938557606).

  • content/docs/ui/views.mdx § Switching views drops the count clause and the · 12 from the example (now Leads / My Leads ▾) and says the record count is in the list's footer.
  • Four stale title comments (objectViewPageHeader.tsx ×2, ObjectView.tsx, ObjectView.objectListTitle-27950.test.tsx) now read 「OBJECT / VIEW ▾」 or 「VIEW ▾」; the 27950 test gains the module-top import '@objectstack/lint' that check:test-source-alias asks of an edited test.
  • git grep -nE "▾ · |VIEW ▾ · COUNT|number of records the view holds" ui content skills (CHANGELOGs aside): 0 hits.
  • Tests at a4a0866: 4 app-shell files, 34 tests passed, exit 0. dispatch-gates --commands derived 70 (the 38 before plus the docs families); all exit 0; --ran 70/70, 0 NOT MEASURED. overlap-check clean before each push.
  • The d017996 reds: check:test-source-alias (fixed above, 1 → 0) and Test UI cancelled by the newer push (all 9 shards success on a4a0866).

The PR body carries the same edit once the body write lands (a dev does not PATCH a PR body; the seat writes it).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

席位核对 · L1 delta (seat 3, L1-a) · 2026-11-17T05:15Z

L1: ACCEPT
Head-sha: a4a0866
Card: #34603 · amendment 6938557606 · round note 6939253561 · os-dev-report delta 6939215838 · prior REWORK 6938542041 at 4401588

The must-fix and all four should-fixes of 6938542041 are met. The delta is two commits: docs and comments, plus one test import.

Must-fix

None.

Should-fix

None.

Delta readings

Item Reading
Delta 440158845c..a4a08660: d017996c (docs and title comments) and a4a08660 (test import). 4 files, +10/−6: content/docs/ui/views.mdx, ObjectView.tsx, objectViewPageHeader.tsx, ObjectView.objectListTitle-27950.test.tsx. No runtime code moved: the two .tsx source hunks are comments only.
Must-fix 1 (views.mdx "Switching views") The sentence now reads "…the open view's label and a ▾, with no record count beside it (the list's footer says how many records the view holds)", and the example is Leads / My Leads ▾. Both match the head: the switcher draws no count, and the footer count (recordCountShown / boardRecordCountShown in ListView.tsx) is the count the page still shows. Amendment 6938557606 adds content/docs/ui/views.mdx to the surface.
Should-fix (stale comments) objectViewPageHeader.tsx:36 and :133 now read 「OBJECT / VIEW ▾」; ObjectView.tsx:1208 reads 「VIEW ▾」; the 27950 test header reads 「OBJECT / VIEW ▾」. No ▾ · COUNT / ▾ · N spelling is left in the touched files.
Test import import '@objectstack/lint' at module top in the 27950 test, so the dynamic import ObjectView reaches is paid at collection (check:test-source-alias). It adds a load and changes no assertion. The file was already in the surface (edited in round 1).
Tier check-governed-merges --pr 34634: NOT governed, 114 lines (+57/−57). Tier S, lands through o3-C.
CI on this head 55 check-runs: all success or skipped. Build Docs, Check Documentation Links, Test UI (aggregate plus every planned shard), Test Core, Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Lint & Repo Gates, TypeScript Type Check and PR-body guards are all success.

Every reading of 6938542041 other than the findings above still holds at this head, since no runtime code moved.

Notes

  1. PR body. The edit naming the amendment and round 2 is pending (post-stamped --body refused a body whose first line is the attribution comment; the requester asked the seat for the write path). Round note 6939253561 names both on the PR in the meantime. The landing area should see the body updated, or the seat's ruling that the comment suffices, before the merge. It changes no reading here.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing · area o3-C · head a4a0866

Probe Reading
check-governed-merges.mjs --pr 34634 NOT governed, 0 of 10 paths on the register; 114 changed lines (+57/−57) ≤ 3000 → Tier S
CI + review on this head 55 check-runs success/skipped, 0 failed; L1 delta ACCEPT 6939283638 (prior REWORK 6938542041); K = 12 first-parent commits behind main (< 15), no conflict

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

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 05:17
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 60552cd Nov 17, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34603-switcher-count branch November 17, 2026 05:38
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 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