license key install flimsy feeling as an admin operator #532
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#532
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?
— license key install needs to be a nicer flow, have some interaction, similar to the save bar popping up for a save, a bar can pop up as “Key installed.” this has been triggered when I replaced a key manually, and there was no real “action confirmed” interaction, so it felt “flimsy/incomplete” to me. Also, the Rows of the “license” table on that page seemed not to update all rows that would update on a Key replacement that would change information carried by that key. Just a double check on that last one.
Traced both halves in the code.
Why it feels flimsy: the install handler (
$("lic-install").onsubmit) does PUT/api/v1/license→ clears the input →say(t("licInstalled"))→refreshLic(). Butsay()only sets$("status").textContent— the little status line, nowhere near the dialog you're looking at, no colour, no motion. Success and "nothing happened" look nearly identical. The fix you're describing exists as a pattern already: the OCM allow-list save bar (#ocm-savebar, sticky bar with shadow). Plan: a confirmation band inside the licence dialog — "Key installed." with the licensed badge, appearing where the input was, auto-fading — plus the same treatment for key replacement ("Key replaced — plan X, expires Y"). Mockup-light; i18n ×4.The stale-rows double check — you were right, at least partly:
licrem-go) callsrefreshLic(); admLicMeter();but install calls onlyrefreshLic()— the admin licence/seat meter elsewhere on the page is NOT refreshed after installing or replacing a key. If the new key changes seat count, that meter keeps showing the old one until a reload. That alone can explain "not all rows updated".lic-facts) is fully rebuilt from a freshGET /api/v1/licenseon everyrefreshLic(), so if a row there showed stale data, the server's PUT response must still be carrying old derived state — i.e.setvalidates and stores the key but some fields (label/org, expiry, seats) only refresh on the next check-in. Do you remember which rows were stale — the seat meter (case 1) or rows inside the facts table like plan/expiry (case 2)? If it was the facts table I'll chase the backendsetpath; if it was the meter, case 1 covers it.Scope for the fix run: confirmation band (install + replace),
admLicMeter()after install, and — depending on your answer — makingsetrecompute all derived fields synchronously from the new key.v0.6.192 shipped (PR #542), live on both dogfoods — closing.
SetKeynow drops the label; the row shows the new key's org until the next check-in re-labels it.license-install), matching key removal — and registered in the audit verb vocabulary, courtesy of the #433 guard test catching the omission.Verify on your next key replacement: band appears, plan/seat rows all carry the new key's values immediately. If any row still lags after this, reopen with which row it was.