Skip to content

fix(plugin-list): on a phone the list toolbar keeps the view name readable - #33957

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-ftv3gu
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-ftv3gu

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #33833

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:手机宽度(640px 以下)下,列表工具条在视图名后面放不下筛选芯片、「在队列中」和工具图标时会自动换行,视图名保留整行宽度;工具图标留在右侧。桌面宽度不变。
  • 为什么改:375px 下工具条把视图名挤成一个字(「全部客户」显示为「全.」),手机用户分不清当前是哪个视图。
  • 风险与回滚:只改 plugin-list 工具条的 max-sm: 样式,且仅在宿主传入 toolbarLeading(Console 在手机宽度传入视图切换器)时生效;手机上工具条可能多占一行。回滚即还原本 PR。
  • 先看:ui/packages/plugin-list/src/listToolbarRow.ts(全部样式常量),ui/packages/plugin-list/src/ListView.tsx(工具条五处 className),ui/e2e/list-toolbar-view-name-phone.spec.ts(几何断言)。
  • 两分钟验证:手机宽度(375px)打开 showcase 的 Projects 列表,「All Projects」完整显示,Status / Health 芯片同行,筛选 / 显示 / 搜索图标在第二行右侧;桌面宽度与原来一样。
  • 需要你做的:无,席位落地。

What changes

  • ui/packages/plugin-list/src/listToolbarRow.ts (new): the toolbar row's layout classes as named string constants, with the four phone additions:
    • row: max-sm:flex-wrap max-sm:gap-x-2 max-sm:gap-y-1;
    • left group: max-sm:contents, so its items (the leading node, the filter chips, the 「In a queue」 toggle) wrap in the row;
    • leading node wrapper: max-sm:basis-auto, so the view name is sized by its content and anything that no longer fits beside it moves to the next line;
    • filter chips: max-sm:shrink, so a chip row wider than the phone scrolls inside its own overflow-x-auto box;
    • tool cluster: max-sm:ml-auto, so it keeps the right edge on whichever line it lands.
  • ui/packages/plugin-list/src/ListView.tsx: the toolbar's five class strings now come from those constants. The phone additions apply only when a host passes toolbarLeading; without one the rendered class strings are byte-identical to main (the ListView.toolbarLeading-12440 pin still reads today's left group).
  • ui/e2e/list-toolbar-view-name-phone.spec.ts (new): a Playwright geometry pin, see Tests.
  • .changeset/33833-list-toolbar-view-name-phone.md: patch, @object-ui/plugin-list.

No app-shell or plugin-view edit: below VIEW_TABS_MIN_WIDTH (640) the Console hands the title switcher to the list as toolbarLeading, and the row that starved it is plugin-list's toolbar (claim amendment 6895939370).

Why

At 375 px the toolbar row held the view switcher, the filter chips, the 「In a queue」 toggle and four 44 px touch-target icons on one line. Every item except the switcher was shrink-0, so the switcher's truncate label took what was left: 23.28 px of 64 px for 「全部客户」 in the probe, 20.11 px of 85 px for 「All Projects」 in the live Console.

Tests

ui/e2e/list-toolbar-view-name-phone.spec.ts lays out the toolbar row in Chromium with real Tailwind compiled from the installed tailwindcss. The classes are read from the sources at run time: the row constants by name from listToolbarRow.ts, the queue toggle's and Filter button's class strings and PHONE_TOUCH_TARGET from plugin-list, the switcher's trigger, outer span and count from objectViewTitleSwitcher.tsx, and the phone title wrapper from ObjectView.tsx. A first case checks that ListView.tsx still reads every constant, so the spec cannot measure classes nobody draws.

  • 320, 375 and 390 px, labels 「全部客户」 and 「All Customers」: the label is not clipped, nothing scrolls the page sideways, the queue toggle and the tool cluster stay in the row, and the cluster keeps the row's right edge.
  • 375 px with five filter chips (wider than the row): the label is whole, the chips stay inside the row, no page overflow.
  • 375 px with a 52-character name: it is truncated with an ellipsis and keeps more than 60% of the row.
  • CONTROL, 1280 px: the row's geometry with the phone classes equals its geometry without them (every measured rect), the label is whole, and the queue toggle and cluster share the name's line.

