Migrate off OCA.Viewer - #670
Conversation
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
…enapi specs Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
ba62a1e to
734cee8
Compare
|
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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe save-output-file response now includes the saved file’s ID, path, and MIME type. Both media fields use the Nextcloud viewer API to open saved files. The chat message schema adds a required nullable Priority: ⬆️ High Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The saved-file preview migration and updated response contracts appear mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to No new file-access bypass was identified. The main remaining risk is compatibility: clients may depend on the previous published response shape, and the new preview flow has not been verified at runtime. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Out of Scope Changes checkExplanation The Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (4 skipped: 4 unsupported.)
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. Comment |
|
Huu, have you tried it ? |
|
@skjnldsv Yeah I tried it, it works fine. It should not? |
It's supposed to be standalone, but I had doubt regarding the action registration since it server is most likely still registering them twice now 🤔 |
|
Noticed a small thing after it went in: the I think the easiest is to just ask WebDAV for the node instead of building it ourselves, that way it's exactly what the server says it is. Pretty much what the old import { getClient, getDefaultPropfind, getRootPath, resultToNode } from '@nextcloud/files/dav'
const { data } = await getClient().stat(`${getRootPath()}${savedPath}`, { details: true, data: getDefaultPropfind() })
const node = resultToNode(data)
getViewer().open([node], node)If you'd rather skip the extra request (fair enough, it's one more PROPFIND per click), building it by hand is fine too, it just needs to look like what WebDAV would give us. So at least With the WebDAV route we don't even need the |
fixes #648
@nextcloud/viewerinstead ofOCA.ViewersaveOutputFileHow to test that?
🤖 AI (if applicable)