You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2f8e8ba
Browse filesBrowse the repository at this point in the historyBrowse files
fix(record-page): no empty Activity stream tab when an object switches off all three of its sources (#36783)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ87Aq2qvBEo7uvnH8jmQeYKf)_Fixes#36693
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 记录详情页:对象把讨论、活动、字段变更三个来源都关掉后,「动态」页签不再出现;任一来源开着,页签照旧。
- 落实你对 36627 的裁决(选 A′):「动态」页签跟随对象的能力开关,和「附件」跟随文件开关一样;「审批」不变。
- 只影响默认生成的记录页,手工设计的页面照作者摆放;出错最多是页签多一个或少一个,数据不受影响,可直接撤回。
- 无。
## What changes
The default record page's 动态 (Activity stream) tab merges three sources,
each switched by the object: the discussion (`enable.feeds`, opt-out),
activities (`enable.activities`, opt-out) and field changes
(`enable.trackHistory`, opt-in). An object with all three off still drew
the tab, empty, on every record page. Ruling A′ on #36627 (the
maintainer, project chat, 2026-11-23T11:57Z: 「36627 选 A′」): the stream
tab follows the object's capability switches, the way Attachments
follows `enable.files`.
- **`@object-ui/plugin-detail`** — `buildDefaultPageSchema` /
`buildDefaultTabs` (via `synthTabs`) emit no stream tab and no
`record:activity` node when `feeds` and `activities` are both `false`
and `trackHistory` is not `true` (new internal `streamHasSource`). The
wide layout's 动态 column comes off the same page, so it goes too
(`buildDefaultPageColumns` already handles an empty stream). An authored
`discussion` slot still draws whatever the switches say; an authored
(assigned) page is untouched. A `relatedLists` entry `'sys_activity'`
does not bring the tab back: `arrangeDeclaredTabs` only places tabs that
were built. A field's own `trackHistory` / `fieldHistory` are not read:
they decide whether a change shows its old → new values, not whether
changes show.
- Docs: `content/docs/ui/pages.mdx` (the synthesized default) and
`ui/packages/plugin-detail/README.md` say when 动态 is left out.
- Approvals is unchanged (CONTROL): drawn only when the record has
approval requests.
Read first (by risk):
1. `ui/packages/plugin-detail/src/synth/buildDefaultPageSchema.ts` —
`streamHasSource` and its two call sites (`synthTabs`,
`buildDefaultPageSchema`'s `timeline`).
2.
`ui/packages/plugin-detail/src/synth/__tests__/buildDefaultPageSchema.test.ts`
— the new describe block.
## Tests
Head `aecc0379`.
- `pnpm --dir ui exec vitest run packages/plugin-detail/src/synth/
packages/plugin-detail/src/__tests__/RecordPageColumns
packages/plugin-detail/src/__tests__/RecordTabRow
packages/plugin-detail/src/__tests__/RecordTimeline` → `Test Files 27
passed (27)`, `Tests 389 passed (389)`. New: `activity stream tab
follows its sources (objectstack#36693)` — all off → `['details']` and
no `record:activity`; each one source on → `['details','timeline']` (one
key per control); a `'sys_activity'` entry does not revive it (control:
with a source on it places the tab); an authored discussion slot still
draws; Approvals CONTROL; a details slot keeps the gate.
- `pnpm --filter @object-ui/plugin-detail type-check` exit 0.
- Head `7f15e128` (lint half dropped, comment-only change in the
source): `pnpm --dir ui exec vitest run
packages/plugin-detail/src/synth/` → `Test Files 17 passed (17)`, `Tests
237 passed (237)`; changeset, doc-authoring, doc-anchors,
issue-citations, nul-bytes and affected-docs gates exit 0.
## Acceptance notes
- The card's lint warning for a `'sys_activity'` entry on such an
object: dropped — new lint warning; new gates default no.
- The console's own gate for field changes in the stream
(`historyEnabled`) also needs `sys_audit_log` registered. The
synthesizer reads the object alone, so an object with `trackHistory:
true` on a host without the audit object still gets the tab (as today).
Not changed here: the card names the object's switches.
- The Studio "new record page" seed also starts from
`buildDefaultPageSchema`, so for an all-off object it no longer seeds a
`record:activity` block (it would have drawn nothing). An author can
still place one.
## Verification
<details><summary>Local gate subset (29 commands from
<code>dispatch-gates.mjs --commands</code>, all exit 0 at
<code>aecc0379</code>)</summary>
The doc, changeset, citation, published-file, test-input and
type-check-ratchet families from the derived list:
`check-adr-0087-registration`, `check-changeset-no-major`,
`check-empty-changeset`, `check-closing-keyword-parity`,
`check-docs-section-name`, `check-issue-citations`,
`check-doc-route-spelling --advisory`, `docs-audit/check-affected-docs`,
`docs-audit/check-drift-comment`, lint `check:doc-formula-expressions`
and `check:doc-security-posture`, `check:doc-authoring`,
`check:doc-anchors`, `check:doc-frontmatter`, `check:docs-single-h1`,
`check:docs-spec-enumerations`, `check:issue-citations`,
`check:nul-bytes`, `check:published-readme-links`,
`check:published-files`, `check:cross-package-test-inputs`,
`check:test-source-alias`, `check:keyed-text-bounds`, `check:role-word`,
`check:corpus-claim-drift`, `check:closed-ceremony-text`,
`check:type-check-coverage`, `check:type-check-debt`,
`check:changeset-gate-self-tests`. The rest of the derived list and the
full farm run in CI.
</details>
Browser check (showcase app, zh-CN, 1440 × 900 and 900 × 900,
`showcase_contact` given `enable: { feeds: false, activities: false }`
locally for the run, not committed; frames are attached in the project
thread, since GitHub image upload is browser-only):
1. Before (the gate forced open, same record): the right column's tabs
read 发票 · 动态, and 动态 has nothing to draw.
2. After, wide: the right column reads 发票 only; no 动态 anywhere on the
page (`document.body.innerText` has no 动态).
3. After, 900 px: the same, 发票 only.
4. Control, `showcase_account` (sources on by default, `trackHistory:
true`): 详情 · 联系人 · two lookup lists · 动态, unchanged.
The showcase's `showcase_project` has an authored record page, so it
keeps what its author placed; that is the card's "an assigned page keeps
drawing what its author placed".
Two-minute check: give `showcase_contact` `enable: { feeds: false,
activities: false }`, open any contact: the right column shows 发票 and no
动态. Remove `feeds: false` and 动态 is back at the end.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JQwxbZqzpvmAjPGjiWCwwS)_
<!-- signed: repo:objectstack#1 · os-warren ·
session_01JQwxbZqzpvmAjPGjiWCwwS -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(record-page): the default record page draws no empty 动态 (Activity stream) tab when the object switches off all three of its sources
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The activity stream merges three sources, each switched by the object: the discussion (`enable.feeds`), activities (`enable.activities`) and field changes (`enable.trackHistory`). An object that turned off all three still showed a 动态 tab on every record page, with nothing in it. The synthesized default page now leaves that tab out, the same way the Attachments tab follows `enable.files`: with `enable: { feeds: false, activities: false }` and `trackHistory` not `true`, `buildDefaultPageSchema` / `buildDefaultTabs` emit no stream tab and no `record:activity` node, and the wide layout draws no 动态 column. With any one source on, the tab is drawn as before. A `relatedLists` entry `'sys_activity'` on such an object does not bring the tab back. An authored page, or an authored `discussion` slot, still draws what its author placed. The Approvals tab is unchanged: it is drawn only when the record has approval requests.
Copy file name to clipboardExpand all lines: content/docs/ui/pages.mdx
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,7 +190,10 @@ and related-list columns). A relationship whose child field declares `relatedLis
190
190
is part of the record's body: its list is a full-width table in the details, after the field
191
191
sections drawn open, with no tab of its own. **动态**
192
192
(`?related=timeline`) holds the record's system entries: its activity and, with
193
-
`enable: { trackHistory: true }`, its field changes; there is no separate History tab. On the
193
+
`enable: { trackHistory: true }`, its field changes; there is no separate History tab. An object
194
+
with `enable: { feeds: false, activities: false }` and no `trackHistory` gives the stream
195
+
nothing to show, so its page draws no **动态** tab, and a `relatedLists` entry
196
+
`'sys_activity'` does not bring it back. On the
194
197
desktop the record's comments are not in it but in the comment panel, opened from the
195
198
comments icon in the record header ([the record's comment panel](/docs/frontend/plugins/plugin-detail#the-records-comment-panel)); on a phone they are still
196
199
in **动态**, with its All / Activity / Discussion / Changes filter. A list's tab is that list's
0 commit comments