LLM query builder: sidebar filter controls do not update after populateFromLLM #39

Closed
opened 2026-04-14 12:06:19 -07:00 by pyr0ball · 0 comments
Owner

Problem

When the LLM query builder panel runs populateFromLLM(), it writes to store.filters (the store-level ref added in #29). However, the filter sidebar in SearchView.vue binds to its own local reactive<SearchFilters> — so mustInclude, price, condition, and other filter controls stay visually unchanged after a Build with AI run.

Auto-run still works correctly (the store fires search() with the LLM-populated params). But users who have auto-run disabled will see "Filters updated" in the panel while the sidebar shows stale values — confusing.

Root cause

search.ts now has two parallel filter states:

  • store.filters — added for the LLM path, mutated by populateFromLLM
  • Local reactive<SearchFilters> in SearchView.vue — what the sidebar controls bind to

Fix

Consolidate to one canonical filter state. Move the sidebar’s local reactive<SearchFilters> into the store (or replace it with store.filters) and update all v-model bindings in SearchView.vue to use store.filters. Remove the now-redundant store-level filters ref and just keep one.

Acceptance criteria

  • After a Build with AI run, mustInclude, price range, condition, and categoryId controls in the sidebar reflect the LLM output
  • Existing filter sidebar behavior (user-driven edits, clear, reset) is unchanged
  • All 129 Python tests still pass
  • vue-tsc --noEmit reports zero errors
## Problem When the LLM query builder panel runs `populateFromLLM()`, it writes to `store.filters` (the store-level ref added in #29). However, the filter sidebar in `SearchView.vue` binds to its own local `reactive<SearchFilters>` — so mustInclude, price, condition, and other filter controls stay visually unchanged after a Build with AI run. Auto-run still works correctly (the store fires `search()` with the LLM-populated params). But users who have auto-run disabled will see "Filters updated" in the panel while the sidebar shows stale values — confusing. ## Root cause `search.ts` now has two parallel filter states: - `store.filters` — added for the LLM path, mutated by `populateFromLLM` - Local `reactive<SearchFilters>` in `SearchView.vue` — what the sidebar controls bind to ## Fix Consolidate to one canonical filter state. Move the sidebar’s local `reactive<SearchFilters>` into the store (or replace it with `store.filters`) and update all `v-model` bindings in `SearchView.vue` to use `store.filters`. Remove the now-redundant store-level `filters` ref and just keep one. ## Acceptance criteria - After a Build with AI run, mustInclude, price range, condition, and categoryId controls in the sidebar reflect the LLM output - Existing filter sidebar behavior (user-driven edits, clear, reset) is unchanged - All 129 Python tests still pass - `vue-tsc --noEmit` reports zero errors
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/snipe#39
No description provided.