Repository navigation
fix(files): open public mind map shares reliably on Nextcloud 32 - #389
Merged
Merged
Conversation
Files 32 looks up the default action once when it opens a file from the URL, as on a public file share. The action was registered from a lazily loaded chunk, so when that chunk came late, as it sometimes did in Firefox, the share page showed the file list instead of the mind map. Register it synchronously from the init script instead. To keep the init script small it is a plain object in the window._nc_fileactions registry of @nextcloud/files 3, whose FileAction only wraps these properties, and @nextcloud/files-legacy is dropped. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This was referenced Oct 17, 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.
On Nextcloud 32, opening a public file share of a mind map sometimes showed the file list instead of the mind map, mostly in Firefox (8–9 of 10 page loads opened it). It happens on every build since #375, including before #387 and #388.
Files 32 opens the shared file through its default action, and it looks that action up exactly once when it opens a file from the URL (
handleOpenFile()inFilesListVirtual.vue). Since #375 the 32-only action was registered from a lazily loaded chunk (import('./legacyFileAction.js')), so whenever that chunk arrived after the lookup, there was no default action and Files showed the list.The action is now registered synchronously from the init script. Importing
@nextcloud/files-legacystatically would have added about 397 kB (134 kB gzip) to every page on every version. Instead the action is a plain object in thewindow._nc_fileactionsregistry of@nextcloud/files3, which is allregisterFileAction()writes to. ItsFileActionclass only wraps those properties, and Files 32 reads them directly, never checking the class. TheDefaultType.HIDDENandPermission.READvalues are inlined.@nextcloud/files-legacyis dropped, and the init script grows by 0.5 kB.Testing:
enabled().🤖 AI (if applicable)