Matrix intake: main-timeline nudge, clearer messages, note text in grid

Four bot-side UX fixes surfaced by the live smoke:
- Post a brief pointer in the main timeline (a reply to the user's message)
  alongside the in-thread proposal card, so proposals aren't missed inside a
  thread. Pointer only — approvals still happen in the thread, where the note
  is visible (you can't make an informed yes/no without seeing it).
- A bare yes/no typed in the main timeline while a proposal is pending now
  gets a "reply in the thread" redirect instead of "couldn't tell what to record."
- Clearer commit confirmations: "Created a new grid entry for X" vs
  "Logged a note on X (existing grid entry)."
- Send a blank communication subject when a note is present so the grid's
  one-line note summary shows the note text, not the "(Matrix)" label
  (provenance stays in source="matrix_intake").
This commit is contained in:
Keysat
2026-06-17 17:14:08 -05:00
parent 13326cbdc6
commit aefb2aa119
7 changed files with 115 additions and 3 deletions
+12
View File
@@ -46,6 +46,18 @@ def test_no_email_sends_empty_string_not_none():
assert out["contact"]["email"] == ""
def test_subject_blank_when_note_present_else_provenance_label():
# The CRM's grid note line uses subject-or-body, so a blank subject lets the note text show.
with_note = crm_client.build_commit_payload(
{"intent": "meeting_note", "investor_name": "Acme", "note": "sent the deck", "_match_id": "r1"})
assert with_note["subject"] == ""
assert with_note["body"] == "sent the deck"
# no note text → fall back to a provenance label so the grid line isn't empty
no_note = crm_client.build_commit_payload(
{"intent": "new_investor", "investor_name": "Beta", "contact_name": "X", "note": None})
assert no_note["subject"] == "Intake (Matrix)"
if __name__ == "__main__":
fns = [v for k, v in sorted(globals().items()) if k.startswith("test_") and callable(v)]
for fn in fns: