This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Repository navigation
Commit ee7e3a6
fix(plugin-calendar): show the lookup display name for a lookup titleField (#13480)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D2bmCsjnmZkrozUjaCZ8Xgr)_
Fixes #13471
Clause-②: no
Metadata-protocol: none
## What changed
`ObjectCalendar` resolved the author's `calendar.titleField` itself
(`String(record[titleField])` for any truthy value), so a lookup, which
arrives expanded as an object, printed the literal `[object Object]` on
every event. The title now goes to `getRecordDisplayName(objectSchema,
record, { titleField })`, which takes the field as its explicit rung
(ADR-0079) and already reduces an expanded reference to its display
name. Same fix family as objectui#12188 and objectui#8464.
Precedence is unchanged: the explicit `titleField` wins when it yields a
value, otherwise the object-level ladder (`nameField`, `titleFormat`,
type-aware derivation, `Record #id`) runs as before. The change is the
one function body in `packages/plugin-calendar/src/ObjectCalendar.tsx`,
plus a new test and a changeset.
## Acceptance notes
- Mechanism check: the PM hypothesis held on `origin/main` (cd70b78).
`resolveTitle` returned `String(v)` for an object value. No new fallback
or alias was added in the renderer; the existing core resolver is the
single authority (AGENTS.md #0.1).
- Pin:
`packages/plugin-calendar/src/__tests__/ObjectCalendar.lookupTitleField-13471.test.tsx`
covers an expanded `{ _id, name }` and `{ id, name }` lookup (shows the
name), a raw id string (unchanged), and an expanded object with no
usable name or a null value (never `[object Object]`, falls through to
`nameField`).
- Reverse verification (fix committed first, then `ObjectCalendar.tsx`
checked out from the base commit with a restore trap): 2 of 3 tests red
on the base source (expanded name, no-usable-name), the raw-id test
green on both sides as intended. After restore `git diff HEAD` was empty
and the implementation line was present.
- Local gates on head 9e316d4, all exit 0: vitest
`packages/plugin-calendar/` from the repo root (64 files passed, 465
tests passed, 95 skipped); `pnpm --filter @object-ui/plugin-calendar run
type-check` (the test tsconfig lists the new test file) after building
the workspace dependency closure; `pnpm --filter
@object-ui/plugin-calendar run lint` (0 errors, warnings pre-existing);
`node scripts/check-changeset-presence.mjs`; `pnpm run changeset:check`;
`node scripts/check-changeset-claims.mjs`; `pnpm run
check:new-line-citations` (0 new citations).
- Behaviour note: a numeric `0` or boolean `false` titleField value used
to fall through to the object-level title (falsy); the shared resolver
counts it as a value and prints it. Not a real-world title case; noted
for completeness.
- Not measured: a live browser check against the hotsrm audit calendar;
CI covers the full suite.
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent b41ed7f commit ee7e3a6
3 files changed
Lines changed: 138 additions & 14 deletions
File tree
- .changeset
- packages/plugin-calendar/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1030 | 1031 | | |
1031 | 1032 | | |
1032 | 1033 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
0 commit comments