Repository navigation
fix(ui): kanban owner, history timeline, user menu and presence stack draw letters-only initials - #36484
Conversation
…ared rule Move getPersonInitials to @object-ui/types (the lowest package the user menu in @object-ui/auth can reach); @object-ui/fields re-exports it. The kanban card owner and history timeline call it through @object-ui/fields, the user menu and presence stack through @object-ui/types. Claude-Session: https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds Co-authored-by: Claude <noreply@anthropic.com>
…ollow the shared rule; changeset Claude-Session: https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds Co-authored-by: Claude <noreply@anthropic.com>
…s to the shared rule Claude-Session: https://claude.ai/code/session_01QsR2jUc3qp6bHKSWijbjds Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jUc3qp6bHKSWijbjds Final head (area f7-list, 2026-11-22T14:22Z): Route: one initials rule,
L1 requested from |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jS7jCv5PH4ytECQWqf L1 ACCEPT · head 维护者速读
席位核对
|
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jTeURPvEm465RcoYEC Contract reviewServed-tier: Inputs read: card #36346 (body, triage, claim, os-dev-report, claim amendment), PR #36484 (body, 12-file list, net diff against ① Derived judgments
② Semver level
③ Boundary flags
No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · zhuangjianguo · session_01QsR2jUc3qp6bHKSWijbjds Landing (area f7-list, 2026-11-22T14:31Z): head |
Fixes #36346
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
What changes
getPersonInitials(letters only, since the people-cell fix) moves from@object-ui/fieldswidgets/personDisplay.tsto a new@object-ui/typesmoduleperson-initials.ts, exported from the types barrel.@object-ui/fieldsre-exports the same function frompersonDisplay.ts, so its owngetPersonInitialsexport, its callers and its rule tests are unchanged.@object-ui/typesand not@object-ui/fields(measured from each package.json):@object-ui/authdeclares no@object-uidependency at all (only@objectstack/specandbetter-auth), while@object-ui/fieldspulls in components, core, react, react-runtime, mobile, permissions and the markdown stack. Making the auth client depend on the field-renderer tier for one string helper inverts the tier order.@object-ui/typeshas no@object-uidependency of its own,@object-ui/collaborationand@object-ui/fieldsalready depend on it, and it is the same home, for the same reason, as the transient-HTTP-retry and in-flight-GET helpers already there. No cycle: nothing in the types closure depends on auth or collaboration.ownerInitialsinKanbanCardOwner.tsis now a re-export ofgetPersonInitialsfrom@object-ui/fields(the package already depends on it). The board fileKanbanImpl.tsxis deliberately left untouched so this PR does not conflict textually with the open kanban PR that edits the same import block.HistoryTimeline.tsxdrops its privateinitialsFromNameand callsgetPersonInitialsfrom@object-ui/fields(a declared peer, already used byCommentAuthorAvatar).getUserInitialsin@object-ui/authkeeps its signature and its email fallback, and reads the name throughgetPersonInitialsfrom@object-ui/types;@object-ui/authgains the@object-ui/typesdependency (lockfile updated). It is the functionUserMenu, app-shell'sAccountMenuand the Console profile page draw with.PresenceAvatars.tsxdrops its privategetInitialsand callsgetPersonInitialsfrom@object-ui/types.AdmingivesAD, wasA) and a three-word name gives first and last (John Michael DoegivesJD, wasJM). The two auth unit tests that pinned the old outputs are updated.pnpm --filter @object-ui/types build,ui/packages/types/dist/index.d.tscarriesexport { getPersonInitials } from './person-initials.js';anddist/person-initials.d.tsdeclaresgetPersonInitials(name: string): string;git grep getPersonInitials origin/main -- ui/packages/types/srcanswers exit 1 (control:git grep sharedGetJson origin/main -- ui/packages/types/src/index.tsexit 0). A new export, nothing removed:yes (widening).ownerInitialswas never reachable from the@object-ui/plugin-kanbanentry (index.tsxdoes not exportKanbanCardOwner), so its change from function to re-export narrows nothing.Tests
ui/packages/app-shell/src/__tests__/personInitialsFamily-36346.test.tsx: oneAlice (Sales)name, four faces, each must drawAS— the realObjectKanbanowner avatar (withownerField), the realHistoryTimeline,getUserInitials, and the realPresenceAvatars. It lives inapp-shellbecause that is the one package depending on all four, so no new dependency edge.scripts/ablation-replace.mjs(anchor hit x1 -> x0, marker x0 -> x1, blob0eb3e2f40c06->72b58dc1b626): the rule's first line replaced by the old naive split (name.split(' ').map((p) => p[0])...). The family pin went 4 failed of 4 — kanban owner, history timeline and presence stack each drewA(whereASwas expected,getUserInitialsanswered'A('. Restored by the tool: blob after restore0eb3e2f40c06== HEAD blob,git diff HEADempty, marker count 0. Nodist/in the path: every@object-ui/*specifier in these tests resolves tosrcthroughui/vitest.config.mts's alias map.Test runs
All runs through
scripts/pm/os-verify-lock.sh, on head998bb5fdd1(afterorigin/mainmerged):pnpm --dir ui exec vitest run --maxWorkers=2 --reporter=verbose packages/app-shell/src/__tests__/personInitialsFamily-36346.test.tsx packages/plugin-kanban/ packages/auth/ packages/collaboration/ packages/plugin-detail/src/__tests__/HistoryTimeline.test.tsx packages/plugin-detail/src/__tests__/HistoryTimeline.actionLabel-28894.test.tsx packages/fields/src/widgets/personDisplay.test.ts—Test Files 140 passed (140),Tests 1148 passed (1148),VERDICT command-exit 0; the four family-pin cases each listed passed.96825e61(before the main merge):packages/auth/ packages/collaboration/ packages/plugin-detail/ packages/fields/src/widgets packages/types/src/__tests__plus the pin —Test Files 1005 passed | 1 skipped (1006),Tests 16417 passed | 18 skipped,VERDICT command-exit 0.pnpm --dir ui exec vitest run --maxWorkers=2 scripts/—Test Files 172 passed | 2 skipped (174), exit 0.pnpm turbo run build --concurrency=2 --filter='@object-ui/plugin-kanban^...'(53 tasks successful):pnpm --workspace-concurrency=1 --filtertypes, fields, auth, collaboration, plugin-detail, plugin-kanbanrun type-check— each package'stsc --noEmit && tsc -p tsconfig.test.jsonechoed,VERDICT command-exit 0.Acceptance notes
content/docs/frontend/plugins/plugin-detail.mdxandui/packages/plugin-detail/README.mdnamegetPersonInitialsof@object-ui/fields; that stays true (re-export), so no docs edit.app-shelltype-check is declared to CI (Type Check UI): its dependency closure is most ofui/; the six packages whose source changed were type-checked locally.Verification
Local gate subset
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 60 families for this diff (tree998bb5fdd); each ran with its exit captured before any pipe: 58 exit 0,pnpm --dir ui exec vitest run scripts/exit 0,pnpm check:dual-build-cjs-loadsexit 3 = NOT MEASURED (PREREQUISITE NOT MET: nodist/for 35 packages, it needs a fullpnpm build; CI measures it).--ranreconciliation:✓ dispatch-gates --ran: 60 derived famil(ies) accounted for — 59 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).node scripts/check-platform-checklist.mjs --changed-from origin/mainexit 0 (0 anchored files in the change set).node scripts/pm/overlap-check.mjsVERDICT clean exit 0(origin/main and two open PRs that share files merge cleanly).Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/__tests__/personInitialsFamily-36346.test.tsx— expect 4 passed.Read first (by risk):
ui/packages/auth/src/types.ts(the user-menu output change and the new dependency),ui/packages/types/src/person-initials.ts(the moved rule, byte-identical body),ui/packages/plugin-kanban/src/KanbanCardOwner.ts(the re-export).Generated by Claude Code