From 62816909b287f2f83ca5d58fc01f54d0169c9bc1 Mon Sep 17 00:00:00 2001 From: tgiachi Date: Thu, 12 Nov 2026 17:18:15 +0100 Subject: [PATCH] fix(web): keep the duplicates table readable on a phone, and say it in the README - The numbers of a copy (format, bitrate, size) stay on one line and the table is a little tighter below 640 px, so the size is in view instead of breaking letter by letter. - In the confirmation, the copy that stays is in bold, apart from the ones that go. - README: the admin area now lists the duplicates, and the web app paragraph says what the section does. --- README.md | 4 ++-- web/src/pages/admin/DuplicateGroupCard.tsx | 24 +++++++++++----------- web/src/pages/admin/DuplicatesPage.tsx | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5ce1c8d..d35d471 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ It is a single executable, one database (SQLite by default, PostgreSQL if you pr ## What is not there yet -Radio queues, OpenSubsonic compatibility, transcoding, and the ListenBrainz integration. The web client is built into the binary (see [Web app](#web-app)), and its admin area covers everything the API can do for an admin: libraries and scanning, users, the external providers and the bulk jobs. +Radio queues, OpenSubsonic compatibility, transcoding, and the ListenBrainz integration. The web client is built into the binary (see [Web app](#web-app)), and its admin area covers everything the API can do for an admin: libraries and scanning, users, the external providers, the bulk jobs and the duplicates. ## Requirements @@ -340,7 +340,7 @@ npm install SONDA_URL=http://127.0.0.1:8080 npm run dev # open http://localhost:5173, /api is proxied to Sonda ``` -What it does today: sign in (and create the first account of a new server), browse artists, albums and songs, search, and play with a queue, shuffle, repeat, media keys, a volume slider with mute (remembered in the browser) and a full-screen player. Artist pages show the Wikipedia text, similar artists and tags when those providers are on, each with its credit, and the photo credit next to the photo. It reports one listen per play. Discover suggests artists from the ones you pick, or from your listening only after you allow it (a dialog says that their names go to Last.fm), explains each score, and keeps your wishlist and the artists you are not interested in. An admin who set up the `lidarr` provider gets a "Request on Lidarr" button on an artist's page and on the Discover cards: it asks first, then sends that one artist to their own Lidarr, which does the downloading (the web app downloads nothing; the page of an artist reads what Lidarr has, the cards ask nothing until you send). An admin also gets an Admin area to add, rename, move and remove libraries and to start a scan (of one library or all, optionally reading every file again) and follow it, and to manage accounts: add one by email, give or take away the admin role, reset a password (which ends that person's sessions) and delete an account. The last admin cannot be changed, and your own account has no buttons there. Providers have a card each that says what the provider is sent: turning one on asks first, the API key is write-only (never shown, and gone from the page once saved), and there are a test of the key, the contact or address, removing what a provider gave, and, for Lidarr, the profiles and root folder to use when an artist is added. The bulk jobs (album covers, artist pictures, artist descriptions) each have a card that says what the job sends and to whom: starting one asks first and says it goes through the whole library, reading everything again is a separate choice, a job whose providers are off cannot be started, and the page follows its progress and can stop it. There are six themes (Sonda, Tokyo Night, Gruvbox dark, Gruvbox light, Dracula and Neon) and two languages (English and Italian), both chosen in Settings. +What it does today: sign in (and create the first account of a new server), browse artists, albums and songs, search, and play with a queue, shuffle, repeat, media keys, a volume slider with mute (remembered in the browser) and a full-screen player. Artist pages show the Wikipedia text, similar artists and tags when those providers are on, each with its credit, and the photo credit next to the photo. It reports one listen per play. Discover suggests artists from the ones you pick, or from your listening only after you allow it (a dialog says that their names go to Last.fm), explains each score, and keeps your wishlist and the artists you are not interested in. An admin who set up the `lidarr` provider gets a "Request on Lidarr" button on an artist's page and on the Discover cards: it asks first, then sends that one artist to their own Lidarr, which does the downloading (the web app downloads nothing; the page of an artist reads what Lidarr has, the cards ask nothing until you send). An admin also gets an Admin area to add, rename, move and remove libraries and to start a scan (of one library or all, optionally reading every file again) and follow it, and to manage accounts: add one by email, give or take away the admin role, reset a password (which ends that person's sessions) and delete an account. The last admin cannot be changed, and your own account has no buttons there. Providers have a card each that says what the provider is sent: turning one on asks first, the API key is write-only (never shown, and gone from the page once saved), and there are a test of the key, the contact or address, removing what a provider gave, and, for Lidarr, the profiles and root folder to use when an artist is added. The bulk jobs (album covers, artist pictures, artist descriptions) each have a card that says what the job sends and to whom: starting one asks first and says it goes through the whole library, reading everything again is a separate choice, a job whose providers are off cannot be started, and the page follows its progress and can stop it. The Duplicates section lists the songs that are in more than one file, with a row for each copy (album, format, bitrate, size) and whether the files are byte for byte the same once the check has read them. The copy Sonda would keep is already chosen and you can choose another; "Delete the others" (one song) and "Clean all suggestions" (every song shown) ask first, list every file that stays and every file that goes with the space freed, and go song by song, stopping at the first refusal and saying why. With `library.allow_delete` off, which is the default, everything is shown and the delete buttons are disabled, and the page says how to turn it on. There are six themes (Sonda, Tokyo Night, Gruvbox dark, Gruvbox light, Dracula and Neon) and two languages (English and Italian), both chosen in Settings. More commands, all run in `web/`: `npm test`, `npm run build`, and `npm run gen:api`, which rebuilds `src/api/schema.d.ts` from the OpenAPI spec (it fetches the generator with `npx`, so it needs the network once). `npm run build` writes to `internal/webui/dist` (git-ignored), not to `web/dist`. diff --git a/web/src/pages/admin/DuplicateGroupCard.tsx b/web/src/pages/admin/DuplicateGroupCard.tsx index 45d8275..7d383af 100644 --- a/web/src/pages/admin/DuplicateGroupCard.tsx +++ b/web/src/pages/admin/DuplicateGroupCard.tsx @@ -32,29 +32,29 @@ export default function DuplicateGroupCard({ const status = group.identical ? 'identical' : group.hashed ? 'different' : 'unchecked' return ( -
+

{group.title}

{artistsOf(group)}

- +
- - - - - @@ -62,7 +62,7 @@ export default function DuplicateGroupCard({ {group.files.map((file) => ( - - - - - + + + ))} diff --git a/web/src/pages/admin/DuplicatesPage.tsx b/web/src/pages/admin/DuplicatesPage.tsx index cda7c7c..192a36b 100644 --- a/web/src/pages/admin/DuplicatesPage.tsx +++ b/web/src/pages/admin/DuplicatesPage.tsx @@ -116,7 +116,7 @@ export default function DuplicatesPage() {

{artistsOf(plan.group)}

)} -

{t('admin.duplicates.stays', { what: describeCopy(t, plan.keep, i18n.language) })}

+

{t('admin.duplicates.stays', { what: describeCopy(t, plan.keep, i18n.language) })}

{plan.remove.map((file) => (

{t('admin.duplicates.goes', { what: describeCopy(t, file, i18n.language) })}

))}
+ {t('admin.duplicates.keepColumn')} + {t('admin.duplicates.album')} + {t('admin.duplicates.format')} + {t('admin.duplicates.bitrate')} + {t('admin.duplicates.size')}
+ + {file.album?.title ?? t('admin.duplicates.noAlbum')} {file.track_id === group.suggested_keep_track_id && {t('admin.duplicates.suggested')}} {file.format}{file.bitrate > 0 ? t('admin.duplicates.kbps', { count: file.bitrate }) : ''}{formatBytes(file.size_bytes, i18n.language)}{file.format}{file.bitrate > 0 ? t('admin.duplicates.kbps', { count: file.bitrate }) : ''}{formatBytes(file.size_bytes, i18n.language)}