tui: entities — per-entity LoRA association editor #139

Closed
opened 2026-04-14 20:12:51 +00:00 by claude-desktop · 0 comments
Collaborator

User story

As a user binding LoRAs to my characters, I want to attach a list of EntityLora (id + strength + trigger words) to each entity, so that selecting the entity on the Generate screen brings its LoRAs along automatically.

Background

Entity::loras: Vec<EntityLora> already exists in loom-core (crates/loom-core/src/models/entity.rs:118) and the field is persisted, but the TUI entity editor doesn't expose it. GTK lets users attach LoRAs in the entity editor.

Acceptance criteria

LoRA section in entity Detail

  • Below the prompt boxes, a "LoRAs" section lists entity.loras
  • Each row: name · strength (0.00–1.50) · trigger words preview
  • Empty state: (no LoRAs — press 'l' to add)

Add LoRA

  • l (lowercase) from entity Detail opens the existing LoRA picker overlay (reuse LoraPickerOverlay)
  • On select, append to entity.loras with default strength 1.0
  • + / - adjusts strength of the focused LoRA in 0.05 steps

Remove LoRA

  • dd chord on the focused LoRA removes it (with Confirm overlay)

Trigger words

  • On add, copy LuaLoraInfo::trigger_words into the new EntityLora.trigger_words
  • Display first 3 trigger words inline; rest expand with T toggle

Persistence

  • Changes save via storage.save_entity immediately on each mutation
  • Detail focus jumps to a new "LoRAs" sub-field; arrow keys cycle entity → prompt → negative → loras → entity

Tests

  • Unit: add/remove LoRA round-trips through storage
  • Unit: strength clamps to [0.0, 1.5]

Out of scope

  • AI-suggest LoRAs (separate)
  • Per-LoRA preview image fetching

References

  • crates/loom-core/src/models/entity.rs:118 (Entity::loras, EntityLora)
  • crates/loom-tui/src/app.rs (LoraPickerOverlay)
  • crates/loom-gtk/src/pages/entity/mod.rs (GTK reference)
## User story As a user binding LoRAs to my characters, I want to attach a list of `EntityLora` (id + strength + trigger words) to each entity, so that selecting the entity on the Generate screen brings its LoRAs along automatically. ## Background `Entity::loras: Vec<EntityLora>` already exists in `loom-core` (`crates/loom-core/src/models/entity.rs:118`) and the field is persisted, but the TUI entity editor doesn't expose it. GTK lets users attach LoRAs in the entity editor. ## Acceptance criteria ### LoRA section in entity Detail - [ ] Below the prompt boxes, a "LoRAs" section lists `entity.loras` - [ ] Each row: name · strength (0.00–1.50) · trigger words preview - [ ] Empty state: `(no LoRAs — press 'l' to add)` ### Add LoRA - [ ] `l` (lowercase) from entity Detail opens the existing LoRA picker overlay (reuse `LoraPickerOverlay`) - [ ] On select, append to `entity.loras` with default strength 1.0 - [ ] `+` / `-` adjusts strength of the focused LoRA in 0.05 steps ### Remove LoRA - [ ] `dd` chord on the focused LoRA removes it (with Confirm overlay) ### Trigger words - [ ] On add, copy `LuaLoraInfo::trigger_words` into the new `EntityLora.trigger_words` - [ ] Display first 3 trigger words inline; rest expand with `T` toggle ### Persistence - [ ] Changes save via `storage.save_entity` immediately on each mutation - [ ] Detail focus jumps to a new "LoRAs" sub-field; arrow keys cycle entity → prompt → negative → loras → entity ### Tests - [ ] Unit: add/remove LoRA round-trips through storage - [ ] Unit: strength clamps to [0.0, 1.5] ## Out of scope - AI-suggest LoRAs (separate) - Per-LoRA preview image fetching ## References - `crates/loom-core/src/models/entity.rs:118` (`Entity::loras`, `EntityLora`) - `crates/loom-tui/src/app.rs` (`LoraPickerOverlay`) - `crates/loom-gtk/src/pages/entity/mod.rs` (GTK reference)
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
charles/loom#139
No description provided.