fix(frontend): harden inventory search — q= validation, error boundary, stable selection, URL throttle

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-07-15 06:41:54 +02:00
parent ae24cad458
commit edbf7086a6
6 changed files with 133 additions and 4948 deletions

View file

@ -23,7 +23,13 @@ export function ActiveChips({ search }: { search: InventorySearch }) {
if (f.spellContains) chips.push({ label: `Spell: ${f.spellContains}`, remove: () => update({ spellContains: '' }) });
for (const [param, v] of Object.entries(f.ratings)) if (v !== '') {
const def = RATING_DEFS.find(r => r.param === param);
chips.push({ label: `${def?.label ?? param} ≥ ${v}`, remove: () => update({ ratings: { ...f.ratings, [param]: '' } }) });
chips.push({
label: `${def?.label ?? param} ≥ ${v}`,
remove: () => {
const { [param]: _omit, ...rest } = f.ratings;
update({ ratings: rest });
},
});
}
if (f.itemSet) chips.push({ label: `Set: ${f.itemSet}`, remove: () => update({ itemSet: '' }) });
if (f.equippedOnly) chips.push({ label: 'Equipped', remove: () => update({ equippedOnly: false }) });