Skip to content

Properly build the node we pass to the Viewer - #675

Open
julien-nc wants to merge 1 commit into
mainfrom
fix/670/proper-viewer-node
Open

julien-nc wants to merge 1 commit into
mainfrom
fix/670/proper-viewer-node

Conversation

@julien-nc

Copy link
Copy Markdown
Member

Followup of #670

Correctly create the node we give to the viewer, get it via webdav.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc added enhancement New feature or request 3. to review labels Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c767092a-8c9b-47b2-84a9-da6bf0291f2b

📥 Commits

Reviewing files that changed from the base of the PR and between 93a014e and 959a6b5.

📒 Files selected for processing (2)
  • src/components/fields/ListOfMediaField.vue
  • src/components/fields/MediaField.vue

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

ListOfMediaField and MediaField now use the DAV client to retrieve metadata for saved output files. Each component converts the DAV result to a node and uses that node for the preview instead of constructing a File from the current user and returned file details.

Priority: ⬇️ Low

Merge Risk: 🟡 Moderate · up to 959a6

Saved-output previews are likely to fail in both media fields and should be corrected before merging.

Architecture Summary

Architecture risk: 🔵 Low · up to 959a6

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (ui) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in src/components/fields/ListOfMediaField.vue: The component removes generateRemoteUrl, getCurrentUser, and File imports, and adds DAV client helpers (getClient, getDefaultPropfind, getRootPath, and resultToNode) for resolving output files.
  • observed — Modified behavior in src/components/fields/ListOfMediaField.vue: After the save request, the preview flow now asynchronously stats the saved path through the DAV client, requesting details with default PROPFIND data, and converts the returned data to a node. This replaces constructing a File from the response file ID, MIME type, and current user’s DAV URL and ownership fields.
  • observed — Modified behavior in src/components/fields/MediaField.vue: The imports for generateRemoteUrl, getCurrentUser, and File are removed; DAV client helpers are imported to retrieve and convert file nodes.
  • observed — Modified behavior in src/components/fields/MediaField.vue: After saving the output file, onPreviewClick now stats its path through the DAV client with detailed metadata and default PROPFIND properties, then converts the result to a node. This replaces constructing a viewer File from the current user, returned file ID, and MIME type.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: building the node passed to the Viewer correctly.
Description check ✅ Passed The description directly explains that the Viewer node is created through WebDAV and identifies the related follow-up work.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant