Files
anki/docs-site
Andreas 4383a7075c fix: prefer packaged add-on name for AnkiWeb installs (#5362)
## Linked issue (required)

Fixes #5342

## Summary / motivation (required)

When installing an add-on from AnkiWeb, Anki currently derives the
displayed
name from the AnkiWeb download filename and passes it as overriding
manifest
metadata. This can alter names when the filename has been sanitized by
AnkiWeb.

This change prefers a non-empty `name` from a valid packaged
`manifest.json`
when available, while retaining the existing AnkiWeb-derived name as a
fallback.

## Steps to reproduce (required, use N/A if not applicable)

1. Package an add-on with a `manifest.json` whose `name` contains a
character
that is removed from the AnkiWeb download filename, such as `&` or `𝕾`.
2. Upload the add-on to AnkiWeb and install it from there.
3. Open the Add-ons dialog and observe that the displayed name is
derived from
   the sanitized AnkiWeb filename rather than the packaged `name`.

## How to test (required)

### Checklist (minimum)

- [x] I ran `./ninja check` or an equivalent relevant check locally.
- [x] I added or updated tests when the change is non-trivial or
behavior changed.

### Details

Added tests verifying that:

- a non-empty `name` from a valid packaged manifest is preferred for
AnkiWeb
  installs;
- the existing filename-derived name remains the fallback when no usable
  packaged name is available.

`./ninja check` passes locally.

Also manually verified with a local build by installing an AnkiWeb
add-on whose
packaged name differed from its AnkiWeb title; the Add-ons dialog used
the packaged name.

## Before / after behavior (optional)

Before: AnkiWeb installs always use the filename-derived name,
overriding a
`name` supplied in the packaged manifest.

After: A non-empty packaged `name` is preferred when available;
otherwise,
the existing AnkiWeb-derived name is retained.

## Risk / compatibility / migration (optional)

Low. The change is limited to AnkiWeb add-on installation, and the
existing
fallback behavior is preserved for add-ons without a usable packaged
name.

## UI evidence (required for visual changes; otherwise N/A)

N/A

## Scope

- [x] This PR is focused on one change (no unrelated edits).
2026-09-13 19:04:57 +03:00
..
2026-09-10 15:10:22 +01:00
2026-09-10 15:10:22 +01:00
2026-09-10 15:10:22 +01:00
2026-08-10 16:08:17 -03:00
2026-09-10 15:10:22 +01:00
2026-08-07 15:57:00 +03:00
2026-08-07 15:57:00 +03:00

Documentation Website

This directory contains Mintlify docs served at https://anki.mintlify.app/

License

Unless stated otherwise, any documentation changes you submit will be licensed under the CC BY-SA 4 license.

Translations

To help translate the website to your language, make changes to the relevant .mdx pages under the language's subdirectory (e.g. docs-site/ru/) and submit a PR. If your language doesn't have a subdirectory yet, create one with the same structure (e.g. ru/manual) and modify docs-site/docs.json to list translated pages. See https://www.mintlify.com/docs/guides/internationalization#configure-the-language-switcher