Skip to content

feat(alerts): embed task snapshot in reminder alert metadata#57

Merged
madtank merged 1 commit intomainfrom
orion/task-snapshot-to-main
Apr 16, 2026
Merged

feat(alerts): embed task snapshot in reminder alert metadata#57
madtank merged 1 commit intomainfrom
orion/task-snapshot-to-main

Conversation

@madtank
Copy link
Copy Markdown
Member

@madtank madtank commented Apr 16, 2026

Re-land PR #54 directly onto main (PR #56 was DIRTY because its base branch feat/alerts-cli-mvp still had pre-squash history).

Cherry-picked commit 560b5bb. Same 215+/24- diff. 21 tests pass.

Task: e55be7c8

Task e55be7c8: task reminder alert cards today truncate and surface raw
implementation fields, with no Open Task action even though the payload
includes source_task_id. This commit does the CLI-side half — enrich the
reminder envelope with a compact task snapshot (id, title, priority,
status, assignee_id, assignee_name, creator_id, deadline) so the frontend
can render task context inline without a second round-trip.

Changes
- alerts.py: extract _agent_name_for + _fetch_task_snapshot helpers
  (shared by _resolve_target_from_task).
- alerts.py: _build_alert_metadata grows a task_snapshot kwarg; when
  present, embeds at alert.task and card_payload.task.
- reminders.py: _fire_policy fetches the snapshot once per fire and passes
  it to _build_alert_metadata.
- tests: positive case (snapshot embedded with all fields) + negative case
  (fetch failure still fires reminder with source_task_id fallback).

Frontend half (task e55be7c8 assignee frontend_sentinel) renders the task
block on the alert card + wires an Open Task button to resource_uri
ui://tasks/{source_task_id}. The MCP widget ui://tasks/detail already
exists; the button is a simple MCP app link.

Validation
- PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest tests/test_alerts_commands.py tests/test_reminders_commands.py
- Result: 21 passed (19 existing + 2 new)

Task: e55be7c8-4758-434c-bea9-1a35b27a769a

Co-authored-by: anvil <anvil@ax-platform.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@madtank madtank merged commit 834fc4f into main Apr 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant