set-f-trashwarn is never slotted into an admin page — is it reachable at all? #579
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/Cairn#579
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Found by the new
web/test/settings-slots.test.jsguard added in #571, which asserts that everyset-f-*field in the markup appears inSET_SLOTS.What
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#settingsdlgis not itself reachable from the admin shell — so the field renders nowhere. The markup looks entirely correct while this is true, which is why it went unnoticed.set-f-trashwarnis in that state today.Why this is not obviously a bug
Two readings, and I do not know which is right:
SET_SLOTSentry (probablyadm-trash-ret, besideset-f-autopurgeandset-f-purgeafter) and aSET_DESCentry.If (2), the allow-list in the test should stay and gain a note saying why. If (1), the fix is two lines and the allow-list goes.
Current state
The test allow-lists it so the guard can land without silently changing behaviour I do not understand:
Worth noting
The same guard caught a brand-new instance of this in #571 — a switch that had been merged, looked perfect in the markup, and would have rendered on no page at all. The invariant is worth keeping either way.
Answered and fixed — #599, shipped in v0.6.215, live on both dogfoods.
The answer to the issue's either/or turned out to be "reading 1, but worse":
set-f-trashwarnis the "deleted files accumulate without limit" notice meant to appear while auto-purge is off, and it was doubly orphaned — not inSET_SLOTS(rendered on no page) and not toggled bysyncTrashAuto(would have stayed hidden even if slotted). It also had a stowaway:sdTrashWarn, a fully ×4-translated description for a "warn people in the file browser before the sweep" feature that was never built and referenced nowhere.Decision (Nikola): slot it. Shipped: the notice is slotted beside the auto-purge switch on the Deleted-files page,
syncTrashAutoshows it exactly while the sweep is off, theKNOWN_UNSLOTTEDallow-list is empty again (mechanism kept), and the dead key is gone. Red witnessed twice — the slots guard on the un-allow-listed orphan, and the newtrash-warn.test.json the missing toggle.The guard that found this has now caught three of this class (#571's switch, the #571 allow-list landing, this). Worth its weight.