Repository navigation
Add or clone: org chips that scale to any number of orgs - #315
Merged
Merged
Conversation
The tab chips are placed by a pure function over their widths: at most two rows, the chosen tab always shown, the rest behind a +N more chip. The form orders orgs by repo count, walks them with tab in that order, and opens the rest with ctrl-o. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The tab chips were one HStack of Text, so with many orgs each label was squeezed until it wrapped a character per line. Chips are now one line each (long names cut, tooltip has the whole), placed by AddRepoChips in at most two rows, with the rest in a +N more list opened by click or ctrl-o. Shots and docs for sixteen orgs. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
With ~15 orgs, the org tabs in the Add or clone dialog were one row of capsules with no line limit, so SwiftUI squeezed every chip until its label wrapped one character per line (tall vertical pills).
⌃o;↓ ↑ ⌃n ⌃pmove,↩chooses). The chosen org then shows as a selected chip. The selected tab is always visible.AddRepoChips.layout), not SwiftUI.⌃ois new (dialog-local, free everywhere).⇥/⇧⇥still walk every tab, visible or not, but now in the order the chips are shown (counts descending) instead of the old tab-array order.⎋closes the list first, then the dialog;⇥ ⇧⇥ ⌘↩ ⌃r ⌃tclose the list and act as usual. The list is drawn inside the dialog, not as a popover, so keys stay with the form's own handling.docs/worktrees/repos.md; new shotsworktrees/add-repo-many-orgs,-picked,-menu,-narrow(16 orgs, one with 40 characters); the existing add-repo shots andlanding/t-repos.pngregenerated.Verified
mise run lint,swift build,mise run text-check,mise run bundle,scripts/tutor-check.sh(0 problems), the docs build; 21 newAddRepoChipsTests(33 AddRepo tests in all); three mutations (drop the selected chip, stop vs skip at the first chip that does not fit, ignore the gap) each fail the tests; the new shots read: clean one-line chips in two rows, "+9 more", the long org cut with an ellipsis.Not tested
Live resize, real key events and clicking the chips or the list. Chip widths are estimated from character counts (about 7 pt a character), not measured, so a chip can sit a few points off its predicted spot. While counts are still loading the chips can reorder once.
Note:
ACPClientTests.sendingToAnAgentThatExitedSaysItClosedfailed locally on one Mac (ACP transport, untouched here); main's CI passes it, so CI on this PR is the check.🤖 Generated with Claude Code