Repository navigation
Commit 7a37823
fix(app-shell, plugin-gantt): launcher tile draws app branding; gantt name column names its object (#28017)
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg8wLwMKzX6awY8FEtvzGD9X)_
Fixes #27386
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:控制台首页的应用图标(及 `app:launcher` 区块)改为读应用自己的品牌:有 `branding.logo` 画
logo,否则有十六进制 `branding.primaryColor`
就用该色的图标块,两者都没有才回到按名字哈希的渐变色;甘特图左侧名称列的表头,绑定对象时改为该对象的标签(如 “Campaign”),不再固定为
“Task Name”。
- **为什么改**:HotCRM 品牌是橙色,首页图标却是粉色(顶栏和应用切换器早已读品牌色,只有首页没读);活动、合同甘特图的名称列都写着
“Task Name”。卡片第 2、4 行,均为纯 ui 改动,不加新键。
- **风险与回滚**:低。未声明品牌的应用外观不变;内联数据、无标签对象、混合对象树(`objectField`)的甘特表头仍是 “Task
Name”。回滚即 revert 本 PR。
- **先看**:`ui/packages/app-shell/src/console/home/HomeAppsStrip.tsx` 的
`LauncherAppIcon`;`ui/packages/plugin-gantt/src/ObjectGantt.tsx` 的
`taskColumnLabel`
传参;`ui/packages/app-shell/src/layout/appTileColors.ts`(从 `AppMark`
移来的共享类名与样式)。
- **两分钟验证**:`pnpm --dir ui exec vitest run
packages/app-shell/src/console/home/__tests__/HomeAppsStrip.branding-27386.test.tsx
packages/plugin-gantt/src/ObjectGantt.taskColumnLabel-27386.test.tsx`,预期
7 个测试全绿。
- **需要你做的**:无,席位落地。
## What changes
Rows 2 and 4 of #27386. Rows 1, 3 and 5 each need a new spec key and are
carded by the seat in `domain:spec`: row 1 as #28018 (kanban lanes) and
#28020 (view filter OR group), row 3 as #28021 (calendar initial date),
row 5 as #28022 (per-audience landing). With every row owned, this PR
closes the card.
- **Row 4 — launcher tile branding (`@object-ui/app-shell`).** The home
"Your apps" strip, which the `app:launcher` block also mounts, drew
every app's 56 px icon square on a gradient picked by hashing
`app.name`. It now follows the same ladder `AppMark` draws in the
top-bar pill and the app switcher: the `branding.logo` image when
declared; else the app's `icon` on its `branding.primaryColor` when that
is a hex; else the `icon` on the name-keyed gradient, unchanged. A logo
that fails to load falls back to the tile. The favourite badge rides on
every face. The branded tile reuses `appTileColors` (light and dark
colours), and the tile class string plus its CSS custom properties move
from `AppMark.tsx` into `appTileColors.ts` (`BRANDED_TILE_CLASSES`,
`appTileStyle`) so both surfaces draw one tile. The colour reaches the
DOM only as CSS custom properties that static utilities read (the
ui/AGENTS.md section 2 author-declared colour carve-out), as `AppMark`
already did.
- **Row 2 — gantt name column title (`@object-ui/plugin-gantt`).**
`GanttView` takes an optional `taskColumnLabel` prop and falls back to
the `gantt.column.taskName` string. `ObjectGantt` passes the bound
object's label, resolved through `useObjectLabel().objectLabel` (the
translated object label every other surface uses). It passes nothing, so
the heading stays "Task Name", for an inline data set, an object that
declares no label, and a mixed-object tree (`gantt.objectField`), whose
rows are not all the bound object. No new key: a configurable title is a
spec change and stays out (the card's suggestion of a title key on gantt
config is not built).
## Tests
-
`ui/packages/app-shell/src/console/home/__tests__/HomeAppsStrip.branding-27386.test.tsx`
(3 cases): hex colour replaces the gradient and publishes the four
custom properties `appTileColors` derives; no colour and a non-hex
colour keep the name-keyed gradient; a logo draws, keeps the favourite
badge, and falls back to the coloured tile on `error`.
-
`ui/packages/plugin-gantt/src/ObjectGantt.taskColumnLabel-27386.test.tsx`
(4 cases): bound object label heads the column; generic heading for an
unlabelled object, a mixed-object tree and an inline data set. The
generic cases read the heading after the object schema read has settled.
## Acceptance notes
Per-row triage, re-measured on `main` 4694365:
| Row | Bucket | Reading |
|---|---|---|
| 1 | CARD (two) | `KanbanConfigSchema` declares `groupByField`,
`summarizeField`, `titleField`, `columns` only: no lane list and no
hide-empty key. A list view's `filter` is an array of flat
`ViewFilterRuleSchema` rules (`field`, `operator`, `value`), AND-only;
the `$or` grouping exists only in `FilterConditionSchema`, which a
stored view's `filter` does not take. Both need spec keys. |
| 2 | TAKEN (this PR) | Default heading = bound object label; no new
key. |
| 3 | CARD | `CalendarConfigSchema` declares five field bindings and no
initial-date key; `ObjectCalendar` seeds its current date with `new
Date()`. #27895 added Studio settings for calendar and gantt but no such
key exists in the spec. |
| 4 | TAKEN (this PR) | Tile reads `branding.logo` / hex
`branding.primaryColor`. |
| 5 | CARD | The landing is the first shown nav entry; `homePageId` is
retired; `navigationContributions` append only. A per-audience landing
is a new app or manifest key. |
- The `tile-grid` page block still tints its generic tiles with
`launcherIconGradient(href || label)`: those tiles are authored links,
not apps, and carry no branding. Not changed.
- `AppCard.tsx` (the older marketing card) is not mounted by Home or the
launcher block; not changed.
## Verification
<details><summary>Ablation (red-first), on 98f7880</summary>
Through `scripts/ablation-replace.mjs`, each leg restored with blob
equal to HEAD and `git diff HEAD` empty:
- `HomeAppsStrip.tsx`: `appTileColors(...)` replaced by `undefined` →
branding test `2 failed | 1 passed (3)` (the gradient control stays
green).
- `GanttView.tsx`: `taskColumnLabel ||` removed → heading test `1 failed
| 3 passed (4)` (the three generic controls stay green).
</details>
<details><summary>Local gates on 98f7880: dispatch-gates derived 35,
all run, all exit 0</summary>
`node scripts/pm/dispatch-gates.mjs --ran` → `35 derived famil(ies)
accounted for — 35 run, 0 NOT-MEASURED`. Outside the derivation: `pnpm
check:changeset-fixed` (its roster lives under `.changeset/`), and
`type-check` for both touched packages. `pnpm --dir ui
check:new-line-citations` → `0 new citation(s)`.
```text
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-sdui-manifest.mjs :: exit 0
node scripts/check-sdui-manifest.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --dir ui exec vitest run scripts/ :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:dispatcher-error-vocabulary :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:error-status-conformance :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-changeset-deadline-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0
pnpm check:changeset-fixed :: exit 0
pnpm --filter @object-ui/app-shell run type-check :: exit 0
pnpm --filter @object-ui/plugin-gantt run type-check :: exit 0
```
Tests: the two new files `7 passed (7)`; with neighbours (every
`console/home/__tests__/` file, `AppSwitcher.appIdentity-12201`,
`ObjectGantt.exportFileName.i18n`, `GanttView.layout`) `Test Files 37
passed (37)`, `Tests 242 passed (242)`. CI families: this PR's
check-runs.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Utp6CYw9w9VeYi5rKNEsNK
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3f02da1 commit 7a37823
9 files changed
Lines changed: 295 additions & 39 deletions
File tree
- .changeset
- ui/packages
- app-shell/src
- console/home
- __tests__
- layout
- plugin-gantt/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | 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 | + | |
53 | 102 | | |
54 | 103 | | |
55 | 104 | | |
| |||
169 | 218 | | |
170 | 219 | | |
171 | 220 | | |
172 | | - | |
173 | 221 | | |
174 | 222 | | |
175 | | - | |
176 | 223 | | |
177 | 224 | | |
178 | 225 | | |
| |||
183 | 230 | | |
184 | 231 | | |
185 | 232 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 233 | + | |
194 | 234 | | |
195 | 235 | | |
196 | 236 | | |
197 | 237 | | |
198 | 238 | | |
199 | | - | |
| 239 | + | |
200 | 240 | | |
201 | 241 | | |
202 | 242 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 45 | | |
56 | 46 | | |
57 | 47 | | |
| |||
92 | 82 | | |
93 | 83 | | |
94 | 84 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 85 | + | |
105 | 86 | | |
106 | 87 | | |
107 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
738 | 743 | | |
739 | 744 | | |
740 | 745 | | |
| |||
928 | 933 | | |
929 | 934 | | |
930 | 935 | | |
| 936 | + | |
931 | 937 | | |
932 | 938 | | |
933 | 939 | | |
| |||
3821 | 3827 | | |
3822 | 3828 | | |
3823 | 3829 | | |
3824 | | - | |
| 3830 | + | |
3825 | 3831 | | |
3826 | 3832 | | |
3827 | 3833 | | |
| |||
0 commit comments