docs(tasks): nullable title + email_subject on task runs; trigger_run_id on emails + chat runs
What
Amends the TaskRunResponse schema in api-reference/openapi/releases.json with a new nullable title field: the originating scheduled task's title, when resolvable. Purely additive (+5 lines, JSON parse re-validated, all pre-existing bytes untouched).
Why
GET /api/tasks/runs proxies Trigger.dev runs, which only carry taskIdentifier — and every scheduled prompt shares customer-prompt-task, so the chat homepage renders five identical "Scheduled Task" rows (recoupable/chat#1850, video-parity item 1). The api resolves each list-mode run's title by joining Trigger's filter[schedule] runs against the account's scheduled_actions (title + trigger_schedule_id). title is null when a run cannot be mapped to a scheduled task (e.g. non-scheduled runs), and is not present in retrieve mode (runId provided) — mirroring the schema's existing mode-scoped field notes.
Links
- Tracking: recoupable/chat#1850 (Open — video/experience parity, item 1)
- Siblings: api implementation PR + chat render PR (linked from the tracking issue)
- Merge order: docs (this) → api → chat. Contract-first; the field is additive so docs landing first documents a field the api serves shortly after.
🤖 Generated with Claude Code
Summary by CodeRabbit
- New Features
- Task run responses now include optional
titleandemail_subjectfields when available, helping identify the originating scheduled task and latest linked email. - These fields may be returned as
nullwhen information is unavailable. - Email and chat requests can now include the originating scheduled task run ID for improved traceability.
- Task run responses now include optional
Summary by cubic
Adds nullable title and email_subject to TaskRunResponse (list mode only) so GET /api/tasks/runs can name runs by the originating scheduled task or, when linked, the most recent email’s subject; both may be null and are omitted in retrieve mode. Introduces optional trigger_run_id in SendEmailRequest and ChatGenerateRequest to link emails to runs; omitting it leaves behavior unchanged.