fix(gtk): lora picker — rebuild combo after remove so the LoRA returns to the dropdown #153

Merged
charles merged 1 commit from fix/lora-picker-remove-rebuild into main 2026-04-16 07:22:10 +00:00
Collaborator

Bug

After adding a LoRA via the picker and then removing it (trash button on the row), the LoRA was gone from the picker's dropdown too — unreachable until something else forced a rebuild.

Root cause

crates/loom-gtk/src/components/lora_picker/mod.rs::add_lora_row — the remove button handler only did:

  1. Remove entry from the active Vec
  2. group.remove(&lora.row) (removes the row widget)
  3. notify_change(...)

It never called rebuild_combo_store. The combo store was last rebuilt when the LoRA was added, and that rebuild excludes active LoRAs from the dropdown. So once removed, the LoRA stayed hidden from the combo forever.

Fix

Thread combo_store / combo_updating / available / combo / checkpoint_family into add_lora_row so the remove handler can call rebuild_combo_store after removal. Updated the 3 call sites (combo selection handler, add_lora, add_lora_pinned).

Test plan

  • Open Prompt page with a model that has LoRAs available
  • Pick a LoRA from the dropdown — it moves to the active list, disappears from the dropdown
  • Click the trash icon on the active LoRA row — the row disappears
  • Open the dropdown again — the LoRA is back and selectable

🤖 Generated with Claude Code

## Bug After adding a LoRA via the picker and then removing it (trash button on the row), the LoRA was gone from the picker's dropdown too — unreachable until something else forced a rebuild. ## Root cause `crates/loom-gtk/src/components/lora_picker/mod.rs::add_lora_row` — the remove button handler only did: 1. Remove entry from the `active` `Vec` 2. `group.remove(&lora.row)` (removes the row widget) 3. `notify_change(...)` It never called `rebuild_combo_store`. The combo store was last rebuilt when the LoRA was added, and that rebuild excludes active LoRAs from the dropdown. So once removed, the LoRA stayed hidden from the combo forever. ## Fix Thread `combo_store` / `combo_updating` / `available` / `combo` / `checkpoint_family` into `add_lora_row` so the remove handler can call `rebuild_combo_store` after removal. Updated the 3 call sites (combo selection handler, `add_lora`, `add_lora_pinned`). ## Test plan - [ ] Open Prompt page with a model that has LoRAs available - [ ] Pick a LoRA from the dropdown — it moves to the active list, disappears from the dropdown - [ ] Click the trash icon on the active LoRA row — the row disappears - [ ] Open the dropdown again — the LoRA is back and selectable 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(gtk): lora picker — rebuild combo store on remove
All checks were successful
qa / qa (pull_request) Successful in 15m45s
f59f6dfcbe
The per-row remove button only removed the LoRA from the active Vec and
from the UI group; it never called rebuild_combo_store. Since the combo
store was last rebuilt when the LoRA was added (excluding it from the
dropdown because it was active), removing it left it permanently hidden
from the dropdown.

Fix: thread combo_store/updating/available/combo/checkpoint_family into
add_lora_row so the remove handler can rebuild after removal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
charles deleted branch fix/lora-picker-remove-rebuild 2026-04-16 07:22:10 +00:00
Sign in to join this conversation.
No reviewers
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
charles/loom!153
No description provided.