Skip to content

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

Open
dschmidt wants to merge 1 commit into
mainfrom
feat/search-report-facets
Open

dschmidt wants to merge 1 commit 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 dropped them.

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 the facets in the xml shape PROPFIND uses, rendered generically from the search message, so a client parses both the same way. 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 0 complexity

Metric Results
Complexity 0

View in Codacy

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.

Comment thread services/webdav/pkg/service/v0/search.go
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
The search service returns audio, location, image, photo, video, motion photo and live photo with every hit, the REPORT response dropped them and clients had to PROPFIND each hit. They are now rendered in the xml shape PROPFIND uses, so a client reads both the same way.
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.

2 participants