Commit 12bf669
The discussion panel spent every feed fetch asserting "No comments yet" — a
factual claim about the record — then contradicted itself when the rows landed.
#3205 gave RecordActivityTimeline the render branch that prefers a loading row
over the empty copy, and RecordChatterPanel already forwarded `loading` to it in
both positions, but on the chatter chain nothing PRODUCED the signal, so the
branch could never fire. `record:activity` computes its own flag and was fixed
by #3205 on sight; chatter was not.
Closes all four wiring points, because any one left open still ships the empty
copy to some user:
- RecordDetailView — the host that owns the fetch — derives `feedLoading`
from its two reads (sys_comment + sys_activity);
- <DiscussionContextProvider loading={feedLoading}> publishes it (the field
was already declared on DiscussionContextValue and already read by
`record:activity`);
- the auto-appended <RecordChatterPanel loading={feedLoading}> — what
authored pages that place no discussion slot get — takes it directly;
- the `record:chatter` / `record:discussion` renderer forwards
`loading={discussion?.loading}`, putting hand-placed blocks on the same
chain as the synthesized one.
The two reads are parallel promises, so the flag closes over BOTH: it clears on
Promise.allSettled, and a REJECTED read counts as an answer (sys_activity 404s
without the audit plugin, sys_comment 403s under `enable.feeds: false`) — a
permanent spinner would be worse than the bug being fixed. The flag is keyed by
`object:recordId` rather than a plain boolean so the first render of a record
already reads as loading (no one-frame flash of the empty state) and navigating
between records cannot show the previous record's settled answer.
No consumer-side tolerance was added: the timeline still does not guess that
"no items yet and just mounted" means loading. Same shape as #3165 / #3205 —
divergence converges at the producer.
Tests pin the rendered outcome (loading row vs. empty copy), not prop passing,
on both delivery paths — the synthesized page's DiscussionContext hop and the
authored page's auto-append — plus the one-settled-of-two and rejected-read
cases. Each of the four wires was mutation-verified red.
Claude-Session: https://claude.ai/code/session_01NVPjPzmmAJ2Ngtvgg5MSRa
Co-authored-by: Claude <noreply@anthropic.com>
1 parent d2363e7 commit 12bf669
5 files changed
Lines changed: 593 additions & 5 deletions
File tree
- .changeset
- packages
- app-shell/src/views
- plugin-detail/src/renderers
- __tests__
| 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 | + | |
0 commit comments