ui: search export fixes#27407
Conversation
❌ Lint Check Failed — ESLint + Prettier (core-components)The following files have style issues that need to be fixed: Fix locally (fast — only for changed files in the branch): make ui-checkstyle-core-components-changedOr to fix all files: make ui-checkstyle-core-components |
❌ Playwright Lint Check Failed — ESLint + Prettier + Organise ImportsThe following files have style issues that need to be fixed: Fix locally (fast — only for changed files in the branch): make ui-checkstyle-playwright-changedOr to fix all playwright files: make ui-checkstyle-playwright |
❌ Lint Check Failed — ESLint + Prettier + Organise Imports (src)The following files have style issues that need to be fixed: Fix locally (fast — only for changed files in the branch): make ui-checkstyle-src-changedOr to fix all files: make ui-checkstyle-src |
❌ UI Checkstyle Failed❌ ESLint + Prettier + Organise Imports (src)One or more source files have linting or formatting issues. ❌ Playwright — ESLint + Prettier + Organise ImportsOne or more Playwright test files have linting or formatting issues. ❌ Core Components — ESLint + PrettierOne or more core-component files have linting or formatting issues. Fix locally (fast — only checks files changed in this branch): make ui-checkstyle-changed |
Code Review ✅ Approved 3 resolved / 3 findingsSearch export logic now enforces size limits for visible scopes and correctly evaluates tab scope status. Test helpers are updated to ensure synchronization with the export modal state. ✅ 3 resolved✅ Edge Case: "Visible" scope in search mode has no export size limit guard
✅ Quality: Test helper openExportScopeModal no longer waits for Export enabled
✅ Bug: isTabScopeDisabled evaluates true even when 'all' scope is selected
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
Describe your changes:
Problem
Export returned only 1000 rows with numeric sort fields (e.g.
totalVotes):With
search_afterpagination, if the last doc in the first batch hadtotalVotes=0, the next cursor asked for docs wheretotalVotes < 0— returning empty results and breaking out of the export loop after exactly one batch."Visible results" exported wrong data: Exported only the current page (e.g. 15 rows) instead of all assets matching the search in the active tab.
Wrong count in modal: Showed Elasticsearch's default 10k cap instead of the actual tab-specific result count.
Solution
Backend
name.keyword ASC) wheneverisExport=trueor the primary sort is_score. This ensuressearch_aftercursors remain unique across batches even when many docs share the same sort value.if (sortField.equalsIgnoreCase(SORT_FIELD_SCORE) || isExport)SORT_FIELD_SCOREandSORT_TYPE_KEYWORDconstants to eliminate magic strings.Frontend
?search=...present): "Visible results" now exports all assets of the active tab type matching the query. Tab-specific count is derived from theentityTypeaggregation buckets of the existing DATA_ASSET count query (no extra API call). Nofromoffset is sent.fromoffset.EXPORT_ALL_ASSETS_LIMIT = 200,000guard with a warning alert and disabled export button when the "All assets" scope exceeds the limit.data-testidon scope cards for Playwright targeting.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Screen.Recording.2026-04-15.at.10.41.15.PM.mov