fix(advanced-search): detect OCR status + align UI with ODS#334
fix(advanced-search): detect OCR status + align UI with ODS#334paul43210 wants to merge 15 commits intoowncloud:mainfrom
Conversation
|
@paul43210 here are some comments:
|
|
Could it be that |
73f7a17 to
dd9590a
Compare
|
Thanks for testing @mmattel! Rebased ✅ — also fixed Re:
The extension itself just builds the KQL query string and sends it — if The extension code has been verified to generate correct KQL: Re: ocis#12072 — no, the EXIF filters don't depend on that PR. That PR was about adding object detection fields (captions/labels), which is a separate feature. EXIF photo metadata support has been in oCIS since #11912. |
|
Setup: My test environment follows the Starting Guide. After meeting the prerequisites, I start testing using the steps described in "Testing the App". When you start the container, ALL data from any run before is gone. This means I always have to upload e.g. image files after bringing the environment up which results in a clean index - note that Tika is configured in the compose file! My testfiles contain images with and without exif data and ordinary files with text content. Here is the outcome: Standard Filter - Content ✔️ search for a text string using one word (string: Editor) --> Capitalization does not matter Media Type: ✔️ Filter by pdf or images Photo / Exif: ✔️ Filter by date Search Result: ✔️ Providing a selector for how the results are presented is really nice !! If you follow the testing setup described, you can check any changes you do in your local repo. Just checkout your branch, build the app and start the environment. BTW, rebasing required again 😅 |
232b29e to
45af3e1
Compare
|
Thanks for the thorough testing @mmattel! Rebased and addressed the issues. New commit Content search:
Photo / EXIF filters:
Dates:
Search Results:
Not addressed (server-side):
|
|
Many things fixed, great work. While testing, the following issues raised:
IMPORTANT: due to merging photo, you MUST rebase before applying any changes. failing tests: e2e chrome
4 failed |
6cfa6c2 to
be8730b
Compare
|
Rebased onto upstream/main (which now includes #337) and addressed all feedback. New commit CI fixes:
Camera Make/Model:
Date inputs:
File size shorthand:
Dates:
Not addressed (server-side limitations):
|
|
Hey @paul43210 ✔️ Linter and e2e tests are fixed (but there is a new issue in unit tests, see at the bottom) ❌ Regarding to filter for e.g. ISO, see the screenshot below. The exif data, as I understand comes from Tika, is present but search does not find it. There must be another, non-tika related issue. Can you confirm if the photo app shows the exif data that this data comes from Tika? And could you take a look if the current implementation in ocis does index this data or needs a change that it does. ❌ The date fields... Maybe there is a kind of misunderstanding, but nothing has changed ❌ unit tests failing unit-tests: advanced-search+ cd packages/web-app-advanced-search + pnpm test:unit
RUN v4.0.16 /drone/src/packages/web-app-advanced-search ❯ tests/unit/kql.spec.ts (60 tests | 6 failed) 60ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 8 ⎯⎯⎯⎯⎯⎯⎯ FAIL tests/unit/kql.spec.ts > buildPhotoKQL > builds camera make filter
❯ tests/unit/kql.spec.ts:246:52 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/8]⎯ FAIL tests/unit/kql.spec.ts > buildPhotoKQL > builds camera model filter for single word
❯ tests/unit/kql.spec.ts:250:50 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/8]⎯ FAIL tests/unit/kql.spec.ts > buildPhotoKQL > builds camera model filter with spaces (quoted)
❯ tests/unit/kql.spec.ts:254:54 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/8]⎯ FAIL tests/unit/kql.spec.ts > buildPhotoKQL > combines multiple photo filters
❯ tests/unit/kql.spec.ts:290:36 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/8]⎯ FAIL tests/unit/kql.spec.ts > buildKQL > combines standard and photo filters Expected: "mediatype:image/* AND photo.cameramake:Canon" ❯ tests/unit/kql.spec.ts:325:31 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/8]⎯ FAIL tests/unit/kql.spec.ts > buildKQL > builds complex query with multiple filters Expected: "name:sunset AND Type:1 AND mediatype:image/* AND photo.cameramake:Canon AND photo.iso<=800" ❯ tests/unit/kql.spec.ts:341:31 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/8]⎯ FAIL tests/unit/useAdvancedSearch.spec.ts > useAdvancedSearch > kqlQuery computed > builds query from photo filters Expected: "photo.cameramake:Canon" ❯ tests/unit/useAdvancedSearch.spec.ts:89:37 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/8]⎯ FAIL tests/unit/useAdvancedSearch.spec.ts > useAdvancedSearch > kqlQuery computed > combines multiple filters with AND Expected: "name:photo AND Type:1 AND photo.cameramake:Nikon" ❯ tests/unit/useAdvancedSearch.spec.ts:96:37 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[8/8]⎯ Test Files 2 failed (2) ELIFECYCLE Command failed with exit code 1. |
|
Thanks for the thorough testing @mmattel! New commit Unit tests fixed — Updated all 8 test expectations to match the new wildcard format ( Re: Size filtering not working — The KQL query generated is correct (e.g., Re: ISO/Aperture/Focal filtering — Same situation. The extension generates correct KQL ( Re: Dates showing mm/dd/yyyy — This is the browser's native If you'd like the date inputs to always show |
|
Thanks for the continued testing @mmattel! All items from your latest feedback: Unit tests — Fixed in commit Size filtering not working — Root cause found and fixed server-side. The oCIS KQL parser had no support for numeric range operators ( ISO / Aperture / Focal Length filtering — Same root cause as size. All these generate numeric range queries ( Dates showing mm/dd/yyyy in input fields — This is the browser's native Summary of dependencies:
|
|
✔️ CI in my PR is now green, tests pass, thanks Size filtering not working Note that any change can be done in an upcoming PR such was we did for the time format in photo: I ping Lukas for an approval of my PR so this one can be merged asap. If we find things to improve new PRs shouls be created after this one is merged. |
|
Good catch @mmattel — fixed in Example: Also added unit tests for the NaN cases. All 125 tests pass. Separately, the server-side fix for numeric range queries (oCIS PR #12094) is ready — once that's merged, size/ISO/aperture/focal length filtering will all work end-to-end. |
|
I used this PR for testing just to be sure that nothing got mixed up, but things behave the same as when using mine: ✔️ size>=NaN is fixed ✔️ numeric range queries is fixed for dates (using ocis 12094) ✔️ Only enter the min date ✔️ on an virgin setup, no files added to ocis and using advanced search e.g. |
|
New commit Bugs fixed:
Lukas's review feedback (from #338):
ISO/Aperture/Focal range queries — Still not working. The KQL parsing is correct (confirmed All 125 unit tests pass, lint clean, build succeeds. |
|
@paul43210 we have a strange situation: |
oCIS does not expose an explicit OCR flag in config.json or capabilities. When Tika with Tesseract is running, content search is enabled but OCR always showed as Disabled. Fall back to checking capabilities.search.property.content.enabled as a proxy for OCR support. Fixes owncloud#331 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all custom button styling with ODS button classes, swap emoji icons for SVG icons, convert native selects to FilterSelect chip dropdowns with custom text support, replace hardcoded colors with CSS variables for dark mode support, and remove dead CSS rules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Google Pixel phones store 'Google' as the EXIF camera make. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix double-quote content search causing 500 error (strip user-entered
quotes before KQL wrapping to avoid "..."" invalid syntax)
- Fix date year input scrambling (only auto-swap when both dates are
fully formed YYYY-MM-DD, not during mid-edit typing)
- Change date display to ISO 8601 format (yyyy-mm-dd) per international
standard
- Add real image thumbnails in search results (authenticated DAV preview
fetch with blob URL caching, shown in list and grid views)
- Fix Open in Files 404 (use /f/{fileId} short URL instead of broken
/preview/ pattern)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ad of ShallowRef ShallowRef<Map> props caused 'Cannot read properties of undefined (reading get)' because Vue doesn't handle ShallowRef as prop types correctly. Replace with a simple thumbnailVersion number prop that increments when new thumbnails load, triggering v-memo re-evaluation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… columns - Add real image thumbnails in table view Name column - Use table-layout: fixed with column widths so Path truncates instead of causing horizontal scroll - Click any column header to sort (click again to reverse). Active sort shows triangle indicator. Date columns default to descending. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uts, size shorthand - Fix lint: add aria-label to FilterSelect custom input - Fix e2e tests: update selectors to match actual UI classes - Camera make/model: add wildcards so "Nikon" matches "NIKON CORPORATION" - Date inputs: add @change handler so manual typing updates KQL - File size: support K/M/G shorthand (e.g., "1M" = 1048576 bytes) - Rebased onto upstream/main (includes merged owncloud#337) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Browser warning: form field element should have an id or name attribute. Generates a unique id from the label prop (e.g., filter-custom-camera-make). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Unit test expectations now match the new wildcard behavior: photo.cameramake:Canon → photo.cameramake:*Canon* Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevent NaN from appearing in KQL when non-numeric input is entered in size/ISO/aperture/focal length fields. NaN range parts are now silently dropped so only valid numeric expressions appear in the query. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ix, error clear - Replace inline SVGs with OcIcon component (check, close, arrow-down-s, arrow-right-s) in FilterChip, FilterSelect, SearchFilters - Replace raw HTML buttons with OcButton in FilterSelect dropdown - Replace <span class="oc-tag"> with OcTag in FilterChip - Fix date range scramble: remove @input handlers from date fields, keep only @change (fires on blur, not per-keystroke) - Fix sticky error: clearFilters() now resets state.error to null - Replace setTimeout with nextTick in FilterSelect click-outside handler - Add @ownclouders/design-system dependency and externalize for build Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rt broken externals - Use globally registered oc-icon/oc-tag/oc-button (no imports needed) - Revert design-system externalization that broke runtime loading - Remove date auto-swap logic that scrambled start date during typing - Use @change instead of @input for date fields - Add max="9999-12-31" to constrain year to 4 digits - Use plain <button> with OC CSS classes in dropdowns (oc-button component's click events break click-outside handlers) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…IS styling Replace custom chip/dropdown implementation with oc-filter-chip component (Tippy.js positioning, click-outside handling, chip button styling). Use oc-button, oc-checkbox, oc-icon from design system for list items. Add colorful file type icons via --oc-color-icon-* CSS variables. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5e23038 to
abae9fb
Compare
|
✔️ Very cool, daterange, file size, ISO, aperture, etc are now working ❌ but e2e-chrome is failing failing tests: e2e chrome
Running 63 tests using 1 worker
1 failed |
The media type filter now uses oc-filter-chip which renders with class "oc-filter-chip-button" instead of our old "filter-chip-btn". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for flagging the e2e failure @mmattel! Fixed in The selector 62/63 tests were already passing — this was the only one affected by the component migration. |
|
Closing via #338 |



Summary
capabilities.search.property.content.enabledas a proxy for OCR support — when content extraction is active, Tika (with OCR) is runningconfig.jsonor OCS capabilitiesUI alignment with oCIS Design System (ODS)
oc-button oc-rounded oc-button-m ...)<select>elements to FilterSelect chip dropdowns matching oCIS filter patternvar(--oc-color-*)variables for dark mode support.grid-thumbnail, etc.)Fixes #331
Test plan
Generated with Claude Code