From b39d4e92c9413df7bed9105b531d0aecae82fb7e Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 21 Aug 2026 10:42:48 +0100 Subject: [PATCH] fix(webui): query-safe expand state, prefixed search, accessible row toggle Review fix round (5 Important + 3 folded) against the provider-model accordion (f9b289f): 1. Manual expand state corruption during an active search. Clicking a row that was only auto-expanded by the search (never manually opened) read the RAW manual flag as false and added it to manuallyExpanded - invisible immediately (already showing via auto-expand) but wrongly left expanded after the search cleared. Fixed with a two-set design in a new, Vue-free module (webui/src/lib/provider-expand.ts): manuallyExpanded (the real, cross-search manual state) plus manuallyCollapsed (an override a click can set to suppress an auto-expand while a query is active). toggleProviderExpand now flips against the caller-computed EFFECTIVE current state, not the raw manual flag. manuallyCollapsed clears whenever the query becomes empty (watched, not just the clear button, so backspacing to empty resets it too). Verified two ways: a throwaway Node assertion script (node --experimental-strip-types, no test-runner dependency added) exercises the exact review-described sequence against the plain module; the identical sequence was then reproduced live in a real browser and screenshotted at each step. 2. Search matched raw model ids while chips display and copy the prefixed routable id - copying a chip and pasting it into search found nothing. Fixed: matching is now against routableModelId(p.name, m) for both the provider-level filter and the per-provider visible-model filter - strictly more permissive than the bare id. Verified live: searching the full "openai/gpt-4o-mini" string now matches. 3. role="button" on a broke table AT semantics - overriding a 's row semantics to "button" strips it from the table's row/column structure for a screen reader. Moved the interactive control to a real