---
title: State change unassigns unit from card even without unassign checkbox
source: user-report
priority: high
area: logic
created: 2026-04-12
---

Changing a product unit's state while it's assigned to a card unassigns it from the card, even when the 'unassign' checkbox is not checked. The unit should remain assigned to the card unless the user explicitly checks the unassign checkbox.

## Likely Location

`crates/app/src/main.rs` — the `state-modal-confirmed` callback handler. The `effective_unassign` logic at ~line 4584 auto-unassigns when the new state is "Available" (G-15), but may also be triggering for other state transitions incorrectly.

## Expected Behavior

- State change with unassign unchecked: unit state updates, card assignment preserved
- State change with unassign checked: unit state updates, card assignment cleared
- Only "Available" state should force-unassign (G-15 rule)