Local run: 10 passed.

Ablations: one per phone class, each through scripts/ablation-replace.mjs, restored to the HEAD blob with git diff HEAD empty
Leg Mutation in listToolbarRow.ts Result
A row without max-sm:flex-wrap 8 failed, 2 passed: label 16.00 px of 64 px (320/375), 22.94 px of 64 px (390)
B left group without max-sm:contents 8 failed, 2 passed: label 16.00 px of 64 px; long name 16.00 px in a 375 px row
C cluster max-sm:ml-auto → max-sm:mr-0 6 failed, 4 passed: "the tool cluster left the right edge"
D leading without max-sm:basis-auto 7 failed, 3 passed
E chips max-sm:shrink → max-sm:shrink-0 1 failed, 9 passed: the five-chip case

The two cases that stay green in A and B are the constants check and the 1280 px control, as they should. No build sits between mutation and run: the spec reads the source text.

Narrowed vitest runs
  • pnpm --dir ui exec vitest run packages/plugin-list/ under the lock: Test Files 173 passed (173), Tests 1856 passed (1856).
  • Toolbar neighbours under the lock (nine ListView.*toolbar*/phone*/queue* pins, ViewTabBar.hostWidth-12518, ObjectView.titleViewSwitcher-27594, ObjectView.objectListTitle-27950, ObjectView.chartViewTabs-13114): Test Files 13 passed (13), Tests 86 passed (86).
  • pnpm --filter @object-ui/plugin-list type-check: exit 0. pnpm --dir ui run type-check:e2e: exit 0. eslint on the three touched source files: 0 errors (warnings are pre-existing in ListView.tsx).
  • app-shell's full suite is left to CI Test UI; app-shell has no edit here.

Verification

Real browser, the live Console (@object-ui/console dev server on this branch, against examples/app-showcase booted with --seed-admin), Playwright Chromium, 375×812 at deviceScaleFactor 2, then 1280×800:

