Mobile Phase 8f: Pipeline card → dc anatomy (earmark/Priority/recency, scroll pills, dots)
Bring the mobile Pipeline surface to the PipelineApp.dc.html default anatomy: - Segmented control → horizontal-scroll pills with label + count badge; the active pill tints to its own stage color via --seg-* (aliased to --chip-*, so it flips in light). - Card → earmark corner + name + Priority pill / $amount · dot · recency / labeled ‹ Prev · Next › move footer (was name + contact·org sub + bare chevrons). Compact amount. - Stage-column header → StageChip + investor count + committed sum. - Page dots → tappable, active = 22px accent bar. Backend: the opportunities list injects two derived read-only fields (mirroring the Contacts-list pattern; opp writes use a field allowlist so neither round-trips): - existing_investor (contact_grid_signals committed>0) so the card earmark agrees with the detail's "Existing LP" pill. - last_contact_date (MAX communication_date on the deal's contact, deleted_at-filtered) → card recency line + the Staleness sort (replaces the updated_at proxy). Guarded by new soft-delete assertions in test_soft_delete_reads.py. 39/39 green.
This commit is contained in:
@@ -137,6 +137,18 @@ def main():
|
||||
check(rowC is not None, "cLive present in contact list")
|
||||
if rowC:
|
||||
check(rowC.get("comm_count") == 1, f"contact comm_count: live only (cmLive -> 1; got {rowC.get('comm_count')})")
|
||||
# opportunities list: the injected last_contact_date subselect (8f) excludes soft-deleted
|
||||
# comms. opLive's contact cLive has cmLive (2026-05-01, live) + cmDead (2026-05-02, deleted);
|
||||
# the recency must be the LIVE comm's date, never the later deleted one. existing_investor
|
||||
# is a derived bool (cLive isn't grid-linked here -> False).
|
||||
_, opplist = _get(port, "/api/opportunities", token)
|
||||
rowO = next((x for x in (opplist or {}).get("data", []) if x.get("id") == "opLive"), None)
|
||||
check(rowO is not None, "opLive present in opportunities list")
|
||||
if rowO:
|
||||
check(rowO.get("last_contact_date") == "2026-05-01",
|
||||
f"opp last_contact_date: live comm only (2026-05-01, not deleted 2026-05-02; got {rowO.get('last_contact_date')})")
|
||||
check(rowO.get("existing_investor") is False,
|
||||
f"opp existing_investor present+bool (got {rowO.get('existing_investor')!r})")
|
||||
finally:
|
||||
httpd.shutdown()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user