ligbox-ops-platform/specs/043-desk-client-activation-sync/tasks.md
Ligbox Spec Hub 3cb51e7ba7 spec 043/044: webmail gate contrato, chat bruto e sync Obsidian
Documenta liberação formal webmail (company_gate), decisões UX Painel Admin,
links Spec 044 tickets FOSS↔Desk, VM112 e chat bruto da sessão Roger.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 19:35:33 +00:00

2.4 KiB

Spec 043 — Tasks

Documentação

  • Spec índice spec.md
  • Contrato activation-field-mapping.md
  • Contrato API desk-activate-account-api.md
  • Ligações cruzadas specs 023/024/028/035
  • Registo em SPEC-REGISTRY.md
  • ROLLBACK.md com tags Git

Fase 1 — Desk preview UI

  • GET /billing/accounts/{id}/activation-preview
  • Botão Activar conta em billing-ui.js (só roles autorizados)
  • Modal confirmação com 3 colunas FOSS / OpenPanel / Odoo
  • Deploy VM122 + validação Roger (teste manual)

Fase 2 — FOSS client + order

  • foss_client.create_client() conforme mapa §4
  • foss_client.create_order() + activate hosting
  • Custom fields FOSS via config (domain, manager_*)
  • Persistir external_customer_id + external_subscription_id

Fase 3 — OpenPanel

  • Bridge directo (provision_user_safe) + metadata JSON
  • Persistir openpanel_username em company_profile_json
  • Idempotência user exists

Fase 4 — Odoo empresa

  • odoo_client.upsert_customer_partner() conforme mapa §6
  • Coluna odoo_partner_id em billing_accounts
  • Deep-link Odoo na ficha cliente

Fase 5 — Wizard mail-bundle

  • Contrato contracts/mail-bundle-api.md
  • Código mail_bundle.py + internal_provision.py (repo)
  • POST /billing/accounts/{id}/activate com provision_mail
  • Webhook POST /billing/webhook/foss/order-activated
  • wizard_client.provision_mail_bundle() → VM112
  • Deploy VM112 — 2026-07-01 · OPS_INTERNAL_TOKEN + endpoint activo

FOSS — produto ligbox-mail-business (VM123)

  • Plano hosting hp_id=2
  • Produto FOSS product_id=3 slug ligbox-mail-business
  • Script deploy/vm123-finance-stack/create-foss-mail-business.sh

Fase 6 — Testes

  • Unit: test_activation_mapper_043.py (3)
  • Unit: test_client_activation_043.py (4) — happy path, idempotência FOSS, reject active
  • E2E Roger: domínio teste wizard → activate → FOSS+OP+Odoo (dratcoin.com #2, 2026-07-01)

Fase 7 — Webmail gate (company_gate)

  • Contrato contracts/webmail-release-gate.md
  • Backend VM112 company_gate.py + API /gate/*
  • Aviso rodapé login Carbonio (sync_webmail_user_notice)
  • WebmailReleaseModal.jsx no wizard onboarding
  • UI Painel Admin: banner + card «Activar webmail» em DomainAdmin.jsx
  • Desactivar «Abrir Webmail» sidebar até webmail_released_at