fix: replace accumulate-everything picker with page-based picker#243
Draft
bukinoshita wants to merge 3 commits intomainfrom
Draft
fix: replace accumulate-everything picker with page-based picker#243bukinoshita wants to merge 3 commits intomainfrom
bukinoshita wants to merge 3 commits intomainfrom
Conversation
Replace the unbounded allFetched accumulation pattern in pickId() with a page-based approach that only keeps the current page in memory. Key changes: - Replace 'Fetch more...' with 'Next page' / 'Previous page' navigation - Remove auto-fetch loop for filtered pickers with empty results - Only current page items are rendered as options (no unbounded growth) - Cursor history is tracked for page navigation without re-scanning - Filtered pickers show an info message instead of silently draining This prevents large accounts from experiencing hangs, high memory usage, and excessive API calls when using interactive pickers. Fixes: BU-617 Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
Member
Author
|
@cubic-dev-ai can you review? |
Contributor
@bukinoshita I have started the AI code review. It will take a few minutes to complete. |
Member
Author
|
@cursor fix conflicts |
|
Conflicts resolved. Here's what I did:
|
Integrated page-based picker changes into the new pickItem/pickId delegation pattern introduced on main. The fetchPage inner function now returns PickedItem instead of string, and uses the itemOptions pattern from main to populate the label field. Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.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 by cubic
Replaces the interactive ID picker with a page-based UI to prevent hangs on large accounts and cut memory/API usage. Integrates with the new
pickItem/pickIdflow from main and addresses Linear BU-617 by removing the unbounded “accumulate everything” pattern inpickId().PickerConfig; aligns withpickItem/pickIddelegation and preserves labels viaitemOptions; adds tests for navigation, filtering, cursor passing, and empty/optional states.Written for commit 5215dac. Summary will update on new commits.