Skip to content

feat(webdav): add facets to REPORT hits - #3652

Merged
fschade merged 2 commits into
mainfrom
feat/search-report-facets
Nov 24, 2026
Merged

fschade merged 2 commits into
mainfrom
feat/search-report-facets

Conversation

@dschmidt

@dschmidt dschmidt commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

The search service returns the audio, location, image, photo, video, motion photo and live photo facets with every hit, but the REPORT response only carries photo and location, as flat oc:photo-* props (#4096).

The web client needs them in two places:

  1. Showing motion and live photos in search results. A hit without the facet is not recognizable as one, and a motion photo cannot be played, since the appended video is read at size - motionPhoto.videoSize.
  2. Playing a live photo whose video lies in another folder than the still. Apple stores the two halves as two files. Web looks for the video in the current folder listing first and falls back to a server search for livePhoto.contentId. Without facets in the hit it needs a PROPFIND on top, only to read stillImageTimeUs for the right start time.

The hits now carry all facets in the xml shape PROPFIND uses, rendered generically from the search message, so a client parses both the same way. This replaces the flat oc:photo-* props from #4096, which are not in a release yet. No proto, index or reva change. A stopgap until the graph search returns driveItems with facets.

@codacy-production

codacy-production Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -6 complexity

Metric Results
Complexity -6

View in Codacy

🟢 Coverage 100.00% diff coverage

Metric Results
Coverage variation Report missing for 9afb99f1
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9afb99f) Report Missing Report Missing Report Missing
Head commit (c3d9b93) 94484 28535 30.20%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3652) 33 33 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt
dschmidt marked this pull request as ready for review October 3, 2026 10:59
@dschmidt dschmidt changed the title feat(webdav): carry the facets in the search REPORT hits feat(webdav): add facets to REPORT hits Oct 3, 2026
@dschmidt
dschmidt requested review from aduffeck, butonic and fschade and a balanced review from Copilot October 3, 2026 11:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Timestamp serialization currently discards valid fractional-second precision.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds search facets to WebDAV REPORT hits using the same XML structure as PROPFIND.

Changes:

  • Serializes seven search facet types into XML.
  • Adds coverage for facet formatting and escaping.
  • Promotes strcase to a direct dependency.
File Description
services/​webdav/​pkg/​service/​v0/​search.go Adds generic facet serialization.
services/​webdav/​pkg/​service/​v0/​search_test.go Tests generated facet XML.
go.mod Promotes the serialization dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

dschmidt added a commit to opencloud-eu/web that referenced this pull request Oct 3, 2026
The search REPORT only returns the facets of its hits with
opencloud-eu/opencloud#3652. Until that is available the still image
time of a video found through the search comes from a file info request.
@dschmidt
dschmidt force-pushed the feat/search-report-facets branch 2 times, most recently from a6a7496 to 0e8f883 Compare October 3, 2026 14:44
dschmidt added a commit to opencloud-eu/web that referenced this pull request Oct 9, 2026
The search REPORT only returns the facets of its hits with
opencloud-eu/opencloud#3652. Until that is available the still image
time of a video found through the search comes from a file info request.
@dschmidt
dschmidt force-pushed the feat/search-report-facets branch from 0e8f883 to 47d716a Compare October 15, 2026 13:49
@dschmidt
dschmidt force-pushed the feat/search-report-facets branch from 47d716a to 7602c6a Compare October 27, 2026 11:43
The search service returns audio, location, image, photo, video, motion photo and live photo with every hit, the REPORT response only carried photo and location, as flat oc:photo-* props. All facets are now rendered in the xml shape PROPFIND uses, so a client reads both the same way. This replaces the flat props.
@dschmidt
dschmidt force-pushed the feat/search-report-facets branch from 7602c6a to 927df2b Compare November 23, 2026 16:56
@fschade
fschade enabled auto-merge November 24, 2026 10:52
@fschade
fschade merged commit 27b89c8 into main Nov 24, 2026
60 checks passed
@fschade
fschade deleted the feat/search-report-facets branch November 24, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants