#552: variant-D round — local mode, unknown member counts, amber reserved (v0.6.211) #567
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-vard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The two decided mockup items, plus the bug Nikola's follow-up question surfaced.
1 — A local-only instance has no directory, and now says nothing about one
This is the real find, and it came from the question "would that notice even be displayed on an instance I deliberately run without an IdP?"
Answer: usually not — but only by accident. The guard was
which infers "does this instance have a directory?" from "did any group names turn up in the payload?". Two things make that wrong:
dirSource: "none"is unreachable.KnownDirNamesis assigned unconditionally inmain.go(a closure overcfg.Auth.AdminGroups, reassigned but never nil when peering is on), so the server only ever reports"client"or"seen". The!== "none"check is dead code, and the only thing hiding the section wasdir.length === 0.dirincludes peering allow-list groups. It is built fromcfg.Auth.AdminGroupsplus every group named in a peering allow-list — and #550's whole point is that allow-lists work with no IdP. So a local-only instance with one stray allow-list name renders a "Directory groups" table and instructs its admin to configure an identity provider it has deliberately not got.The Accounts tab has always asked the right question one screen away:
if (d.authMode !== "local"). The Groups tab now does the same, via a pureshowDirSection(authMode, dirSource, dirCount)with ten cases inweb/test/dir-section.test.js— including the stray-name case as an explicit regression test.2 — The dash in Members now says which dash it is
Decided: the lighter option, not the mockup's per-row sentence. A dash in that column read equally as "no members" and "Cairn cannot tell", which are opposite facts, and on a paginated list the explanatory notice is below the fold. In degraded mode the column header now reads Members (unknown) and each dash carries the reason as a tooltip. One word of new copy rather than one sentence per row, and it scales to 200 rows without becoming wallpaper.
3 — Amber means a fault you can fix
Decided: split, not blanket.
guDirErr(directory unreachable) getsnotebox warn;guSeenNote(no admin client) stays plain. Per #533 a no-IdP instance is a first-class supported deployment, not a degradation — a permanent amber banner would be nagging it for a choice it made on purpose..notebox.warnjoins the existing--warnconvention.A note on the tooling
Two splices in this round failed loudly before writing anything, and both are worth recording because they are the same class of bug this issue keeps producing:
—and·I typed into the splice script were converted to real characters in transit while the file contains the escape sequences. Fixed by rebuilding that line from its own text — the escapes are never retyped. That is the third escaping-layer failure in this feature, now in the tooling rather than the product.r.append(nm, cell(shape. Disambiguated onString(— only the app-owned row has a real count.Also:
CHANGELOG.mdhad nov0.6.210entry — that release shipped without one. My own post-condition caught it by asserting a version that did not exist; both entries are added here, and the guard now checks the captured previous heading rather than a hard-coded version.Verification
Red witnessed on the runner before implementation (
index.html has no // --- pure:dir-section --- block). Full Go suite green, all web tests pass,node --checkclean, eleven splices count-asserted, and a post-condition asserting zero\\usequences anywhere in the page.