Commit b5e9aaa
feat(FR-3877): move the system announcement to the domain app config
The announcement lived in the manager's legacy announcement endpoint
(`/manager/announcement`, etcd) as one markdown string whose first line
the banner lifted out as a title. It now lives in the domain app config
as `domainConfig.announcement = { enabled, title, body, updatedAt }`, in
line with the other app-config migrations under FR-1203.
- `useUpdateDomainAppConfig()` joins the app-config hooks: resolves the
domain uuid through `domainV2.entityId` (DOMAIN scope is addressed by
uuid, the client only knows the name), re-reads the raw DOMAIN-scope
`domainConfig` fragment, replaces one sub-key (`undefined` removes it)
through `scopedUpsertAppConfigFragments`, then refetches the merged
`myAppConfigs(['domainConfig'])` view so `useDomainAppConfig` readers
update without a reload.
- `AnnouncementBanner` reads `useDomainAppConfig('announcement')`. The
title shows in every state; the body (markdown) renders behind the
expand toggle. Dismissal is keyed by `updatedAt` instead of the message
text, so a re-published announcement resurfaces the banner.
- `AnnouncementEditModal` gains a Title field and the Enabled checkbox
the legacy endpoint could not persist (it stored by presence only);
Delete removes the sub-key. The content suspends on the Relay read
behind a skeleton-bodied modal fallback.
- `announcementSummary.ts` (first-line extraction, markdown-to-prose) and
`useSuspenseGetAnnouncement` (TanStack) go away with the derived title;
`announcement.ts` keeps the code-point title cutoff and the visibility
and collapsibility predicates. `service.get_announcement` /
`update_announcement` stay in the client library but have no caller.
No manager-version fallback: the app-config reads need 26.9.0+, which the
LTS this ships in guarantees.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B13bqRK3V12jiCvia8fm2w1 parent 2cbfdfe commit b5e9aaa
31 files changed
Lines changed: 687 additions & 561 deletions
File tree
- react/src
- __generated__
- components
- helper
- hooks
- resources/i18n
Lines changed: 110 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 131 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | | - | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
54 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
70 | 66 | | |
71 | 67 | | |
72 | 68 | | |
| |||
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
92 | 87 | | |
93 | | - | |
| 88 | + | |
94 | 89 | | |
95 | 90 | | |
96 | 91 | | |
| |||
101 | 96 | | |
102 | 97 | | |
103 | 98 | | |
104 | | - | |
| 99 | + | |
105 | 100 | | |
106 | 101 | | |
107 | 102 | | |
| |||
125 | 120 | | |
126 | 121 | | |
127 | 122 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
0 commit comments