Human overview · for understanding

Session: Booking Card Disappears — Bug Fix

2026-06-23 · fix/booked-card-disappears-pipeline → main · v091 deployed · 2026-06-23

2026-06-23 · fix/booked-card-disappears-pipeline → main · v091 deployed

TL;DRneg_reply flag outranked appt_booked stage in deal_col()
Why it mattersdeal_col() has priority layers: negative reply check comes first, before the stage→column map. A real booking should dissolve all prior routing overrides — the booking code cleared no-show flags but forgot the negative-reply flag.
graph LR
  A[Lead objects] -->|neg_reply=True| B[Negative Replies col]
  B -->|books call| C[stage → appt_booked]
  C -->|BUG: neg_reply still set| D[deal_col = 'negative']
  D -->|card invisible in Booked| E[Operator sees card disappear]

TL;DR_booking_supersedes_prior_state() clears neg_reply before stage move
Why it mattersA booking is the strongest positive signal — it should supersede any prior objection or no-show loop. The helper mirrors the operator-side disposition (dash.api_negative: pop neg_reply + set neg_disposed). Extracted from two duplicate flag-clearing blocks, so both booking entry points are covered by one source of truth.
graph LR
  A[handle_own_booking] --> H[_booking_supersedes_prior_state]
  B[schedule_meeting] --> H
  H -->|clears neg_reply, noshow, rebook flags| C[_sync_stage appt_booked force=True]
  C --> D[deal_col = 'booked']
  D --> E[Card appears in Booked column]

TL;DRNew test file drives the REAL _sync_stage → deal_col path
Why it mattersThe existing test_booking._wire helper stubs _sync_stage, which means deal routing was never actually tested end-to-end. The new test file exercises the real path and would have caught this bug immediately. 449 tests green (+4).
graph TD
  A[test_booking._wire] -->|stubs _sync_stage| B[routing never tested]
  C[test_booking_supersedes_routing.py] -->|REAL _sync_stage + deal_col| D[routing verified]
  D --> E[neg_reply case: RED then GREEN]
  D --> F[noshow case: already GREEN]
  D --> G[rep schedule_meeting: RED then GREEN]

TL;DRv091 live, fix branch merged --no-ff to main
Why it mattersIteration-mode repo: snap_deploy.sh snapshots before deploying so rollback is instant. CHANGELOG conflict from a concurrent session's stash was resolved by keeping both entries. main is unpushed (no-push-to-main rule).
graph LR
  A[fix/booked-card-disappears-pipeline] -->|--no-ff merge| B[main 62dbb20]
  B -->|snap_deploy.sh v091| C[Modal live]
  C --> D[matyas--clientsflow-pipeline-web.modal.run]