Dashboard 'Quick Assign' is completely non-functional — wrong callback contract #102

Open
opened 2026-09-01 00:21:11 -04:00 by jared · 0 comments
Owner

Severity: High

assets/js/dashboard.js:1169-1171, quickAssign() calls lt.combobox.init(input, items, { onSelect: function(item) {...} }) — but lt.combobox.init() (assets/js/base.js:1896-1995) only destructures {max, placeholder, onChange} from opts and never reads/calls onSelect at all; it invokes onChange([...selected]) with an array of value strings instead.

Impact: _quickAssignUserId (initialized to undefined at dashboard.js:1126) is never updated no matter what the user clicks in the dropdown, so performQuickAssign() (dashboard.js:1184) always hits if (_quickAssignUserId === undefined) and shows "Please select a user from the list" — forever, regardless of selection.

Repro: Click any per-ticket "Quick Assign" action on the dashboard, pick any user from the search dropdown, click ASSIGN → warning toast, no assignment happens.

Contrast with the separately-implemented Bulk Assign modal (dashboard.js:648-656), which correctly uses lt.typeahead.init(...) (which DOES support onSelect) and works fine.

Fix: Change quickAssign() to use lt.typeahead.init (matching Bulk Assign), or add onSelect support to lt.combobox.init, or switch the callback to onChange and read selected[0] from the array it receives.

**Severity:** High `assets/js/dashboard.js:1169-1171`, `quickAssign()` calls `lt.combobox.init(input, items, { onSelect: function(item) {...} })` — but `lt.combobox.init()` (`assets/js/base.js:1896-1995`) only destructures `{max, placeholder, onChange}` from `opts` and never reads/calls `onSelect` at all; it invokes `onChange([...selected])` with an array of value strings instead. **Impact:** `_quickAssignUserId` (initialized to `undefined` at `dashboard.js:1126`) is never updated no matter what the user clicks in the dropdown, so `performQuickAssign()` (`dashboard.js:1184`) always hits `if (_quickAssignUserId === undefined)` and shows "Please select a user from the list" — forever, regardless of selection. **Repro:** Click any per-ticket "Quick Assign" action on the dashboard, pick any user from the search dropdown, click ASSIGN → warning toast, no assignment happens. Contrast with the separately-implemented Bulk Assign modal (`dashboard.js:648-656`), which correctly uses `lt.typeahead.init(...)` (which DOES support `onSelect`) and works fine. **Fix:** Change `quickAssign()` to use `lt.typeahead.init` (matching Bulk Assign), or add `onSelect` support to `lt.combobox.init`, or switch the callback to `onChange` and read `selected[0]` from the array it receives.
jared added the priority/highux labels 2026-09-08 10:15:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/tinker_tickets#102