#1106 — Activity payload metadata: parent_activity, assigned_to, resolved_by + endpoint for assigned activities
Repo: Twill-AI/facade State: closed | Status: done Assignee: meliascosta
Created: 2026-03-06 · Updated: 2026-03-12
Description
Summary
Frontend needs activity (ticket) payloads to include embedded metadata for parent_activity_id, assigned_to_id, and resolved_by_id so the UI can display names/context without extra lookups. They also need an endpoint to fetch all activities assigned to the current user.
Background
- Current state: Activity responses (e.g.
PersistedDbActivity, list endpoints) expose only IDs:parent_activity_id,assigned_to_id,resolved_by_id. - Existing pattern: The same payloads already embed
merchant_nameandpartner_name(via joins inmaster_merchant_helper.py,merchants_router.py,master_merchant_router.py). Commissions and merchants useassigned_to_id+assigned_to_name(and sometimes email) fromDbProfilejoins. - User activities endpoint:
GET /api/v1/partner/users/{user_id}/activities(partner_users_router) returns activities where initiator_id = user (activities the user initiated), not activities assigned to the user.
Requirements
- Parent activity metadata
- Add a
parent_activity(or similar) object to activity payloads whenparent_activity_idis set. - Include enough for the UI to show quoted context without fetching by ID (e.g.
id,type,new_valuesnippet,created_at, optionallyinitiatordisplay info). - Ensure this is populated wherever activities are returned (partner merchant activities list, master merchant activities list, single-activity responses, WebSocket paylo
- Add a
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets