Skip to content

when a project task is claimed or closed, emit a user notification so - #1020

Merged
jaylfc merged 2 commits into
devfrom
exec/tsk-latc5s
Jun 18, 2026
Merged

when a project task is claimed or closed, emit a user notification so#1020
jaylfc merged 2 commits into
devfrom
exec/tsk-latc5s

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Autonomous build of board card tsk-latc5s.

Files:
tests/test_task_lifecycle_notifications.py | 51 ++++++
tests/test_task_utils.py | 240 -----------------------------
tinyagentos/notifications.py | 2 +-
tinyagentos/routes/projects.py | 6 +
4 files changed, 58 insertions(+), 241 deletions(-)

Summary by CodeRabbit

  • New Features

    • Tasks now emit notifications when claimed and when closed, including relevant task and actor details.
    • Notifications can be muted through the app's notification settings.
  • Tests

    • Added integration tests verifying task lifecycle notification behavior and muting functionality.

jaylfc added 2 commits June 18, 2026 14:19
Add task.claimed and task.closed to NotificationStore.EVENT_TYPES.
Emit task.claimed notification after successful claim and task.closed
after successful close in projects.py routes. Both are guarded with
getattr so a missing NotificationStore never breaks the endpoint.
Mute prefs are respected via emit_event.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@jaylfc
jaylfc merged commit c3be3f4 into dev Jun 18, 2026
6 of 8 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in TinyAgentOS Roadmap Jun 18, 2026
@gitar-bot

gitar-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

Note

Your trial team has used its Gitar budget, so automatic reviews are paused. Upgrade now to unlock full capacity. Comment "Gitar review" to trigger a review manually.
Learn more about usage limits

Code Review ✅ Approved

Implements user notifications for project task claims and closures by updating the route handlers and adding lifecycle tests. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f42f2d7-4838-407d-9948-cdb3924b978f

📥 Commits

Reviewing files that changed from the base of the PR and between c19e9a4 and faadd38.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • tests/test_task_lifecycle_notifications.py
  • tinyagentos/notifications.py
  • tinyagentos/routes/projects.py

📝 Walkthrough

Walkthrough

NotificationStore.EVENT_TYPES is extended with "task.claimed" and "task.closed". The claim_task and close_task route handlers now conditionally call emit_event on request.app.state.notifications after state transitions. Three async integration tests verify emit and mute behavior.

Changes

Task Lifecycle Notifications

Layer / File(s) Summary
NotificationStore event types and route emission
tinyagentos/notifications.py, tinyagentos/routes/projects.py
EVENT_TYPES gains "task.claimed" and "task.closed"; claim_task and close_task each conditionally call notifications.emit_event with the event kind and an interpolated message when notifications is present on app state.
Integration tests for claim/close/mute notifications
tests/test_task_lifecycle_notifications.py
Three async tests verify: claim emits exactly one task.claimed notification containing task id and claimer_id; close emits exactly one task.closed notification containing task id and closed_by; muting task.claimed via set_event_muted suppresses claim notifications entirely.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop hop, a task is claimed today,
A notification hops along the way!
task.closed whispers through the store,
While muted events sleep — no more.
The rabbit checks the log with glee:
exactly one — as tests decree! 🎉

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch exec/tsk-latc5s

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jaylfc
jaylfc deleted the exec/tsk-latc5s branch June 28, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant