feat(storage-browser): cross-page search, configurable sorting scopes, caching, and progress#6957
Open
feat(storage-browser): cross-page search, configurable sorting scopes, caching, and progress#6957
Conversation
…aching, and progress - Fix hasNextPage to account for local pagination of search results - Add search result caching to avoid re-fetching from S3 on query changes - Add configurable search limit (default 10k, customizable via search.limit) - Add onProgress callback for search batch progress reporting - Expose searchProgress state in LocationDetailView for UI feedback - Add hasNextLocalPage to usePaginate hook - Add comprehensive unit tests for all new functionality - Add E2E feature file for cross-page search scenarios
|
…limits - Add cross-page-sort.feature with 7 E2E scenarios covering: - Sort by name ascending/descending - Sort by size and last modified columns - Changing sort column resets direction - Sort combined with search results - Sort direction toggle preservation - Add sorting step definitions to storagebrowser.ts: - Click sort header by column label - Verify first table row name - Verify table name column sort order - Assert minimum table row count - Bump size-limit thresholds for createStorageBrowser (130->131 kB) and StorageBrowser (154->155 kB) to accommodate sorting code
…n, scope controls sort location only
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.
Bullet summary
hasNextPageto account for local pagination of search resultssearch.limit)onProgresscallback for search batch progress reportingsearchProgressstate inLocationDetailViewfor UI feedbackhasNextLocalPagetousePaginatehooksortScopeprop with three modes:'page','all','global'Description of changes
1. Search improvements
createEnhancedListHandlernow supports:search.limitoption (default 10,000) caps the maximum number of items fetched across all continuation pages during a search.onProgresscallback fires after each S3 page is fetched, reporting{ loaded, total? }so the UI can display a progress indicator.2. Pagination fix
hasNextPagenow correctly accounts forhasNextLocalPage— when search results span multiple local pages (i.e., more items thanpageSize), the paginator reports additional pages even when there are no further S3 continuation tokens.3. Cross-page sorting
New modules
sortItems.tsand updates touseSort.tsenable sorting across the full loaded dataset before it is sliced byusePaginate. This means sorting is no longer limited to the items visible on the current display page.4. Configurable sort scopes via
sortScopepropThree modes control how sorting interacts with pagination:
'page'(default)'all''global'search.limit), cache the full result set, then sort the entire dataset. The first sort click triggers the fetch with progress reporting; subsequent sorts reuse the cache.5.
useDataTableintegrationuseDataTabledetects when a cross-page sort is requested (sortScope !== 'page') and delegates sorting upstream to the enhanced list handler. For'page'mode it falls back to local in-table sorting, maintaining full backward compatibility.Validation
createEnhancedListHandler(caching, limit, progress),usePaginate(hasNextLocalPage),useSort(scope modes), andsortItems(sort logic).useDataTabletests covering delegation vs. local sort paths.Checklist