Skip to content

Cap the delegation list height in the Claude subscription card - #2901

Merged
lukemarsden merged 1 commit into
mainfrom
feature/002391-fix-critical-helixos
Jul 30, 2026
Merged

Cap the delegation list height in the Claude subscription card#2901
lukemarsden merged 1 commit into
mainfrom
feature/002391-fix-critical-helixos

Conversation

@binocarlos

Copy link
Copy Markdown
Collaborator

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, Update
Token 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 that
matter are somewhere in an unsorted alphabetical run, and whether any grant is
active takes a scroll to find out.

Changes

  • Scroll-capped list (maxHeight: 200) — the card stays a readable height
    however many orgs you're in
  • Granted orgs sort to the top, so active grants are visible without scrolling
  • Count line — "Shared with 2 of 27 organizations" / "Not shared with any of
    your 27 organizations", so the answer is readable without expanding anything
  • Filter box past 8 orgs — below that, scanning beats typing. Uses
    matchesAllTokens per the repo's search convention, not raw .includes
  • Actions top-align (alignItems: 'flex-start' + gap) so Update Token and
    delete sit next to the subscription name

Extracted to a DelegationPicker component. Not cosmetic tidying — the filter
needs 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 --noEmit clean — the only error in the tree is the pre-existing
sampleProjectIcons.tsx one, unrelated and untouched here.

NOT rendered in a browser. There's no Helix dev stack in this environment
(localhost:8080 refuses connections, no compose project up), and reproducing
the 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-helixos and helix-specs.
Single commit, reviewable on its own.

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
@lukemarsden
lukemarsden merged commit e6debcb into main Jul 30, 2026
4 of 5 checks passed
@lukemarsden
lukemarsden deleted the feature/002391-fix-critical-helixos branch July 30, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants