feat(homepage): recategorise on "do I open this?", collapse the API groups
The board mixed tools with endpoints. A vLLM seat whose href is a /docs page
sat in the same band as ComfyUI; the MQTT broker and the RustDesk relay, which
have no page at all, sat in Apps; and `Service Networking` was thirteen members
spanning three AdGuards, five Dockges, two Traefiks and four headless agents.
Every group is now one of two kinds and they never mix. TOOLS are expanded and
sit at the top of their tab. ENDPOINTS — an API, a broker, a background agent,
an href that is /docs or /ping or nothing — carry `initiallyCollapsed: true`
and sit at the bottom. Collapsed is not hidden: the eyebrow and its rule still
render, so the tab still says the thing exists and one click expands it.
A second rule fell out of the same pass and now shapes the group boundaries: a
group's members should all carry a widget or none should. A stat strip makes a
card ~50px taller, so one widget card in a row of plain ones opens a void under
the plain ones. That is why AdGuard and Traefik get their own groups rather
than sharing one with Dockge, and it is most of why the old Service Networking
band looked broken. AdGuard (ANA) was the last short card in its row and now
carries the same query/blocked/latency strip as its two siblings — one
infra-ops AdGuard login authenticates against all three instances, verified
against each; it lives in that stack's .env on the host and is vaulted.
The sixteen GPU-backed model seats were deliberately NOT relabelled.
`homepage.group` is read at container creation, so clearer names for
`AI - Inference` and friends would have cost a recreate on six vLLM seats, four
eval seats and four TTS engines — multi-minute model reloads on endpoints peers
reach through the gateway. Order plus `initiallyCollapsed` buys the same
separation for nothing, so those names stay as they are on purpose.
28 containers that ARE cheap to bounce were relabelled, across five hosts, via
rerunnable elway playbooks. Their label steps are gated on the old value still
being present, so a second run reports skipped rather than churning. Two verify
steps were wrong on first contact and are fixed with the reason recorded: the
traefik check raced its own recreate, and asserting a model seat is "running"
cannot answer "did I bounce it" when a seat may be legitimately stopped —
container age can, and now does.
The canonical stacks/ tree was synced to the deployed labels afterwards, so
intent and reality agree again on all fourteen tracked stacks.
Also documents the real nature of the post-recreate blank dashboard, which cost
~25 minutes here and an hour on 2026-08-19. `initialSettings":{}` in the served
HTML is the catch branch of the page's data loader, not a warm-up and not a
cache — and the error can vanish entirely, because the logger is assigned inside
the same try and the catch only logs if the logger exists. Ruled out by
measurement this time: all four API routes return 200 with correct content while
the page serves {}, and the previous known-good settings.yaml reproduces it
identically. The README now carries the one-command test and the next lead.
Before/after, all four tabs: http://10.100.10.50:8090/b/homepage-relayout/
This commit is contained in:
+114
-13
@@ -33,11 +33,44 @@ recreated.
|
||||
|
||||
## Layout
|
||||
|
||||
`conf/settings.yaml` owns tabs, group order, and column counts — `services.yaml`
|
||||
owns *what exists*, `settings.yaml` owns *where it sits*. Four tabs: Main, AI,
|
||||
Infrastructure, Toolchain. A group listed in `layout:` with no members simply
|
||||
renders empty, so a group can look "dead" when its provider host is unreachable
|
||||
rather than when the group is wrong.
|
||||
`conf/settings.yaml` owns tabs, group order, column counts and collapse state —
|
||||
`services.yaml` owns *what exists*, `settings.yaml` owns *where it sits*. Four
|
||||
tabs: Main, AI, Infrastructure, Toolchain. A group listed in `layout:` with no
|
||||
members simply renders empty, so a group can look "dead" when its provider host
|
||||
is unreachable rather than when the group is wrong.
|
||||
|
||||
**The organising question is "do I open this?", not "what is it?"** (operator,
|
||||
2026-08-24). Every group is either **tools** — expanded, top of its tab — or
|
||||
**endpoints** (an API, a broker, a background agent, an href that is a `/docs`
|
||||
page or a `/ping` or nothing) — `initiallyCollapsed: true`, bottom of its tab.
|
||||
A collapsed group still renders its eyebrow and rule, so the tab tells you the
|
||||
thing exists without spending a row on it. `AI - Inference` holds the seats the
|
||||
whole fleet runs on and it is collapsed, because you reach them through the
|
||||
gateway, not by clicking them.
|
||||
|
||||
A second, quieter rule shapes the same block: **a group's members should all
|
||||
have widgets or all not have them.** A stat strip makes a card ~50px taller, so
|
||||
one widget card in a row of plain ones opens a void under the plain ones. That
|
||||
is why AdGuard (3 widget cards) and Traefik (2 widget cards) are separate groups
|
||||
from Dockge (5 plain cards) rather than one `Service Networking` band.
|
||||
|
||||
Group *membership* is not in this file — it is the `homepage.group=` label on
|
||||
each container, and labels are read at container **creation**. The 2026-08-24
|
||||
pass moved 28 services and the playbooks that did it are rerunnable:
|
||||
|
||||
```bash
|
||||
scripts/elway infra-ops@10.250.50.70 --playbook playbooks/homepage-regroup-ana-docker.yaml
|
||||
scripts/elway infra-ops@10.0.50.45 --playbook playbooks/homepage-regroup-esh-docker-vm.yaml
|
||||
scripts/elway infra-ops@10.100.50.40 --playbook playbooks/homepage-regroup-nh3-docker.yaml
|
||||
scripts/elway infra-ops@10.100.79.3 --playbook playbooks/homepage-regroup-irv-ml1.yaml
|
||||
scripts/elway infra-ops@10.250.50.54 --playbook playbooks/homepage-regroup-ana-ml2.yaml
|
||||
```
|
||||
|
||||
⚠ **The GPU-backed model seats are deliberately still named `AI - Inference`,
|
||||
`AI - Eval & Retrieval`, `AI - Speech (TTS)` and `AI - Audio Tools`.** Clearer
|
||||
names would cost a recreate on sixteen seats — multi-minute model reloads on
|
||||
endpoints peers reach through the gateway. Order and `initiallyCollapsed` buy
|
||||
the same separation for free. Don't spend that recreate on a label.
|
||||
|
||||
## Foot-guns found in the 2026-08-17 audit
|
||||
|
||||
@@ -124,18 +157,86 @@ is in the "iteration loop" note below.
|
||||
|
||||
## The tab bar goes missing after a recreate, then comes back on its own
|
||||
|
||||
**Status: self-healing, cause not pinned, and INTERMITTENT. Do not chase it.**
|
||||
**Status: intermittent, self-healing, and now HALF-DIAGNOSED. Still don't chase
|
||||
it — but you can now tell in one command whether you are in it.**
|
||||
|
||||
After a recreate the client render can come up with no tab bar, no wallpaper
|
||||
and no i18n (the search box shows the raw key `search.search`), with groups
|
||||
falling back to side-by-side columns. It restores itself with no intervention.
|
||||
|
||||
⚠ **It does not happen every time.** The 2026-08-24 recreate (`compose up -d
|
||||
--force-recreate homepage`, to land a `settings.yaml` change) came up correct
|
||||
within 10 seconds: the fresh `columns: 4` payload was in the served HTML on the
|
||||
first poll, and a Playwright pass clicked through all four tabs a minute later
|
||||
with the bar present. So do not pre-emptively schedule an hour of ugliness
|
||||
around a config change — recreate, check, and only then walk away if it is in
|
||||
the broken state.
|
||||
### The one-command test
|
||||
|
||||
```bash
|
||||
curl -s http://10.0.50.45:5100/ | grep -o 'initialSettings":[^,]\{0,20\}'
|
||||
```
|
||||
|
||||
`initialSettings":{"…` — healthy. `initialSettings":{}` — you are in it.
|
||||
|
||||
### What `initialSettings":{}` actually means (found 2026-08-24)
|
||||
|
||||
It is **not** a warm-up, a cache, or a partial render. It is the **catch branch**
|
||||
of the page's data loader. Decompiled from `/app/.next/server/pages/index.js`:
|
||||
|
||||
```js
|
||||
async function K() {
|
||||
let a;
|
||||
try {
|
||||
a = logger("index"); // <-- assigned INSIDE the try
|
||||
let { providers, ...d } = getSettings();
|
||||
... await servicesResponse(), bookmarksResponse(), widgetsResponse()
|
||||
return { props: { initialSettings: d, ... } };
|
||||
} catch (b) {
|
||||
return a && b && a.error(b), // <-- guarded on `a`
|
||||
{ props: { initialSettings: {}, ... } };
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Two consequences worth knowing:
|
||||
|
||||
1. **Something in that try block is throwing.** The page is not "still warming
|
||||
up"; it has already failed and returned a degraded shape.
|
||||
2. **The error can be swallowed completely.** `a` is assigned inside the same
|
||||
try, and the catch only logs `if (a)`. If the *logger itself* is what threw,
|
||||
`a` is `undefined` and nothing is written anywhere — which is exactly what
|
||||
was observed on 2026-08-24: catch branch demonstrably taken, and not one
|
||||
`index`-tagged line in `docker logs` or `conf/homepage/logs/homepage.log`.
|
||||
|
||||
### What it is NOT — ruled out by measurement, don't re-run these
|
||||
|
||||
- **Not the config.** `/api/services`, `/api/bookmarks`, `/api/widgets` and
|
||||
`/api/hash` all return **200 with fully correct content** while the page
|
||||
serves `initialSettings":{}` — including the brand-new group structure, in the
|
||||
right order. Every input the loader awaits works when called directly.
|
||||
- **Not the 2026-08-24 layout rewrite.** Restoring the *previous, known-good*
|
||||
`settings.yaml` and recreating reproduced the empty payload identically. (This
|
||||
matches the 2026-08-19 finding that the pre-adoption backup config reproduces
|
||||
it too.)
|
||||
- **Not `/api/validate`,** which returns `[]` throughout.
|
||||
- **Not disk, not permissions.** 206 GB free; the container runs as root and a
|
||||
write test into `/app/config/logs` succeeds.
|
||||
|
||||
### Timing, measured rather than assumed
|
||||
|
||||
Wildly variable, which is the whole trap. On 2026-08-24 one recreate came up
|
||||
correct **within 10 seconds**, and three consecutive recreates ~40 minutes later
|
||||
were still empty after 60-120s each. The 2026-08-19 session measured a fresh
|
||||
container still tab-less at 4m30s twice, and healthy again after roughly an hour.
|
||||
`docker ps` reporting `healthy` says nothing about it — the container is serving,
|
||||
the page is just wrong.
|
||||
|
||||
**Practical rule: recreate, run the one-command test, and if it is empty, go do
|
||||
something else and re-check.** Do not start editing config — that is how an hour
|
||||
got spent in 2026-08-19 ruling out four causes that were never the cause (the
|
||||
config, the v2.0.0 release, `PUID`/`PGID` and Docker discovery, and the server
|
||||
side). Every one of those remains ruled out.
|
||||
|
||||
**Next lead, for whoever picks this up:** move the `logger("index")` hypothesis
|
||||
forward. The winston file logger writes to `conf/homepage/logs/homepage.log`,
|
||||
which had grown to 8.6 MB and stopped being appended to at the same time the
|
||||
render started failing. Rolling it aside is a one-liner and is the cheapest
|
||||
thing left to try:
|
||||
`sudo mv /opt/docker/conf/homepage/logs/homepage.log{,.rolled}` then recreate.
|
||||
|
||||
**Timing, measured rather than assumed:** five minutes is NOT enough — a fresh
|
||||
container was still tab-less at 4m30s, twice. It was observed healthy again
|
||||
|
||||
Reference in New Issue
Block a user