FaceEditor previously required an HTMLImageElement | HTMLVideoElement prop to
compute layout metrics and generate the face crop preview. This was unavailable
for video assets, so the preview thumbnail in the Create Person modal was always
missing, and face positions could be NaN during image load (naturalWidth is 0
before the image decodes).
Replace the DOM element prop with assetSize: Size and containerSize: Size, using
asset metadata dimensions that are always available from the API response.
computeContentMetrics() is extracted as a pure utility alongside
mapContentRectToNatural() for converting face rect coordinates back to original
image space.
For videos, VideoNativeViewer now captures the current frame to canvas when face
edit mode opens and sets assetViewerManager.imgRef, giving FaceEditor the same
image-based preview path as photo assets.
Change-Id: I0e9da549e3af40211abad4ab2c0270706a6a6964
* add user metadata table and use to filter persons in person.getAllForUser query
* update PersonRepository.getAllForUser query
* remove minFaces from PersonSearchOptions interface
* fix person.getAllForUser query
* update types and openapi specs
* add minFaces field to user settings page
* remove old arg from tests
* add e2e test to verify minimumFace user preference
* add i18n label and description for english
* update default min faces
* fetch minFaces ML default and use as per-user default in frontend
* update e2e tests
* fix bugs in people getAllForUser query
* update person getNumberOfPeople query to reflect correct number of people according to minFaces threshold
* updated mobile openapi specs?
* use subquery in coalesce instead of join
* remove out of scope query update
* fix: disallow cross origin/non http protocols for continueUrl on login
* chore: use Route helper
* fix: also use Route.continue in pin code prompt
* fix: typecheck
* fix(ml): pass model_root_dir to OcrOptions for RapidOCR compatibility
Fix a TypeError (Path(None)) when the OCR model is invoked, caused by an upstream change in RapidOCR v3.8.1 (RapidAI/RapidOCR@8ea9626).
RapidOCR now internally calls `Path(cfg.get("model_root_dir"))`. Since `model_root_dir` was missing from `OcrOptions`, it evaluated to `None` and triggered a `TypeError: argument should be a str or an os.PathLike`.
This fix adds the missing `model_root_dir` argument to prevent the error.
Ref: #28331
* fix(ml-test): update OCR tests for RapidOCR schema change
* chore(ml-test): remove unused `cache_dir` parameter from `TextRecognizer`
* Revert "chore(ml-test): remove unused `cache_dir` parameter from `TextRecognizer`"
This reverts commit 007ad7b3f2.
* fix(ml): use self.cache_dir for model_root_dir in OcrOptions