oliver-sales-ops-platform/backend/app/services
DJP 06110d6d71 fix: NV review round 1 — pipeline blockers + UX feedback + hidden bug hardening
Phase 1 (pipeline blockers):
- Stage 6 normalizer: move Claude call to BackgroundTasks (fixes 504 at proxy);
  frontend polls useStageArtifacts(6) + useClientAssets every 2s with a
  2-min soft cap and a "Normalizing… ~30s" banner.
- Stage 8 ratecard: raise ValueError when no Stage-7 matches selected so
  the user gets a clear 400 instead of silent "0 lines built" success.
- Stage 4 Q&A pack: visible amber empty-state callout when no clarifications.
- Stage 1 intake: green CTA banner after metadata lands telling the user
  to scroll down and click Complete Stage 1.
- APP_PUBLIC_URL: log a warning at startup if empty / not fully-qualified
  so approval-email links don't ship as broken relative URLs.

Phase 2 (reviewer UX):
- Remove "Operating model" select from intake form (sales lead doesn't
  know the solution yet); default model_type='current_oplus'.
- Inline-edit pencil for opportunity name in OpportunityView header.
- Stage 3 TROWLS sliders default to 0/10 (was 5/10 — anchored everyone
  to "average" and the reviewer could save without engaging).
- Trim APPROVAL_ROLES to ['commercial', 'solution'] (was 5 roles).
- Stage 6 confirm dialog only fires on re-run, not first run.
- "+ Add manually" → "+ Add deliverable manually" with helper text.
- Asset normalizer prompt + post-hoc stop-list filter excluding internal
  pitch artefacts (pitch decks, response decks, win-themes, etc.) that
  were appearing as job routes in Stage 7.

Phase 3 (hardening):
- with_for_update() row locks on stage_machine.complete_stage and
  approvals.submit_decision so double-clicks can't double-advance.
- 30s idempotency window on Stage 7 matching kick-off.

Deferred (next round): paste-link upload, single-use approval tokens,
FK indexes migration, datetime.utcnow → now(timezone.utc) sweep,
notes-owner schema change, file-extraction "unsearchable" UI badge.

Source: REVIEW-SESSIONS/Sales Op Platform Feedback NV_ 060526.xlsx
(rows R6-R48, 25+ feedback items mapped to specific stages).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 22:30:48 -04:00
..
__init__.py Port GMAL ingestion + browse endpoints from V1 2026-04-27 12:38:00 -04:00
ai_matching.py Per-stage AI cost badges + Stage 10 efficiency UI + Stage 8 fix 2026-04-27 14:38:50 -04:00
allowlist.py feat: enable SSO with email allowlist authorization 2026-04-28 19:27:39 +01:00
approval_service.py Approval workflow backend: notifications + Mailgun email 2026-04-27 13:28:22 -04:00
asset_normalizer.py fix: NV review round 1 — pipeline blockers + UX feedback + hidden bug hardening 2026-05-08 22:30:48 -04:00
capability_gap_agent.py Per-stage AI cost badges + Stage 10 efficiency UI + Stage 8 fix 2026-04-27 14:38:50 -04:00
delivery_model_agent.py Per-stage AI cost badges + Stage 10 efficiency UI + Stage 8 fix 2026-04-27 14:38:50 -04:00
diagnosis_agent.py Fix Stage 2 empty clarifications + Stage 13 missing SLAs/KPIs 2026-04-27 15:36:41 -04:00
excel_parser.py Port GMAL ingestion + browse endpoints from V1 2026-04-27 12:38:00 -04:00
implementation_plan_agent.py Stages 15 + 16: Claude Pitch Deck Agent + post-win Delivery Planning 2026-04-27 14:57:02 -04:00
intake_agent.py Per-stage AI cost badges + Stage 10 efficiency UI + Stage 8 fix 2026-04-27 14:38:50 -04:00
mailgun.py Approval workflow backend: notifications + Mailgun email 2026-04-27 13:28:22 -04:00
notification_service.py Approval workflow backend: notifications + Mailgun email 2026-04-27 13:28:22 -04:00
pitch_deck_agent.py Stages 15 + 16: Claude Pitch Deck Agent + post-win Delivery Planning 2026-04-27 14:57:02 -04:00
pitch_deck_stub.py Stage 15 stub: pitch deck markdown export 2026-04-27 14:24:30 -04:00
qa_pack.py Stage 4 + Stage 5: Q&A pack export + answer ingestion 2026-04-27 13:53:05 -04:00
ratecard_builder.py fix: NV review round 1 — pipeline blockers + UX feedback + hidden bug hardening 2026-05-08 22:30:48 -04:00
stage_machine.py fix: NV review round 1 — pipeline blockers + UX feedback + hidden bug hardening 2026-05-08 22:30:48 -04:00
support_docs_agent.py Fix Stage 2 empty clarifications + Stage 13 missing SLAs/KPIs 2026-04-27 15:36:41 -04:00
team_shape.py Stage 11: Team Shape (FTE) + 27 new tests for Stages 6/7/8 2026-04-27 14:10:48 -04:00
text_extractor.py Stage 1 part 2: file upload + Intake Agent 2026-04-27 13:02:26 -04:00