Skip to content

feat(ui): the console's pages set text in two sizes, 14 and 12, and two weights, 400 and 500 - #36183

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-5f2iq5
Nov 21, 2026
Merged

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

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

repo:objectstack#1 · os-sales · session_01L6bhgUUrNKCZdu79ooP61V

Fixes #36047

Slice 2 of 2. Slice 1 (#36093, merged 3ae62acd) set the theme tokens and shared controls: the 8px control corner, the white content area and the badge weight. This slice sweeps the per-site text sizes and weights on the console's pages.

Clause-②: no
Metadata-protocol: none

维护者速读

  • 控制台运行时页面只剩两种字号:正文 14(列表单元格、字段值、输入框、菜单项、工具栏按钮、单元格编辑框),次要信息 12(字段标签、表头、计数、时间、提示、小块里的字)。页面里不再有 13;原来的 10、11 和 11.5、12.5 这些零碎字号也收到 12 或 14。
  • 字重只剩 400 和 500:记录名称、页签、按钮、分区标题、表头是 500,正文 400。600/700 只留在 18 号以上的页面和弹框大标题上。下拉菜单的分组标题也从 600 改成 500。
  • 记录页的页签选中和未选中现在都是 14。
  • 没设宽度的列表列按内容自动变宽,14 号字下会宽约 8%;视图里写死宽度或用户拖过的列宽度不变,每列少显示约 8% 的字,悬停可看全文。客户列表 1440 宽一屏可见列数前后都是 5(5 列全部放得下)。
  • 单选/多选的彩色标签保持全圆(标签形状未改)。
  • 不改的:Studio 和元数据管理内部、设置页、开发者工具、手机专用布局(另有 专题:手机端重做(登录后进应用、应用首页就是全部菜单、底部固定首页/通知/审批、列表工具行和面板;结构参照 Attio 手机端) #35880 专题)、头像里的缩写字母、作者写的 markdown 和 SDUI 标题、文档阅读页的正文字号。

What changes

The mapping (run as a script, re-run after every merge of main; conflicts are resolved by taking main and re-running it, never by hand):

Before After Where
text-[13px] text-sm (14) body text, cells, field values, inputs, menu items, toolbar and bar buttons, condition chips, the in-cell editor (EDITOR_DENSITY_CLASS and the cell input layer in @object-ui/components)
text-[13px] text-xs (12) the same class run carries text-muted-foreground, uppercase, tabular-nums or tracking-wide, or it is a column header: labels, headers, counts, times, empty-state hints
text-[12.5px], text-[15px] text-sm (14) record-page panel heads and rows, the comment composer, home section headings
text-[9px] … text-[11.5px] text-xs (12) captions, counts, kbd hints, chip text, badges
font-semibold, font-bold font-medium (500) everything except a class run that also sets text-lg or larger

Kept on purpose, each named in the script's exception list: avatar initials and the one-letter record-link mark (glyphs sized to their circle), phone-only branches (isMobile rows, Phone* files, the phone search keyword, the phone sidebar app name), authored content typography (markdown strong and headings, SDUI h1–h6 presets), and the docs reader's prose size. Directories not swept: views/studio-design, views/metadata-admin, the settings pages, pages/developer, views/item-tools, the draft-preview bar, and dev-only harnesses. The home page's first-run checklist lives under pages/settings but is drawn on the console home, so it is swept.

Shared parts beyond the class sweep

  • DropdownMenuLabel (@object-ui/components, Shadcn-synced) is font-medium instead of font-semibold, through a declared local patch dropdown-menu-label-medium-weight in ui/scripts/shadcn-local-patches.mjs, anchored on the already vendored dropdown-menu.registry.txt. shadcn-components.json names it. ContextMenuLabel, MenubarLabel and SelectLabel are not patched: no console runtime page renders them.
  • The list view bar: the object name is 14 (it was 13), the / separator after it is 14 (it inherited 16).

Counts, on the branch merged with main (a2dc8589): 386 sizes and weights changed in 123 source files; 110 kept by the rules above (76 titles 18px and larger, 25 named exceptions, 9 avatar initials). A dry re-run of the script on the merged branch changes nothing.

Why

#36047 items 1 and 2 (maintainer-approved Attio comparison): two text sizes, 14 and 12, and two weights, 400 and 500, with page titles excepted. The card's own measurement found 12, 13 and 14 and 400, 500 and 600 on one page.

Verification

Measured in a real browser (CRM example, console dev server against it), 1440 and 375, light and dark, before and after: list (account), record page (opportunity), kanban (opportunity pipeline), create dialog, console home. Font size and weight of every visible text node outside the sidebar.

page, 1440 light sizes before sizes after weights before weights after
list 10, 12, 13, 14, 16 12, 14, 16¹ 400, 500, 600 400, 500
record 10, 11, 12, 13, 14, 16 12, 14, 16² 400, 500, 600 400, 500
kanban 10, 11, 12, 13, 14, 16 10³, 12, 14, 16¹ 400, 500, 600 400, 500
create dialog 10, 11, 12, 13, 14, 16 12, 14, 16⁴ 400, 500, 600 400, 500, 600⁴
home 10, 11, 12, 13, 14, 15, 16, 24 12, 14, 16, 24⁵ 400, 500, 600 400, 500, 600⁵

¹ the visually hidden skip link. ² the record name (16/500). ³ avatar initials. ⁴ the dialog title (16/600, #35980). ⁵ the greeting (24/600) and the checklist title (16/500). Dark is identical. At 375 the phone faces are unchanged by design (15px record rows, the 17px phone title).

Visible columns on the account list at 1440: 5 before, 5 after (all five fit). Record tabs: selected and unselected are both 14px.

Tests, local, on the branch merged with main (146b6f9b): the full vitest suites of components, fields, plugin-grid, plugin-list, plugin-detail, plugin-kanban, plugin-form, app-shell and console, plus ui/scripts/__tests__, all pass; eslint on every changed file: 0 errors. After the second merge with main (a2dc8589, which brought the comment panel and the list draft buttons): the 175 test files that import a re-mapped file pass (2,608 tests) and eslint on every changed file has 0 errors. Pins moved with the values: ten unit-test assertions and three e2e specs (list-frame-geometry-35548, narrow-drawer-time-34614, record-tabs-rail-35595; 20 passed locally against a production build).

The mapping script

Not committed: it is a one-off for this sweep and the follow-up re-run. All four files, as run:

s2map.mjs: the mapping: `node s2map.mjs [--apply] [--table=out.tsv]`
#!/usr/bin/env node
// #36047 slice 2 mapping script: text sizes -> 14/12, weights 600/700 -> 500, on the console's runtime pages.
//
//   node s2map.mjs <ui-dir> <files.txt> <overrides.tsv> [--apply] [--table=out.tsv]
//
// files.txt     ui-relative paths to sweep (one per line).
// overrides.tsv `path<TAB>anchor<TAB>token<TAB>result` rows: the anchor is a substring of the line
//               (so a row survives line moves on a main merge); result is a replacement token or
//               `keep`. A row whose token is `*` applies to every token on that line.
// Without --apply it only prints the table (path:line, before, after, rule, excerpt).
import fs from 'node:fs';
import path from 'node:path';

const [uiDir, filesTxt, overridesTsv, ...rest] = process.argv.slice(2);
const apply = rest.includes('--apply');
const tableOut = (rest.find((a) => a.startsWith('--table=')) || '').slice(8);

const overrides = [];
if (overridesTsv && fs.existsSync(overridesTsv)) {
  for (const raw of fs.readFileSync(overridesTsv, 'utf8').split('\n')) {
    if (raw.startsWith('#') || !raw.trim()) continue;
    const [file, anchor, token, result] = raw.split('\t');
    overrides.push({ file, anchor, token, result, id: overrides.length });
  }
}
const usedOverrides = new Set();

// A Tailwind token with optional variant prefixes (md:, [&_input]:, before:, !).
const TOKEN = /(?<![\w\-\[])((?:[^\s"'`{}]*?:)?)(!?)(text-\[(\d+(?:\.\d+)?)px\]|font-(?:semibold|bold|extrabold))(?![\w\-])/g;
const BIG = /\btext-(?:lg|xl|[2-9]xl)\b|text-\[(?:1[7-9]|[2-9]\d)px\]/;
const SECONDARY = /text-muted-foreground|\buppercase\b|tabular-nums|tracking-wide|<th\b|TableHead|thead/;

function decide(rel, lineNo, lineText, prefix, bang, body, px) {
  const hit = overrides.find((o) => o.file === rel && lineText.includes(o.anchor) &&
    (o.token === '*' || o.token === body || o.token === `${prefix}${bang}${body}`));
  if (hit) {
    usedOverrides.add(hit.id);
    return hit.result === 'keep' ? { after: null, rule: 'override:keep' } : { after: hit.result, rule: 'override' };
  }
  // Initials inside an avatar are a glyph sized to its circle, not text.
  if (/AvatarFallback/.test(lineText)) return { after: null, rule: 'avatar:keep' };
  if (body.startsWith('font-')) {
    if (BIG.test(lineText)) return { after: null, rule: 'big-title:keep' };
    return { after: 'font-medium', rule: 'weight' };
  }
  const n = Number(px);
  if (n === 13) {
    return SECONDARY.test(lineText) ? { after: 'text-xs', rule: '13→12 secondary' } : { after: 'text-sm', rule: '13→14 body' };
  }
  if (n === 12.5) return { after: 'text-sm', rule: '12.5→14' };
  if (n < 13) return { after: 'text-xs', rule: 'small→12' };
  if (n === 15) return { after: 'text-sm', rule: '15→14' };
  return { after: null, rule: 'big:keep' };
}

const files = fs.readFileSync(filesTxt, 'utf8').split('\n').map((s) => s.trim()).filter(Boolean);
const rows = [];
let changedFiles = 0;
for (const rel of files) {
  const abs = path.join(uiDir, rel);
  if (!fs.existsSync(abs)) { rows.push([`${rel}:-`, '-', '-', 'missing', '']); continue; }
  const src = fs.readFileSync(abs, 'utf8');
  const lines = src.split('\n');
  let touched = false;
  for (let i = 0; i < lines.length; i++) {
    const text = lines[i];
    if (!TOKEN.test(text)) continue;
    TOKEN.lastIndex = 0;
    lines[i] = text.replace(TOKEN, (m, prefix, bang, body, px) => {
      const { after, rule } = decide(rel, i + 1, text, prefix, bang, body, px);
      rows.push([`${rel}:${i + 1}`, m, after ? `${prefix}${bang}${after}` : '(keep)', rule, text.trim().slice(0, 160)]);
      if (!after) return m;
      touched = true;
      return `${prefix}${bang}${after}`;
    });
  }
  if (touched) {
    changedFiles++;
    // A `text-sm md:text-sm` pair left by the swap collapses to one token.
    let out = lines.join('\n').replace(/\b(text-(?:xs|sm)) md:\1\b/g, '$1');
    if (apply) fs.writeFileSync(abs, out);
  }
}
const tsv = rows.map((r) => r.join('\t')).join('\n') + '\n';
if (tableOut) fs.writeFileSync(tableOut, tsv); else process.stdout.write(tsv);
const unused = overrides.filter((o) => !usedOverrides.has(o.id)).map((o) => `${o.file} ${o.anchor.slice(0, 40)}`);
const counts = rows.reduce((a, r) => ((a[r[3]] = (a[r[3]] || 0) + 1), a), {});
console.error(JSON.stringify({ sites: rows.length, changedFiles, apply, counts, unusedOverrides: unused }, null, 1));
s2-files.sh: the file list: `s2-files.sh cat.sh > files.txt`
#!/bin/bash
# Regenerate the slice 2 sweep file list from the current tree. usage: s2-files.sh <ui dir> <cat.sh> > files.txt
cd "$1"
SCOPE="packages/app-shell/src packages/plugin-grid/src packages/plugin-list/src packages/plugin-detail/src packages/plugin-kanban/src packages/plugin-form/src packages/fields/src packages/components/src/renderers packages/components/src/custom packages/components/src/share packages/components/src/notifications apps/console/src"
git ls-files $SCOPE | grep -E '\.(tsx?|css)$' | grep -vE '(\.test\.|\.spec\.|__tests__|\.stories\.|/test/|/e2e/)' | grep -vE 'views/(studio-design|metadata-admin)/' \
 | xargs grep -lE 'text-\[(9|10|10\.5|11|11\.5|12\.5|13|15|17)px\]|font-(semibold|bold|extrabold)\b' \
 | while read f; do [ "$("$2" "$f")" = sweep ] && echo "$f"; done
cat.sh: which paths are swept
#!/bin/bash
# classify a ui-relative path
f="$1"
case "$f" in
  apps/console/src/pages/settings/FirstRunChecklist.tsx) echo sweep;;  # drawn on the console home
  apps/console/src/dev/*|apps/console/src/*-preview.tsx|apps/console/src/preview-gallery.tsx|apps/console/src/dev-*) echo devonly;;
  */Phone*|*/Mobile*|*/phone/*|*/mobile/*) echo phone;;
  apps/console/src/pages/settings/*|*/console/organizations/*|*/console/notification-settings/*|*/views/setup/*|*/console/cloud-connection/*|apps/console/src/pages/system/ProfilePage.tsx) echo settings;;
  apps/console/src/pages/developer/*|*/views/item-tools/*|*/views/MetadataInspector.tsx|*/preview/*) echo devtools;;
  *) echo sweep;;
esac
s2-overrides.tsv: the named exceptions and hand-picked sizes, anchored by line content so they survive a `main` merge
# #36047 slice 2 per-site overrides: path<TAB>line anchor<TAB>token (or *)<TAB>replacement or keep
# --- 13px muted controls / menu items are body controls -> 14
packages/plugin-list/src/conditions/FilterValuePanel.tsx	className="ml-auto h-7 w-auto min-w-0 gap-1 border-0 px-2 text-[13px] text-muted-foregroun	text-[13px]	text-sm
packages/plugin-list/src/conditions/ListConditionControls.tsx	className="flex h-8 w-full items-center gap-2 rounded-sm px-2 text-left text-[13px] text-m	text-[13px]	text-sm
packages/plugin-list/src/conditions/ListConditionControls.tsx	'flex h-7 flex-1 items-center justify-center gap-1 rounded-sm text-[13px] text-muted-foreg	text-[13px]	text-sm
packages/plugin-list/src/conditions/ListConditionControls.tsx	className="flex h-8 w-full items-center gap-2 rounded-sm px-2 text-left text-[13px] text-m	text-[13px]	text-sm
packages/plugin-list/src/conditions/ListConditionControls.tsx	'max-sm:h-11 max-sm:min-w-11 inline-flex h-6 shrink-0 items-center gap-1 rounded-md border	text-[13px]	text-sm
packages/plugin-list/src/conditions/ListConditionControls.tsx	className="ml-auto h-6 shrink-0 gap-1 px-1.5 text-[13px] text-muted-foreground"	text-[13px]	text-sm
packages/plugin-list/src/components/ViewSettingsPopover.tsx	'flex w-full items-center gap-1.5 rounded-sm px-2 py-1.5 text-left text-[13px] text-muted-	text-[13px]	text-sm
packages/plugin-list/src/ListView.tsx	"hidden sm:inline-flex h-7 text-muted-foreground hover:text-foreground text-[13px] transit	text-[13px]	text-sm
packages/plugin-list/src/listToolbarRow.ts	'h-7 min-w-7 gap-1 px-1.5 sm:px-2 text-[13px] font-normal text-muted-foreground hover:text	text-[13px]	text-sm
packages/app-shell/src/views/ListDraftActions.tsx	px-1.5 text-[13px] font-normal text-muted-foreground shadow-none	text-[13px]	text-sm
# --- 12.5px panel heads, rows and the composer look-alike input are body -> 14
packages/plugin-detail/src/RecordActivityTimeline.tsx	className="flex h-11 sm:h-8 w-full items-center rounded-md border border-input bg-backgrou	text-[12.5px]	text-sm
packages/plugin-detail/src/RecordActivityTimeline.tsx	className="flex h-8 items-center gap-2 border-t border-border px-3 text-[12.5px]"	text-[12.5px]	text-sm
packages/plugin-detail/src/RecordActivityTimeline.tsx	className="flex h-8 w-full items-center border-t border-border px-3 text-left text-[12.5px	text-[12.5px]	text-sm
packages/plugin-detail/src/RelatedList.tsx	className="group/panel-head relative flex h-11 sm:h-9 items-center gap-1.5 px-3 text-[12.5	text-[12.5px]	text-sm
packages/plugin-detail/src/RelatedList.tsx	className="flex min-h-11 sm:h-8 sm:min-h-0 items-center justify-between gap-2 border-t bor	text-[12.5px]	text-sm
packages/plugin-detail/src/RecordTimelinePanel.tsx	className="group/panel-head relative flex h-11 sm:h-9 items-center gap-1.5 px-3 text-[12.5	text-[12.5px]	text-sm
# --- glyphs in fixed tiny boxes (avatar initials, record-link initial, chevron): not text, keep
packages/plugin-grid/src/ObjectGrid.tsx	'[&_td_a[data-record-link]]:before:flex [&_td_a[data-record-link]]:before:h-3.5 [&_td_a[da	*	keep
packages/plugin-kanban/src/KanbanImpl.tsx	className={cn("text-[10px] transition-transform shrink-0", collapsed ? "" : "rotate-90")}	*	keep
packages/plugin-detail/src/RichTextCommentInput.tsx	<div className="h-5 w-5 rounded-full bg-muted flex items-center justify-center text-[10px]	text-[10px]	keep
packages/components/src/custom/config-field-renderer.tsx	{opt.icon ?? <span className="text-[10px]">{opt.label.charAt(0)}</span>}	*	keep
# --- phone-only branches (the card leaves phone sizes alone, epic #35880)
packages/plugin-detail/src/DetailSection.tsx	<span className="text-[15px] text-muted-foreground shrink-0">{fieldLabelText}</span>	*	keep
packages/plugin-detail/src/DetailSection.tsx	<span className="text-[15px] text-foreground text-right break-words min-w-0 leading-snug">	*	keep
packages/app-shell/src/layout/UnifiedSidebar.tsx	<span className="flex-1 truncate text-[15px] font-semibold">	*	keep
packages/app-shell/src/console/home/HomePage.tsx	<h1 className="px-5 pb-2 text-[17px] font-semibold">	*	keep
packages/app-shell/src/layout/AppSwitcher.tsx	<span data-testid="app-switcher-phone-name" className="truncate whitespace-nowrap text-[17	*	keep
packages/plugin-list/src/ListView.tsx	<span className="max-w-[5rem] truncate text-[11px]" data-testid="phone-search-active-keywo	*	keep
packages/plugin-grid/src/ObjectGrid.tsx	<div data-testid="grid-card-title" className="truncate text-sm font-semibold">	*	keep
packages/plugin-grid/src/ObjectGrid.tsx	className="ml-auto shrink-0 whitespace-nowrap text-sm font-semibold tabular-nums"	*	keep
packages/app-shell/src/views/ObjectView.tsx	<span className="flex min-w-0 max-w-full items-center gap-1.5 max-sm:text-base max-sm:font	*	keep
packages/plugin-detail/src/renderers/record-path.tsx	const PHONE_SUMMARY_STAGE_CLASS = 'min-w-0 font-semibold [overflow-wrap:anywhere]';	*	keep
# --- the docs reader's prose size (#35424) is a reading face, keep
apps/console/src/pages/DocPage.tsx	className: '!text-[15px]',	*	keep
# --- authored content typography (markdown / SDUI headings and bold): keep
packages/components/src/renderers/basic/elements.tsx	h6: 'text-base font-semibold tracking-tight',	*	keep
packages/components/src/renderers/basic/elements.tsx	strong: 'font-semibold',	*	keep
packages/components/src/renderers/basic/text.tsx	h6: 'text-base font-semibold tracking-tight',	*	keep
packages/app-shell/src/console/marketplace/MarkdownText.tsx	strong: 'font-semibold text-foreground',	*	keep
packages/app-shell/src/console/marketplace/MarkdownText.tsx	h2: 'mt-3 text-base font-semibold tracking-tight',	*	keep
packages/app-shell/src/console/marketplace/MarkdownText.tsx	h3: 'mt-2 text-sm font-semibold tracking-tight text-foreground/80',	*	keep
packages/app-shell/src/console/marketplace/MarkdownText.tsx	h1: 'text-sm font-semibold tracking-tight text-foreground',	*	keep
packages/app-shell/src/console/marketplace/MarkdownText.tsx	h2: 'text-xs font-semibold tracking-tight text-foreground',	*	keep
packages/app-shell/src/console/marketplace/MarkdownText.tsx	<th key={c} className={`border-b px-3 py-2 font-semibold text-foreground ${alignClass(c)}`	*	keep
packages/app-shell/src/views/objectViewPageHeader.tsx	data-testid="list-view-bar-object-name"	text-[13px]	text-sm
packages/plugin-list/src/conditions/ListConditionControls.tsx	h-6 shrink-0 gap-1 px-1.5 text-[13px] font-normal text-muted-foreground shadow-none	text-[13px]	text-sm

Follow-ups owed

  • A re-run of the mapping script on main after this merges. PRs that land after this one may bring new text-[13px], font-semibold or font-bold into the swept areas. The re-run belongs to a new session; anything it finds becomes a small follow-up PR.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes (eslint on every changed file locally; CI's Lint UI is the full reading).
  • 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 维护者速读 block is the maintainer's summary, in the maintainer's language).
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUUrNKCZdu79ooP61V

…wo weights, 400 and 500

The hard-coded 13px on the console's runtime pages becomes 14 (body, cells,
field values, inputs, menu items, toolbar controls, the in-cell editor) or
12 (labels, column headers, counts, times, hints, chip text); 10/11px and the
odd half sizes become 12. Weights 600/700 become 500 except on titles 18px
and up. DropdownMenuLabel is 500 through a declared local Shadcn patch.
Studio, metadata administration, settings pages, developer tools, phone-only
layouts, avatar initials and authored markdown/SDUI typography are not swept.

Slice 2 of 2 for objectstack#36047.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUUrNKCZdu79ooP61V
…-5f2iq5

# Conflicts:
#	ui/packages/app-shell/src/views/objectViewSwitcherMenu.tsx
#	ui/packages/components/src/renderers/complex/data-table.tsx
#	ui/packages/plugin-detail/src/ThreadedReplies.tsx
…-5f2iq5

# Conflicts:
#	ui/packages/app-shell/src/views/ListDraftActions.tsx
…-5f2iq5

# Conflicts:
#	ui/e2e/list-frame-geometry-35548.spec.ts
#	ui/packages/app-shell/src/views/objectViewPageHeader.tsx
#	ui/packages/plugin-list/src/ListView.tsx
@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 21, 2026
…2px header

With the 12px header and weight 500 the five plan columns measured 8 px
narrower, so in the 622 px drawer they fitted beside the inline button and
nothing folded. The fixture's warehouse name carries a bay: menu-only the
table is 593 px, and the inline button adds 64.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUUrNKCZdu79ooP61V
…-5f2iq5

# Conflicts:
#	ui/packages/plugin-detail/src/comments/CommentsPanel.tsx
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — ACCEPT (L1-b)

Head-sha: 9bfa7fd2ed7e7e4d2156296189c3598a29db574b · merge-base with main 4ab2c823 · 139 files +457/−391 · read 2026-11-21T21:25Z

维护者速读

  • 控制台页面的字号收成两种(正文 14、次要信息 12),字重收成两种(400、500),只有 18 号以上的大标题保留 600/700;下拉菜单分组标题也改成 500。
  • 改动是脚本批量做的。我把 PR 里贴的脚本在合并基点上原样重跑了一遍,得到的结果和 PR 的源码改动逐字一致;PR 里脚本以外的手工改动只有 4 处,都说明得通(菜单标题字重、看板列标题去掉重复写法、一句注释、一个测试数据加长)。
  • 设置页、Studio、开发者工具、手机专用布局、头像字母、作者写的 markdown 都没动,和卡上说的一致。
  • 没有必须改的问题。合并后要在 main 上再跑一次脚本,补上之后新落地的代码。

Must-fix

None.

Should-fix

None.

Nits (ride or drop, seat's call)

  • N1 The secondary rule sends every muted text-[13px] run to 12, including a few prose paragraphs, not only labels and counts.
    • Examples: the home work summary (HomePage.tsx home-work-summary), the connect-assistant card body (ConnectAssistantCard.tsx:82), the login page's two subtitles (LoginPage.tsx:522,623) and the checklist description.
    • They read as hints, so this fits the card's 「提示」 bucket. I'm naming them so the maintainer's eye check after landing knows where 12px prose appears.
  • N2 The mapping script lives only in the PR body. The owed re-run on main needs it extracted exactly: four files, the .tsv with real tabs. A copy already sits in build-seat1/36047/S2/ (per the thread). The follow-up session should start from that copy, not from a re-typed body.

Checked

  • Replay of the script (independent):
    • I extracted the four files (s2map.mjs, s2-files.sh, cat.sh, s2-overrides.tsv) from the PR body and regenerated the file list at the merge base 4ab2c823 (147 files). I then ran --apply: 481 sites, 121 files changed, and every override was used.
    • I diffed that tree against the PR head. Every swept source file is identical, and the remainder is 20 files.
    • Of the 20, 15 are expected: the changeset, 4 e2e specs, 9 unit-test pins and the 1 patch test. The other 5 are hand edits, all accounted for:
      • dropdown-menu.tsx: the DropdownMenuLabel 600→500 change, reached through the declared patch.
      • shadcn-components.json: localEdits now names that patch.
      • shadcn-local-patches.mjs: declares dropdown-menu-label-medium-weight with one occurrence, anchored on the label's whole class run. Its test pins that the result reads font-medium, carries no font-semibold, and that upstream still carries font-semibold.
      • KanbanImpl.tsx:901: text-xs sm:text-xs collapsed to text-xs. The script's collapse handles only the md: pair, so this was done by hand; the rendered result is the same.
      • objectViewPageHeader.tsx:298: a comment, 13px → 14px.
  • Dry run at the head:
    • Regenerated list: 55 files with remaining hits. 0 changed files.
    • Every remaining hit is a keep: 76 big titles, 25 named overrides, 9 avatars.
    • The PR's "dry re-run changes nothing" claim holds at this head.
    • Overrides unused at the head are the ones already applied, plus two keeps whose lines main changed on its own: phone-search-active-keyword was already text-xs on main, and the ObjectView.tsx max-sm: line is gone.
  • Weight rule: the title test (BIG) reads one line only. I checked every one of the 99 weight rows for a text-lg+ or ≥17px class within ±3 lines, which would mean a multi-line cn() title had been demoted. None found.
  • 13px split: I read the 13→12 secondary rows (24) and the 13→14 body rows whose text suggests a label or count. Column headers (data-table.tsx header spans, [&_thead_th] runs in ObjectGrid and RelatedList) go to 12. Item labels, actor names, the comment header row and the app-tile names go to 14, matching the card's table.
  • Scope (cat.sh): settings, devtools, dev-only, Phone* / Mobile* paths, and studio-design / metadata-admin are excluded. FirstRunChecklist is swept on purpose, because it is drawn on Home.
  • e2e premise change (related-list-pinned-actions-width): the warehouse value gains ", bay 2" so that the five plan columns still fit the 622 px drawer menu-only (593) and overflow it with the inline button (+64). The spec's comment records why. The assertion is unchanged, and so is the product.
  • Changeset: 9 packages at patch. Clause-② is no. Classes only, nothing exported changes.
  • CI: green at this head and clean against main 16a96ac2, per the thread. I ran nothing locally beyond the replay.

Owed

  • At landing: merge main, re-run the script (take main on conflicts), then a merge-only L1-b read.
  • After merge: the script re-run on main in a new session, with any finds as a small follow-up PR (per the body).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T21:27Z · #36047 slice 2, type sizes and weights swept across the console to the card's scale (slice 1 was #36093). The sweep is script-driven: the four mapping-script files are in the PR body, each main merge took main's side on conflicts and re-ran the script, and the body says the script is re-run on main once more after merge, in a new session, from the build-seat1/36047/S2 copy.

Reviews:

  • L1-b: ACCEPT 7069472999, final on this head. It replayed the scripts at merge base 4ab2c823 (481 sites, 121 files) and matched every swept file at the head; 5 hand edits, all explained; a dry run at the head changes 0 files. Nits N1 (muted prose such as the home summary and login subtitles now reads 12px, for the maintainer's eye check) and N2 (re-run from the saved copy) are noted.
  • No L2: Clause-②: no.

Gates on this head:

  • check-governed-merges --pr 36183 reads NOT governed (848 changed lines).
  • The seat read K by hand: 1 first-parent commit since the merge base (feat(rest): Change Owner endpoint, single and bulk, gated by the object switch #36154, which touches no ui/ path, so a re-run of the sweep would change nothing and no merge is owed). The PR touches no translations/ or skills/ path.
  • 45 check-runs are success, 13 skipped. Mergeable is clean.

The seat readies this PR and arms auto-merge in the same step. The PR carries Fixes #36047.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 21:27
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 6c7c6db Nov 21, 2026
59 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-5f2iq5 branch November 21, 2026 21:50
os-sales pushed a commit that referenced this pull request Nov 21, 2026
… and weight sweep)

Conflicts, all on the retired rail, resolved to this branch's side:
- ui/packages/plugin-detail/src/RecordSummaryRail.tsx: deleted here; main's
  one sweep line (card title text-[13px] font-semibold -> text-sm font-medium)
  goes with the file. No rail markup moved into the pinned layout.
- ui/e2e/record-tabs-35595.spec.ts (renamed here from record-tabs-rail-35595):
  main moved the rail card's title pin 13px -> 14px; that test is gone here.
- RecordPageColumns.test.tsx: main moved the rail card title pin
  text-[13px] -> text-sm; that rail test is gone here.
- RecordTimelinePanel.chatterInset-34676.test.tsx: main moved the rail peek row
  pin text-[12.5px] -> text-sm; that rail test is gone here.

One pin moved by the sweep: in the pinned 1024 e2e test, the 400 px tab
column after the drag holds four tabs at 14 px (five at 13 px), so
quote.account_id moved into 「更多」. The CONTROL now opens the last tab still
on the row instead of naming quote.account_id.

Sweep kept: every line #36183 changed in a file this branch also changes
(RecordDetailView.tsx, RecordApprovalsPanel.tsx) is present unchanged in the
merge. No source file this branch adds or rewrites holds a size or weight the
sweep maps (text-[9|10|10.5|11|11.5|12.5|13|15|17px], font-semibold, font-bold),
checked file by file against main.

Claude-Session: https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri
Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…side the record's tabs; the right summary rail is retired (objectstack-ai#35890) (objectstack-ai#36136)

<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
Fixes objectstack-ai#35890

_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuSuWjKV41568rAPVdLLNa2U)_

repo:objectstack#1 · os-sales · session_01L6bhgUZTwDqtEFzNFCVTri

Part of epic objectstack-ai#35590 (record page redo). One PR for the card.

Clause-②: yes (widening): `RecordPageColumns` (exported from
`@object-ui/plugin-detail`) gains the optional props `fullPage`,
`detailsWidth`, `onDetailsWidthChange` and `onShownTabChange`, and
`onEnlargeRelated` an optional second argument `{ replace?: boolean }`.
`rightColumn` and `rail` stay on the props as `@deprecated` no-ops, so
no caller breaks. New exports: `RECORD_PAGE_DETAILS_WIDTH`,
`RECORD_PAGE_PIN_MIN_WIDTH`, `recordPagePinsDetails`;
`recordPageTierHasRightColumn` stays exported and is now `@deprecated`.
`@object-ui/i18n`: two new keys in every pack
(`detail.approvalPendingStep`, `detail.detailsColumnResize`), and
`detail.recordTabOverview` changes its text (概览 / Overview → 详情 /
Details); every key the retired rail read stays in every pack, unread.
The `RecordSummaryRail` module was internal (never exported from the
package entry) and is deleted.
Metadata-protocol: none

## 维护者速读

- 记录整页够宽时(放得下左 320 + 间隔 24 + 右
400),字段固定在左栏,其他页签(子表、附件、审批、动态)在右边,默认打开第一个;左栏默认 400,空间紧时自动让到
320,可以拖动,宽度按对象记在浏览器里。
- 右侧摘要栏(审批 / 附件 / 最近动态 / 其他相关卡片)在所有宽度都去掉了,⊟ 按钮和 ⌘⇧, 快捷键一起去掉;第一个页签改名「详情」。
- 「审批中」标签在有当前步骤时显示「审批中 · 当前步骤」(审批人自己仍是「待你审批」)。
-
抽屉、手机、窄窗口不分栏,照旧是一栏页签;它们也会看到两处变化:右侧摘要栏没了,第一个页签叫「详情」。手写的记录页不受影响;字段里放了子表的页面(objectstack-ai#35889)不分栏。
- 隐藏了的子表仍能从「更多」或带 `?related=` 的链接打开。
- 实测:1440 宽、左侧导航展开、评论栏打开时,内容只有 708,不够 744,页面退回一栏页签(打开的页签保持不变)。1280 和
1366 评论栏打开仍分栏。Sales 已接受这个代价,收起导航即恢复三栏(objectstack-ai#35890 note 7069882604)。等 objectstack-ai#36112
改成 1280 起默认展开导航后,1280 和 1366 展开导航再打开评论栏也会退回页签,收起导航即恢复三栏。

## What changes

**When the page pins.** Ruling on the card ([comment
7064066204](objectstack-ai#35890 (comment)),
option 0 of the reviewed decision card): a full page pins its details
when its content fits **left 320 + gap 24 + right 400** (744 content
px). The left column is 400 px (or the reader's dragged width) and
narrows by itself to 320 px to leave the tabs 400 px; narrower than
that, the page falls back to the tab row. This replaces the card's line
「沿用出现右栏的宽度」. Pinning is measured on the page content's own width
(`clientWidth`, ResizeObserver), never on the window, so the comment
panel of objectstack-ai#36075, which gives way at window widths of 1280 and up,
narrows the page and the page re-decides by itself.

What that means on common windows, **measured** in the console against
the CRM example (`measure-l1c.json`; the page frame is the window minus
the nav minus the host's 48 px margin, and the content is the frame
minus its 48 px padding; at 1280 and 1366 the nav is collapsed, at 1440
it is open at 256 px; comment panel 380 px, `beside`):

| Window | Frame, panel closed | Panel closed | Frame, panel open |
Panel open |
|---|---|---|---|---|
| 1280 | 1232 | pinned, details 400 / tabs 760 | 852 | pinned, details
380 / tabs 400 |
| 1366 | 1318 | pinned, details 400 / tabs 846 | 938 | pinned, details
400 / tabs 466 |
| 1440 | 1136 | pinned, details 400 / tabs 664 | 756 (content 708) |
**not pinned**: the tab row, with 「详情」 first and the shown list kept |

The earlier 1440 row (record area 1184, tabs 412) assumed no host
margin; the measured frame is 48 px narrower, so with the nav open and
the panel open the content is 708, under 744, and the page uses the tab
row. Windows of about 1416 to 1475 with the nav open and the panel open
land here. This follows the ruled threshold as written, and Sales
accepted it: with the sidebar expanded, opening the comment panel can
return the fields to the tab row, and collapsing the sidebar restores
three columns ([note
7069882604](objectstack-ai#35890 (comment)),
with objectstack-ai#36112 F1). These windows hold for today's sidebar threshold
(expanded from 1416). Once objectstack-ai#36112 PR B makes the sidebar start expanded
from 1280 (ruling 7069868269), the band with the sidebar expanded
becomes about 1280 to 1475, so 1280 and 1366 also go to the tab row when
the panel opens; collapsing the sidebar still restores three columns.
The 1416 comment in `recordPageColumns.ts` is updated by objectstack-ai#36112 PR B.

**Layout, pinned.** `[details 320–400+ px] [24 px separator] [tabs
minmax(0,1fr)]`. The details render at one field column
(`DetailsColumnCapContext` = 1). The tab row moves into the right column
and drops 「详情」; the open tab is the address's `?related=` when it names
one, otherwise the first tab (implied, never written). Each column
scrolls on its own when the page has a scroll parent with room
(`usePinnedHeight`). Esc does not close a tab while pinned (there is no
"back to details" to go to).

**The separator.** `role="separator"`, `aria-orientation="vertical"`,
`aria-valuenow/min/max`; pointer drag previews and commits on release;
←/→ move 16 px, Home/End go to the ends. The width is the
`record.columns.details-width` workspace preference (per object, `{
width, v: 1 }`), which replaces the retired `record.columns.related` (⊟)
preference.

**Narrowing out.** When a pinned page narrows below the threshold on the
same record and the address names no tab, the implied tab is written to
the address with `replace`, so the reader stays on what they were
looking at and Back history does not grow.

**Not pinned.** A page with no other tab draws the details alone, with
no tab row. A page whose details hold a related table among the fields
(objectstack-ai#35889) does not pin. Drawer, split pane and phone (`fullPage` false or
too narrow) keep the one-column tab row and never pin. What reaches
them: the rail is gone there too, and the first tab reads 「详情」.
Measured: drawer at 1440 (details 622 across, 「详情」 shown) and phone at
375 (details 327 across, 「详情」 shown), both with no rail.

**Rail retired.** `RecordSummaryRail` is deleted with the ⊟ panel
toggle, its `⌘⇧,` shortcut and the `record.columns.related` preference;
the attachment-count hook and approval-pending test move to
`recordTabBadges.ts`. The `PanelToggles` plumbing stays (empty) for
objectstack-ai#36075. The hidden-list foot line under the rail goes too; hidden lists
and the reset are in the tab row's 「更多」 menu. The "default order
changed" hint stays, under the tab row. A hidden list still opens, from
its 「更多」 item or from `?related=` naming it (`requested` accepts ids in
`resolved.hidden`; test red without the fix).

**Other card items.** The overview tab is labelled 「详情」 in every locale
(`detail.recordTabOverview` takes the `detail.details` word). The
in-approval tag reads `In approval · {{step}}`
(`detail.approvalPendingStep`, 11 locales) for non-approvers when the
request names a step, using the approvals panel's own `stepDisplayText`.

**Host.** `RecordDetailView` passes `fullPage={!embedded}`, the width
preference and `onShownTabChange`. When the shown tab is the 动态 timeline
(implied or chosen), the full activity window is read, as it was when
the tab was chosen. Feed reads at open are unchanged (the page payload
still asks discussion + activity top 5 for the tab's count), to stay out
of objectstack-ai#36075's way. Merged with `main` after objectstack-ai#36114 and objectstack-ai#36178 (the comment
panel, PRs 1 and 2), keeping both sides: the rail's 最近动态 card that
objectstack-ai#36114's `RecordCommentsInPanelContext` note spoke of no longer exists.
`overlap-check.mjs` at push (`241f4b21`): clean against `main`, objectstack-ai#36187,
objectstack-ai#36123 and objectstack-ai#35923; it conflicts with objectstack-ai#36183 (objectstack-ai#36047 slice 2, the
text-size sweep) in `RecordSummaryRail.tsx` (deleted here), the e2e spec
(renamed here) and two plugin-detail tests. Whichever lands second
resolves it; objectstack-ai#36183 re-runs its mapping script on `main`.

**Docs.** `content/docs/ui/pages.mdx` (Record pages › The synthesized
default) now describes the tab row, the pinned layout and when related
rows are read, instead of the right column.

## Acceptance notes (card checklist)

- Wide full page: fields left, other tabs right, first of them open. ✔
(`RecordPageColumns.test.tsx` pinned block; `recordPageTiers-26678` at
1440 / 1100 / 800 px)
- No other tab: fields fill the page, no tab row. ✔
- Right summary cards removed at all widths. ✔ (every tier asserts no
`[data-record-summary-card]`)
- Left column 400, draggable, remembered per person per object. ✔
(keyboard + pointer tests; host test writes and re-reads the
preference). Kept in the browser's workspace preference store, like the
other record-page preferences.
- First tab 「详情」. ✔
- 「审批中 · 当前步骤」. ✔ (`approvalDeclaredActions` test, machine name and
label)
- Body-table page does not pin. ✔
- Narrowing keeps the tab (URL replace). ✔ (measured: 1440 with the
panel opened wrote `?related=crm_activity.account`)
- A hidden list opens from 「更多」 and from `?related=`. ✔
(`readerArrangement-35595`, red without the fix)
- Drawer / phone never pin and keep the one-column tab row; what reaches
them is the rail's removal and the 「详情」 name. Hand-written pages
untouched. ✔
- Deliberate drops: the ⊟ control and `⌘⇧,`; the hidden-list foot line
(its job is in 「更多」); the rail's three-row previews of each related list
(a list now reads its rows when its tab opens).

## Why

Sales asked for the record page they remembered: on a wide full page,
the main form on the left and the child tables in tabs on the right
(objectstack-ai#35890, under epic objectstack-ai#35590). The width rule was put to Sales after a
decision review because the card's 760 px reading and the 1120 px
reading both broke the comment panel layout on common laptops; option 0
keeps three columns (fields | tabs | comments) on every common laptop,
which is the figure Sales approved on objectstack-ai#36075.

## Verification

- Local, on the merged head `079c7723` (shared box, under
`os-verify-lock`): plugin-detail, i18n, app-shell Record*,
recordCommentsPanel, relatedListConditions and workspacePreference: 647
files / 6,742 tests pass; app-shell type-check (src and tests) clean. On
`241f4b21`: plugin-detail + i18n 509 files / 5,677 tests pass, both
type-checks clean, `record-tabs-35595.spec.ts` 6/6 locally. Earlier, on
`fbe6e33d`: `vitest run packages/plugin-detail packages/i18n`: 500 files
/ 5,598 tests pass (31 skipped, existing). `vitest run
packages/app-shell/src/views/Record
packages/app-shell/src/utils/workspacePreference`: 133 files / 1,005
tests pass. The whole app-shell suite did not fit the 28-minute local
window; CI is the full reading.
- `type-check` (src and tests) clean for plugin-detail, i18n and
app-shell; ESLint `--quiet` on every changed file: 0 errors;
`check:test-source-alias` OK.
- Rewritten / converted tests: `RecordPageColumns.test.tsx` (new pinned
describe: threshold 744, auto-narrow 824→400 / 800→376 / 744→320 /
743→not pinned, drag, keyboard, drawer never pins, body table, narrowing
writes the implied tab with replace, `onShownTabChange`),
`RecordDetailView.recordPageTiers-26678` (host at 1440 / 1100 / 800 /
720 / 390, embedded, `?related=timeline` pinned and not, width
preference round-trip), `workspacePreference.test.ts` (details-width
codec). Deleted with the code they pinned:
`RecordPageColumns.switches-27052`,
`RecordDetailView.panelToggles-27052`.
- Tests that read the rail now open the 动态 tab or assert its absence:
`recordOpenWaves-13010`, `recordOpenOneRequest-28470`,
`timelineCount-28737`, `harness › relatedCountsFirst-27056`,
`accessibleNames-12625`, `topBar-27524`, `phoneFace-27058`,
`feedLoadFailure-29188`.
- Screenshots (1280 / 1440 / 1920, light and dark, with and without
other tabs) are attached in the project thread, plus the comment panel
open at 1280 / 1366 / 1440, the drawer at 1440 and the phone at 375; the
measured numbers are in the evidence comment.
- e2e: `ui/e2e/record-tabs-35595.spec.ts` (renamed from
`record-tabs-rail-35595.spec.ts`).

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No `packages/spec` change.)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes (changed files,
`--quiet`).
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset
(`.changeset/35890-record-details-pinned.md`), and both declaration
lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: not touched.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English (the 维护者速读 block is the
maintainer's summary, in the maintainer's language).
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01L6bhgUZTwDqtEFzNFCVTri
<!-- signed: repo:objectstack#1 · os-sales ·
session_01L6bhgUZTwDqtEFzNFCVTri -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

控制台整体观感收齐:字号收成两档、不再用加粗到 600 的字重,控件圆角统一成 8,内容区改白底

2 participants