List Width Before (main's ListView.tsx) After
Projects (2 filter chips) 375 「All Projects」 20.11 px of 85 px, toolbar 63 px 85.28 px of 85 px, toolbar 111 px (two lines), page overflow 0
Tasks (no chips) 375 67.73 px of 68 px 67.73 px of 68 px
Projects 1280 92.91 px of 93 px, page header title same

Screenshots (project files): ui-seat1/33833-shots/33833-before-showcase_project-375.png, 33833-after-showcase_project-375.png, and the task / 1280 px pairs beside them. The before leg put main's ListView.tsx back under HMR and restored it to the HEAD blob afterwards (git diff HEAD empty).

Premise on origin/main 895783a in the fixture probe: 「全部客户」 23.28 px of 64 px at 375 px, 64/64 at 1280 px.

Gates at head e29b2d2
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 37 families for the 4 changed paths; each ran locally and exited 0 (two under the lock: pnpm --dir ui exec vitest run scripts/ 171 passed, 2 skipped files; pnpm check:type-check-debt).
  • --ran reconciliation: "37 derived, 37 run, 0 NOT-MEASURED, 0 UNRUN".
  • Outside the derived list: pnpm --dir ui run check:new-line-citations "0 new citation(s)"; pnpm --dir ui run type-check:e2e exit 0.
  • Every other family is CI's; its check-runs on this PR are the reading.

Acceptance notes

  • On a phone the toolbar can now take a second line (the Projects list: 63 px to 111 px). That is the card's chosen direction (wrap or fold); a fold into an overflow menu was not built.
  • The open phone search field (w-36) was not measured here; it replaces the Search icon in the same cluster, so it wraps with it.

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; eslint on the touched files reports 0 errors (the repo-wide pnpm lint is CI's run).
  • 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 by Claude Code

…stays readable

Below sm, with a host's leading node, the toolbar row wraps: the left
group dissolves into the row, the leading node is sized by its content,
and the chips, the queue toggle and the tool cluster move to the next
line when they no longer fit beside it. The row's classes move into
listToolbarRow.ts so the new Playwright geometry spec reads them by name.

Claude-Session: https://claude.ai/code/session_01ADHkmPnhMzygsUcv5uRQYU
Co-authored-by: Claude <noreply@anthropic.com>
…fter its anchor too

Claude-Session: https://claude.ai/code/session_01ADHkmPnhMzygsUcv5uRQYU
Co-authored-by: Claude <noreply@anthropic.com>
…an the phone row

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

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

席位核对

Verdict: ACCEPT · head e29b2d2a · 2026-11-15T15:15Z

  1. Shape. Draft → main, first content line Fixes #33833. 4 files, all on the amended surface (claim 6895872671, amendment 6895939370): ui/packages/plugin-list/src/ListView.tsx (+19/−6, the toolbar's five class strings now read from constants), new listToolbarRow.ts (the row's class constants with the max-sm: phone additions), new ui/e2e/list-toolbar-view-name-phone.spec.ts (375px pin + 1280px control), one changeset (@object-ui/plugin-list patch). The phone additions apply only when a host passes toolbarLeading; without one the class strings are unchanged (seat read of the diff: TOOLBAR_LEFT_GROUP and the no-leading branches keep main's strings).
  2. Premise. Re-measured by the dev on 895783a1 before editing: at 375px the view label was drawn 23.28px of 64px (≈「全.」); 1280px 64/64. The defect sits in plugin-list's toolbar, not app-shell, which the amendment recorded.
  3. Contract. Clause-②: no, Metadata-protocol: none; no packages/spec/** path, no published accept set or export moves (the new module is internal to plugin-list). No contract review owed. Changeset level patch is right.
  4. Gates on e29b2d2a. 52 check runs: 39 success, 13 skipped, none failed; Lint & Repo Gates, TypeScript Type Check, Type Check UI, Test UI and Build & E2E UI (which runs the new spec) all success. Locally the dev ran 37/37 derived gates exit 0, and 5 ablations (one per phone class) each went red.
  5. K. Merge base 895783a1; 0 first-parent commits on main since. No sync needed.
  6. Governed. check-governed-merges --pr 33957: NOT governed; 361 changed lines.
  7. Out of scope / deviations. None filed. Accepted deviation: the dev read the claim comments with one gh api REST read. Skills-docs: not owed (kind none).
  8. Landing. label-write --land (pr_ready + automerge_enable) was refused in this seat's container by the session's auto-mode classifier at 2026-11-15T15:15Z; per landing rule B the seat stops and asks the maintainer to approve the landing in the seat thread. No other spelling is tried.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#1 · os-steve · session_01ADHkmT2NE3iyG1o6TDg3sf

落地

Landing approved by the maintainer in the seat thread at 2026-11-15T16:10Z ("批准席位 本班复核通过的 PR 执行 --land"). The ACCEPT head e29b2d2a was synced with origin/main by a merge-only relay pr_update_branch (K was 27); the PR's own delta is unchanged. This stroke: pr_ready + automerge_enable on head a7c6faed · 2026-11-15T16:36Z.

Reading Value
Queue membership not queued before this stroke; mergeable_state clean; 52 check runs on a7c6faed: 39 success, 13 skipped, 0 failed; check-governed-merges: NOT governed
origin/main 9db729f81a; K = 11 first-parent commits since the merge base (< 15, no sync owed)

State change: on MERGED, Fixes #33833 closes the card; the seat then removes pm:dispatched and the assignee there.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 16:36
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit d68f014 Nov 15, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-ftv3gu branch November 15, 2026 17:03
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