mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 22:26:13 +00:00
chore: remove the dashboard's pre-snapshot feed
NEXT_PUBLIC_DASHBOARD_SNAPSHOT=false built a dashboard that read its tiles from two analytics slices, the widget layout, the mood analytics and the thresholds instead of the one snapshot cell. It took a rebuilt image to reach, and the snapshot has been the only path the published image runs since it became the default. The flag, its readers, the legacy reads in the dashboard hook and tile context, the slim and thick merge helper, the build-time toggle notes in .env.production.example and the self-hosting guide, and the tests that pinned the legacy wiring go.
This commit is contained in:
1 parent
d99456138b
commit
9dc519dd85
26 files changed
+106
-729
No files matched your search
@@ -195,26 +195,6 @@ bare Nginx — including the `X-Forwarded-For` chain shape that the
|
||||
rate-limiter trusts and the `TRUST_PROXY_HOPS` env var that pins how
|
||||
many hops to read back.
|
||||
|
||||
## Build-time feature toggles
|
||||
|
||||
A small number of toggles are `NEXT_PUBLIC_*` variables: the framework
|
||||
inlines them into the client bundle at **build time**, so the pre-built
|
||||
GHCR image cannot read them at runtime. Setting them in `.env` or the
|
||||
compose `environment:` block has no effect — they only take hold when
|
||||
you build your own image. They are intentionally absent from the
|
||||
compose runtime whitelist for that reason.
|
||||
|
||||
| Variable | Default | Effect when set |
|
||||
| -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `NEXT_PUBLIC_DASHBOARD_SNAPSHOT` | on | The dashboard hydrates every above-the-fold tile from the single `GET /api/dashboard/snapshot` cell so the whole strip shares one completion moment. Build with `NEXT_PUBLIC_DASHBOARD_SNAPSHOT=false` to fall back to the legacy four-cell path. |
|
||||
|
||||
To flip one, rebuild the image with the variable exported:
|
||||
|
||||
```bash
|
||||
NEXT_PUBLIC_DASHBOARD_SNAPSHOT=false pnpm build
|
||||
# or pass it as a Dockerfile build ARG / Docker build --build-arg
|
||||
```
|
||||
|
||||
## 7. Where to go next
|
||||
|
||||
| Next step | File |
|
||||
|
||||
Reference in new issue
Block a user