ItemModal.vue is not direction-aware: outbound leads stuck on stage "new" #1

Open
opened 2026-07-13 19:07:31 -07:00 by pyr0ball · 0 comments
Owner

The feat/book-donation-chorus-search branch adds a direction field (inbound/outbound) and an OUTBOUND_STAGES set to the backend (New → Reviewed → Outreach Drafted → Outreach Sent → Replied → Pickup Scheduled → Picked Up → Logged in Bookmark), validated in backend/app/stages.py and crud.py.

frontend/src/components/ItemModal.vue was not touched by that branch. It computes stage options purely from item.type (DONATION_STAGES/OTHER_STAGES/["new"]) and has no knowledge of item.direction or OUTBOUND_STAGES, and never reads/sends direction.

For a lead_found (or magpie_lead) item, type is unset, so stagesForType() falls back to ["new"] — a triage volunteer opening an outbound lead in the app cannot advance it past new, even though the backend accepts and validates the outbound stages fine. The outbound path is only usable via direct API calls today, not through the actual triage UI.

Fix: ItemModal.vue should branch on item.direction === "outbound" (or similar) to offer OUTBOUND_STAGES instead of the type-based stage list, mirroring the backend logic in stages.py.

Found during the final whole-branch review of feat/book-donation-chorus-search (2026-07-13). Not a blocker for that branch since it is backend/bot-scoped, but should be closed before the outbound-lead feature is considered usable end to end.

The `feat/book-donation-chorus-search` branch adds a `direction` field (`inbound`/`outbound`) and an `OUTBOUND_STAGES` set to the backend (New → Reviewed → Outreach Drafted → Outreach Sent → Replied → Pickup Scheduled → Picked Up → Logged in Bookmark), validated in `backend/app/stages.py` and `crud.py`. `frontend/src/components/ItemModal.vue` was not touched by that branch. It computes stage options purely from `item.type` (`DONATION_STAGES`/`OTHER_STAGES`/`["new"]`) and has no knowledge of `item.direction` or `OUTBOUND_STAGES`, and never reads/sends `direction`. For a `lead_found` (or `magpie_lead`) item, `type` is unset, so `stagesForType()` falls back to `["new"]` — a triage volunteer opening an outbound lead in the app cannot advance it past `new`, even though the backend accepts and validates the outbound stages fine. The outbound path is only usable via direct API calls today, not through the actual triage UI. **Fix:** `ItemModal.vue` should branch on `item.direction === "outbound"` (or similar) to offer `OUTBOUND_STAGES` instead of the type-based stage list, mirroring the backend logic in `stages.py`. Found during the final whole-branch review of `feat/book-donation-chorus-search` (2026-07-13). Not a blocker for that branch since it is backend/bot-scoped, but should be closed before the outbound-lead feature is considered usable end to end.
Sign in to join this conversation.
No labels
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: books-in-hand/chorus#1
No description provided.