fix(#571): the internal-sharing switch never reached the admin page #580
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-571b2"
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?
#578 added the switch and it rendered on no page at all. Caught by Nikola's screenshot of the live admin page, not by anything in CI — which is the part worth fixing.
Why it was invisible. Every setting lives once, in the hidden
#settingsdlg.ensureSettingsInShell()then moves each field listed inSET_SLOTSinto its admin slot:A field that is not in
SET_SLOTSis never moved, and the dialog is not reachable from the admin shell. The markup looks perfect the whole time. Two further consequences I had also got wrong:SET_SLOTSorder, not DOM order — so placing the markup under Public share links achieved nothing.SET_DESC, a field-id → i18n-key map, rendered as.sdesc. My inline<p class="hint">inside asubfieldspan was the wrong shape for this row; it is now a plain.field.checkidentical to its neighbours, with the description supplied the house way.The guard.
web/test/settings-slots.test.jsasserts three invariants, all of which are invisible when broken:set-f-*field in the markup is inSET_SLOTS— a field nobody slotted is a field nobody can see;SET_DESCvalue is a defined i18n key. index.html already documents this hole — "t(SET_DESC[id]) is a dynamic lookup, so the undefined-key test cannot see these — a typo here shows up as a verbatim key in the UI, not as a failure" — and now something checks it;It immediately found a second, pre-existing orphan:
set-f-trashwarn. That field has been in the dialog and on no admin page. I have not touched it — I do not know whether it was missed when the dialog was broken into admin pages or is deliberately not offered, and those have different fixes. It is allow-listed with a comment pointing at #579.Red witnessed:
these fields exist in #settingsdlg but are never moved into the admin shell, so they render nowhere: set-f-internalshare, set-f-trashwarn.Process note. Three times this session a run has been lost to retyping whitespace instead of reading it — gofmt comment alignment, a struct field, and here an anchor written with four spaces where the file has two. Every splice in this workflow now either matches on a substring with no leading whitespace, or derives the indent from the line it matched.
Verified: new test green, all nine web tests green,
extract.js+node --check(#389 fence gate) green, the\\uescape guard green, full Go suite green.