Tracker → Desk Review Prep queue — 2026-07-28

Stephaney can now queue Regional Overdue Permits Tracker rows for PPDR intake directly from the spreadsheet view.

Flow: check rows in the new DESK REVIEW column → floating “Send N to Desk Review Prep” bar → rows land in ppdr_staging (source tracker:{username}, batch TRK-<timestamp>) → Desk Review Prep lists them → each deep-links into the pre-filled intake wizard (unchanged). She still walks the full intake: permit upload, parse, photos, pier logs — direct project creation was explicitly rejected (Dustin, 2026-07-28).

Endpoints (routes/tracker.py, cookie/API-key auth):

  • GET /tracker/desk-review-queue — tracker_permit_id → {staging_id, status, unqueueable} for staged/on_hold/converted rows
  • POST /tracker/stage-desk-review — batch insert, per-row dup-skip + errors
  • POST /tracker/unstage-desk-review — uncheck path; tracker-sourced staged rows only → status ‘removed’ (re-queueable)

Design decisions: batch button over instant checkbox; stateful chips (Queued / Hold / ✓ converted) refreshed with the 2-minute data poll; NO eligibility guards at check time; Dustin’s hand-curated staging batches show Queued but cannot be unchecked from the tracker. Tracker-staged rows inherit the intake approval-queue bypass (same as pre-vetted batches) — flagged to Dustin as the one open policy question.

Commits: entirely-api 2705571, entirely-portal a98acea.

Update 2026-08-24 — scheduler un-queue

Schedulers (branch backlog custodians, 2026-08-18 ruling) can now UN-queue tracker-sourced staged rows from their own branch: the “Queued” chip is clickable for them in the tracker spreadsheet view. They still cannot queue (checkbox stays edit-roles-only) or edit tracker records.

  • Backend: unstage-desk-review accepts the scheduler role, branch-scoped via _visible_zones; same tracker-source + ‘staged’-only constraints. GET /tracker/can-edit now returns can_unqueue alongside allowed. 409 details use outward-safe “Post-Production Prep” for JES-visible roles.
  • Frontend: CAN_UNQUEUE gates the chip separately from CAN_EDIT; confirm/toast strings use DR_LABEL (outward-language rule 2026-08-11).

Commits: mostly-api 80bf4a7, portal-v2 225f331.

  • 2026-08-24 follow-up: scheduler unqueues now notify all active triage users (notify_role, links to /desk-review-prep) — mostly-api 8d44655. Edit-role unqueues stay silent.