feat(support-admin): collapse same-label authorizations (#19)#21
Merged
alejandro-runner merged 1 commit intosynvya-stagingfrom Apr 14, 2026
Merged
Conversation
Groups authorizations by label in the Synvya support-admin user detail view so a restaurant key with many rows (e.g. several repeated logins producing `Synvya Client (staging)` authorizations) renders as one card per label with an "N older" disclosure instead of a flat scroll. - Group by label (empty labels bucket as `(no label)`). - Newest-first inside each group; groups sorted by most-recent row. - Show newest inline; click "N older" to expand the rest. - Color accent (green for Synvya Server, blue for Synvya Client) moves to the group header. - Row count badge on the group header. - Only active in Synvya-gated view (isSynvyaManaged); diVine deployments keep the existing flat rendering. Per #19 out-of-scope: no backend-shape change, no dedupe-on-create. Revoked-row handling deferred to a follow-up now that #18 has landed. Closes #19 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Groups authorizations by label in the Synvya support-admin user detail view so a restaurant key with many rows renders as one card per label with an "N older" disclosure, instead of a flat scroll.
Motivates: production restaurants accumulating 4×
Synvya Client (staging)/ 2×Synvya Server (staging)rows per key (see PR #15 discussion). Duplicate creation is fixed in the Synvya client; cleanup is fixed in #18; this PR is the admin UX so the page is readable regardless of how many rows exist.Changes
groupAuthorizations(auths)helper: buckets by label (empty labels →(no label)); newest-first inside each group; groups sorted by most-recent row.Synvya Server, blue =Synvya Client) moves to the group header; row count badge on the header.N older {label} authorizationsdisclosure expands the rest.isSynvyaManaged); diVine deployments keep the existing flat rendering..auth-group,.auth-group-header,.auth-count-badge,.auth-card-plain,.auth-older-toggle,.auth-older-list,.auth-card-older.Out of scope (per #19)
Test plan
svelte-checkclean for this file (pre-existing errors elsewhere in the repo are unrelated).vite buildtransforms the file cleanly (build fails later on an unrelated unbuiltkeycast-login/dist— not touched by this PR)./support-admin, look up a user with a team whose restaurant key has duplicate-label authorizations; confirm one card per label, newest inline, N older expands, diVine rendering unchanged.Acceptance criteria
Closes #19
🤖 Generated with Claude Code