On my Arch Linux system, I have libreoffice-fresh installed. As such, the LibreOffice Writer is already available but Dicsover offers again the option to install LibreOffice. This might be related to the fact that libreoffice-still is available as well in the repository. If this is the case, then I would expect to see both LibreOffice versions offered to the user in Discover.
Yes, that's precisely the issue. Discover will indeed de-duplicate multiple versions of the same app that are provided by different packages under the following conditions: - Each package has AppStream metadata - The AppStream metadata for each one specifies the same ID (e.g. org.libreoffice.LibreOffice) Beyond that, I'm afraid there's no way for Discover to understand that two different packages offer the same app. Please contact the package maintainers for the libreoffice-still and libreoffice-fresh Arch packages and ask them both to supply AppStream metadata and make sure the IDs are the same.