Repository navigation
feat(files): show a linked file inline again in its reference widget - #65753
Merged
Merged
Conversation
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
skjnldsv
force-pushed
the
feat/files-reference-widget-viewer
branch
from
October 21, 2026 11:56
3c1699e to
a259d66
Compare
skjnldsv
marked this pull request as ready for review
October 21, 2026 12:24
skjnldsv
requested review from
kristian-zendato,
pringelmann and
susnux
and removed request for
a team
October 21, 2026 12:24
pringelmann
reviewed
Oct 21, 2026
| mime: this.richObject.mimetype, | ||
| size: this.richObject.size, | ||
| mtime: new Date(this.richObject.mtime * 1000), | ||
| owner: uid, |
Contributor
There was a problem hiding this comment.
Is it always the case that the current user is the owner?
Member
Author
There was a problem hiding this comment.
it's a good question to ask. In reality no, this is a workaround. The first iteration fo the widget did not even have the right data for it. Since we're scoping the file and it's always relative to the current user's home directory, using the current logged uid is fine. But it's only because we actually don't really use that info anywhere else on the reference widget viewer
Contributor
|
Looks good! Just a question on |
pringelmann
approved these changes
Oct 21, 2026
The widget looked for the handlers of the viewer app, which are gone since the viewer moved into @nextcloud/viewer: every file link fell back to its static card. Put a <nc-viewer-file> there instead, which shows the file read-only with a menu to open it in the viewer or download it, and falls back to the card when it cannot. A click on the card opens the viewer through the library. The file is handed the permissions the reference carries, and what its share allows: no download offered where a share forbids it. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
skjnldsv
force-pushed
the
feat/files-reference-widget-viewer
branch
from
October 21, 2026 14:34
99ab547 to
aa6adad
Compare
susnux
approved these changes
Oct 22, 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.
Summary
File links in Talk, Text or Collectives used to show the file inline, but the widget looked for the viewer app's handlers, which are gone since the viewer moved into @nextcloud/viewer. Every link fell back to its static card. The widget now puts a
<nc-viewer-file>there: the file shows read-only, with a menu to open it in the viewer or download it, and the card comes back if it can't be shown. Also bumps @nextcloud/viewer to 2.0.0-beta.19.Checklist
3. to review, feature component)stable32)AI (if applicable)