Commit ece3b28
add Server section to the admin panel and setup wizard
Fills in the Server piece of the `/admin/setup` wizard and its
admin-panel counterpart -- Base URL and Edition -- plus the shared
apply/restart plumbing the other wizard steps can plug into.
Highlights:
- `BaseUrlSection` with a Test-URL-then-Confirm flow. "Leave automatic"
actually clears a manually-set APP_HOME_URL via PATCH /install/prefs
rather than being a no-op skip, so the label matches the effect.
- `EditionSection` reusing the existing `ToggleEnterpriseWidget` in
admin-panel mode; a simple Community vs Full Grist picker in wizard
mode. Availability is a constructor option so storybook can drive
variants without runtime tricks.
- `PendingChangesManager` + `PartialApplyError`: sections implement a
small `ConfigSection` interface, the manager batches apply()s,
restarts the server once at the end when needed, and surfaces partial
failures with labelled per-section errors.
- Writes go through `PATCH /api/install/prefs` (the consolidated
envVars write path from c73044a), not a dedicated POST.
- `GET /api/config/server` reads activation prefs + process.env directly,
bypassing the memoized `getHomeUrl()` so the admin panel reflects
persisted writes without waiting for the restart.
- The Enterprise admin-panel stub now surfaces the installation ID via
a shared `buildInstallationIdDisplay` helper extracted from
`ToggleEnterpriseWidget`. Community builds omit the row since the
activation-status endpoint isn't mounted there.
- `AdminPanelCss` gains a couple of shared helpers (`buildConfirmedRow`,
moved `cssDangerText`/`cssErrorText`/`cssHappyText`) that other
sections can reuse.
- Storybook stories for `BaseUrlSection` and `EditionSection` so UI
states can be previewed without standing up a server. Aligns with
the convention in other in-flight wizard branches.
- Browser tests in `test/nbrowser/AdminPanelServer.ts` covering the
admin-panel item, the Test-and-Confirm flow, persistence through the
install/prefs endpoint, and the wizard getting-through-without-changes
and Apply-and-Continue paths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ab1a336 commit ece3b28
14 files changed
Lines changed: 1921 additions & 78 deletions
File tree
- app
- client/ui
- common
- server/lib
- storybook
- test/nbrowser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
| |||
118 | 134 | | |
119 | 135 | | |
120 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
0 commit comments