#552: live name-collision preview + variant-D copy fixes (v0.6.208) #561
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-552c"
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 items left on #552.
1 — Live collision preview (mockup variant E, panel 3)
New group, Rename group and Add account all take a name that must not already be in use. Until now each let you fill in the whole dialog before the server refused with a 409. Now the clash shows while typing: danger border, the reason beneath the field, primary button disabled.
No new endpoint and no debounced request. All three dialogs open from tabs that have already loaded every name they need — Accounts holds the local list and the directory seen-list, Groups holds app-owned and directory groups.
ncListsis filled by the two loaders; the check is a synchronous lookup./candidateswas left alone: it feeds the member picker with account names, which is a different list from group names.Four distinct messages, because the reason differs: a directory-group clash is about share ambiguity, a directory-account clash is the v0.6.204 security case (shared identity), the two same-kind duplicates are plain duplicates.
Deliberately one-sided — there is no green "available" tick. The lists are paginated and, with no IdP admin client, only the names seen in sign-in tokens so far. The check can honestly say taken; it can never say free. A tick would be an assurance Cairn cannot make. Silence means nothing is known against the name; the server 409 remains the authority.
A bug TDD caught before it shipped: Rename opens pre-filled with the group's own current name, which is of course already in the app-group list — so the naive version opened accusing the group of colliding with itself, Rename disabled, breaking the exact flow it was meant to help.
nameCollisiontakes aselfexemption, the same line the server draws (groups.goonly callsdirNameTakenwhen the name actually changed). Three tests cover it.2 — Variant D review
Empty states were already right (
luEmpty,accDirEmpty,guEmpty). Two real divergences found and fixed:accNoMatchwas being reused. NewguNoMatchkey.One divergence I did not implement, for your call: variant D also puts a per-row "seen in sign-in tokens" note in the actions column of every directory group. The notebox below the table already states that once, for the whole table — repeating a global condition on every row reads as noise rather than information. Say the word if you want it anyway.
Also skipped: the mockup's
notebox warnstyling. Purely cosmetic, and the plain notebox already reads as a notice.Verification
index.html has no // --- pure:name-collision --- block, with the workflow refusing to proceed if the test had passed or failed for the wrong reason.web/test/name-collision.test.js, all passing; full web suite green;node --checkclean.@mediablock, asserted.Visual pass is yours — sessions clear on redeploy so I cannot sign in.