Repository navigation
feat: report the files the viewer opens to the server - #180
Merged
Merged
Conversation
So apps like recommendations know what the user works with. Only the file the viewer was asked to open counts, not the ones the user steps through, and nothing is reported for guests or public shares. Servers before 36 have no such endpoint: their 404 is only logged for debugging. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Tests that mock @nextcloud/axios without it made the report throw from its catch, an unhandled rejection in every test opening a file. Check the status the way the rest of the viewer does. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
==========================================
+ Coverage 91.98% 92.02% +0.03%
==========================================
Files 54 55 +1
Lines 4643 4666 +23
Branches 1014 1018 +4
==========================================
+ Hits 4271 4294 +23
Misses 346 346
Partials 26 26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 29, 2026
susnux
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The server is getting an API to say "the user opened this file" (nextcloud/server#65994), so recommendations can suggest what people actually work with instead of what sync clients read. The viewer is where most opens happen, Files, Talk, Deck, Text and Office included, so it reports there.
Relates to nextcloud/recommendations#888
Only the file the viewer was asked to open counts. Stepping through the others is browsing, so a gallery isn't 200 opens. Opening the file that's already shown doesn't count twice either. Guests and files from public shares report nothing, since there's no file id for the user to open.
Servers before 36 answer 404, which is only logged for debugging. Opening never waits on the request.
Unit tests cover the service. I haven't tried it against a real server yet.
👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.