fix(eq): show the active AutoEQ profile name in the preset picker (#1147)

* fix(eq): surface the active AutoEQ profile name in the preset picker

* i18n(settings): add AutoEQ preset group label (10 locales)

* docs(changelog): AutoEQ active-profile picker fix (#1147)
This commit is contained in:
Psychotoxical
2026-06-21 22:58:33 +02:00
committed by GitHub
parent 887c940e1b
commit ec8cfbc1c8
13 changed files with 75 additions and 1 deletions
+6
View File
@@ -180,6 +180,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* The local library database now opens, swaps and restores through one pipeline, so a swapped or restored file always picks up pending migrations and one-time repairs instead of serving a stale schema.
* A panic or a poisoned lock in one query no longer wedges the whole library index — connections recover and report the error instead, and the new sort-key migration applies idempotently so a half-applied upgrade self-heals on the next launch.
### Equalizer — the active AutoEQ profile name stays visible
**By [@Psychotoxical](https://github.com/Psychotoxical), PR [#1147](https://github.com/Psychotoxical/psysonic/pull/1147)**
* After applying an AutoEQ headphone profile, the preset picker now shows the profile name under an AutoEQ group instead of going blank, and the delete button no longer appears for AutoEQ profiles (where it did nothing).
## [1.48.1] - 2026-06-15
## Fixed
+52
View File
@@ -0,0 +1,52 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import { cleanup, screen } from '@testing-library/react';
import { renderWithProviders } from '../test/helpers/renderWithProviders';
import Equalizer from './Equalizer';
import { useEqStore } from '../store/eqStore';
const FLAT = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
function resetEq(over: Record<string, unknown> = {}): void {
useEqStore.setState({
gains: [...FLAT],
enabled: true,
preGain: 0,
activePreset: 'Flat',
customPresets: [],
...over,
});
}
describe('Equalizer preset picker', () => {
beforeEach(() => resetEq());
afterEach(() => cleanup());
it('shows the active AutoEQ profile name in the picker', () => {
// AutoEQ sets activePreset to the headphone name — neither a built-in nor a
// saved custom preset. It must still be visible in the picker.
resetEq({ activePreset: 'Sennheiser HD 600', customPresets: [] });
const { container } = renderWithProviders(<Equalizer />);
expect(screen.getByText('Sennheiser HD 600')).toBeInTheDocument();
// AutoEQ profiles are not deletable custom presets → no delete button.
expect(container.querySelector('[data-tooltip="Delete preset"]')).toBeNull();
});
it('shows the delete button only for a saved custom preset', () => {
resetEq({
activePreset: 'My Mix',
customPresets: [{ name: 'My Mix', gains: [...FLAT], builtin: false }],
});
const { container } = renderWithProviders(<Equalizer />);
expect(screen.getByText('My Mix')).toBeInTheDocument();
expect(container.querySelector('[data-tooltip="Delete preset"]')).not.toBeNull();
});
it('shows no delete button for a built-in preset', () => {
resetEq({ activePreset: 'Rock' });
const { container } = renderWithProviders(<Equalizer />);
expect(container.querySelector('[data-tooltip="Delete preset"]')).toBeNull();
});
});
+7 -1
View File
@@ -55,7 +55,12 @@ export default function Equalizer() {
return () => details.removeEventListener('toggle', onToggle);
}, [redraw]);
const isCustomSaved = activePreset && !BUILTIN_PRESETS.some(p => p.name === activePreset);
const isCustomSaved = activePreset !== null && customPresets.some(p => p.name === activePreset);
const isBuiltin = activePreset !== null && BUILTIN_PRESETS.some(p => p.name === activePreset);
// AutoEQ profiles store the headphone name in activePreset, which is neither a
// built-in nor a saved custom preset — surface it in the picker so the active
// profile name stays visible after the lookup clears.
const isAutoEq = activePreset !== null && !isBuiltin && !isCustomSaved;
const selectValue = activePreset ?? '__custom__';
const handleSave = () => {
@@ -85,6 +90,7 @@ export default function Equalizer() {
onChange={v => applyPreset(v)}
options={[
...(activePreset === null ? [{ value: '__custom__', label: t('settings.eqPresetCustom'), disabled: true }] : []),
...(isAutoEq ? [{ value: activePreset!, label: activePreset!, group: t('settings.eqPresetAutoEqGroup') }] : []),
...BUILTIN_PRESETS.map(p => ({ value: p.name, label: p.name, group: t('settings.eqPresetBuiltin') })),
...customPresets.map(p => ({ value: p.name, label: p.name, group: t('settings.eqPresetCustomGroup') })),
]}
+1
View File
@@ -125,6 +125,7 @@ export const settings = {
eqPresetCustom: 'Benutzerdefiniert',
eqPresetBuiltin: 'Eingebaute Presets',
eqPresetCustomGroup: 'Meine Presets',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Als Preset speichern',
eqPresetName: 'Preset-Name…',
eqDeletePreset: 'Preset löschen',
+1
View File
@@ -125,6 +125,7 @@ export const settings = {
eqPresetCustom: 'Custom',
eqPresetBuiltin: 'Built-in Presets',
eqPresetCustomGroup: 'My Presets',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Save as Preset',
eqPresetName: 'Preset name…',
eqDeletePreset: 'Delete preset',
+1
View File
@@ -124,6 +124,7 @@ export const settings = {
eqPresetCustom: 'Personalizado',
eqPresetBuiltin: 'Preajustes Integrados',
eqPresetCustomGroup: 'Mis Preajustes',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Guardar como Preajuste',
eqPresetName: 'Nombre del preajuste…',
eqDeletePreset: 'Eliminar preajuste',
+1
View File
@@ -124,6 +124,7 @@ export const settings = {
eqPresetCustom: 'Personnalisé',
eqPresetBuiltin: 'Préréglages intégrés',
eqPresetCustomGroup: 'Mes préréglages',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Enregistrer comme préréglage',
eqPresetName: 'Nom du préréglage…',
eqDeletePreset: 'Supprimer le préréglage',
+1
View File
@@ -125,6 +125,7 @@ export const settings = {
eqPresetCustom: 'カスタム',
eqPresetBuiltin: '内蔵プリセット',
eqPresetCustomGroup: '自分のプリセット',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'プリセットとして保存',
eqPresetName: 'プリセット名…',
eqDeletePreset: 'プリセットを削除',
+1
View File
@@ -124,6 +124,7 @@ export const settings = {
eqPresetCustom: 'Egendefinert',
eqPresetBuiltin: 'Innebygde forhåndsinnstillinger',
eqPresetCustomGroup: 'Mine forhåndsinnstillinger',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Lagre som forhåndsinnstilling',
eqPresetName: 'Navn på forhåndsinnstilling…',
eqDeletePreset: 'Slett forhåndsinnstilling',
+1
View File
@@ -124,6 +124,7 @@ export const settings = {
eqPresetCustom: 'Aangepast',
eqPresetBuiltin: 'Ingebouwde voorinstellingen',
eqPresetCustomGroup: 'Mijn voorinstellingen',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Opslaan als voorinstelling',
eqPresetName: 'Naam voorinstelling…',
eqDeletePreset: 'Voorinstelling verwijderen',
+1
View File
@@ -124,6 +124,7 @@ export const settings = {
eqPresetCustom: 'Personalizat',
eqPresetBuiltin: 'Preseturi încorporate',
eqPresetCustomGroup: 'Preseturile mele',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Salvează ca Preset',
eqPresetName: 'Nume preset…',
eqDeletePreset: 'Șterge preset',
+1
View File
@@ -124,6 +124,7 @@ export const settings = {
eqPresetCustom: 'Свой',
eqPresetBuiltin: 'Встроенные',
eqPresetCustomGroup: 'Мои пресеты',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: 'Сохранить как пресет',
eqPresetName: 'Название пресета…',
eqDeletePreset: 'Удалить пресет',
+1
View File
@@ -124,6 +124,7 @@ export const settings = {
eqPresetCustom: '自定义',
eqPresetBuiltin: '内置预设',
eqPresetCustomGroup: '我的预设',
eqPresetAutoEqGroup: 'AutoEQ',
eqSavePreset: '保存为预设',
eqPresetName: '预设名称…',
eqDeletePreset: '删除预设',