Cap the delegation list height in the Claude subscription card - #2901
Merged
Conversation
Membership is unbounded, and the list rendered one switch per org with no limit — 27 orgs made the card about a screen and a half tall, and centring the row stranded Update Token and delete halfway down it, nowhere near the subscription they act on. Scroll-caps the list, top-aligns the actions, sorts granted orgs first and adds a filter past 8 orgs, plus a count so "who can spend my quota" is answerable without scrolling. Extracted to DelegationPicker because the filter needs state and the block renders inside a map. Spec-Ref: helix-specs@6789a48:002391_fix-these-critical-bugs
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.
The delegation toggles added in #2899 render one switch per org with no bound
on the list. Membership is unbounded, so an account in 27 orgs gets a card about
a screen and a half tall — and because the row is
alignItems: center, UpdateToken and the delete button end up stranded halfway down it, nowhere near the
subscription they act on.
It also doesn't help you answer the question the panel exists for. Most of those
27 are test orgs (
test,test,pizza,dough,sluuug); the two thatmatter are somewhere in an unsorted alphabetical run, and whether any grant is
active takes a scroll to find out.
Changes
maxHeight: 200) — the card stays a readable heighthowever many orgs you're in
your 27 organizations", so the answer is readable without expanding anything
matchesAllTokensper the repo's search convention, not raw.includesalignItems: 'flex-start'+gap) so Update Token anddelete sit next to the subscription name
Extracted to a
DelegationPickercomponent. Not cosmetic tidying — the filterneeds its own state and the block renders inside a
.map()over subscriptions,so a hook can't live there.
No behaviour change to delegation itself: same toggle, same mutation, same
owner-only endpoint and consent semantics from #2899.
Testing
npx tsc --noEmitclean — the only error in the tree is the pre-existingsampleProjectIcons.tsxone, unrelated and untouched here.NOT rendered in a browser. There's no Helix dev stack in this environment
(
localhost:8080refuses connections, no compose project up), and reproducingthe failure mode needs a user with a connected personal subscription and ~27 org
memberships. Please eyeball it: the card should now be a fixed, modest height
with the actions beside the title, and the list should scroll internally.
Unrelated to the rest of this branch's history — it's here because the remote
restricts pushes to
feature/002391-fix-critical-helixosandhelix-specs.Single commit, reviewable on its own.