Repository navigation
Fixes #39122: pass trackTotalHits so Curated Assets total isn't capped at 10,000 - #39157
Open
detail-app[bot] wants to merge 2 commits into
Open
detail-app[bot] wants to merge 2 commits into
detail-app[bot] wants to merge 2 commits into
Conversation
detail-app
Bot
force-pushed
the
detail/bug-fix/fixes-39122-pass-tracktotalhits-so-curated-assets-19d685
branch
from
November 28, 2026 05:51
9048f26 to
bfb3732
Compare
This branch has not been deployed
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.
Detail bug report: View on Detail
Fixes #39122
Bug
The Curated Assets summary card on the persona-driven My Data landing page fetches its match count via the
useCuratedAssetshook →searchQuery, but never passestrackTotalHits. The search backend (SearchResource.java) defaultstrack_total_hitstofalse, and the search managers (ElasticSearchSearchManager/OpenSearchSearchManager) then calltrackTotalHitsUpTo(10000), cappinghits.total.valueat 10,000 (withrelation: "gte"). The hook exposes that capped value astotalCount, so on estates with more than 10,000 matching assets the card reads "10,000 assets match the rule" (and "9,990 more assets match") instead of the true count.Fix
Pass
trackTotalHits: truein thesearchQuerycall insidefetchCuratedAssets, matching every other total-displaying search call in the UI (useOwnedAndFollowed,utils/queryBuilder/count.ts, Explore tree/count calls). The flag routes the request to the backend's uncapped branch (requestBuilder.trackTotalHits(true)), sohits.total.valuereturns the exact count.A defensive fallback on
hits.total.relation === 'gte'was intentionally not added — the explicit flag alone fixes the display, and adding fallback logic would diverge from the established pattern and add untested surface area.Testing
trackTotalHits: trueand that a 47,000 total surfaces verbatim. It fails without the fix (Expected: true, Received: undefined) and passes with it. The fullsrc/hookssuite (115 suites / 1018 tests) and theCuratedAssetsSummaryWidgetsuite (10 tests) pass — no regression.yarn build, and pre-commit hooks (Prettier, license header, Tailwind audit, deprecation guard) all pass.yarn tsc:checkreports no errors in the changed files (pre-existing errors only in unrelatedChartDetailsUtils/SSOUtilstest files).SearchResource.javadefaultstrack_total_hitstofalse; both search managers routetrue→trackTotalHits(true)(uncapped) and absent/false →trackTotalHitsUpTo(MAX_RESULT_HITS=10000).CuratedAssets.spec.tssuite needs a running server, but the2.0.0-SNAPSHOTimages that contain the persona-driven CuratedAssets feature aren't published to the public registry, released images lack the feature, and the host has insufficient RAM (3.2 GiB) to run Elasticsearch + MySQL + server + ingestion together. The Vitest browser infra was verified separately (a targeted browser test passed 13/13 after installing Chromium + OS deps), but no My Data browser test exists today. The end-to-end guarantee is covered by the unit assertion plus the deterministic backend wiring.Automatic Fixes PRs can be configured here.