-
Notifications
You must be signed in to change notification settings - Fork 125
feat(project-space): link local tasks to project spaces #2409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b4e7cca
c05d806
d473dc1
90a10ab
1fb1477
eebf1d9
f07d142
baa5f06
22a6ae1
7affe2e
09db22f
21b21e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -788,6 +788,24 @@ def find_cloud_context( | |
| item = db.get(LoopItem, binding.loop_item_id) if binding.loop_item_id else None | ||
| return binding, project, item | ||
|
|
||
| def find_active_task_binding( | ||
| self, | ||
| db: Session, | ||
| user_id: int, | ||
| device_id: str, | ||
| task_id: str, | ||
| ) -> LoopItemTaskBinding | None: | ||
| return ( | ||
| db.query(LoopItemTaskBinding) | ||
| .filter( | ||
| LoopItemTaskBinding.task_user_id == user_id, | ||
| LoopItemTaskBinding.device_id == device_id, | ||
| LoopItemTaskBinding.task_id == task_id, | ||
| loop_datetime_is_unset(LoopItemTaskBinding.unlinked_at), | ||
| ) | ||
| .first() | ||
|
Comment on lines
+798
to
+806
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Do not treat a deleted TODO binding as active.
Unlink bindings for deleted items, or exclude them atomically from this lookup. Add a regression test that deletes a tracked item and starts the same runtime task again. 🤖 Prompt for AI Agents |
||
| ) | ||
|
|
||
| def unbind_cloud_context( | ||
| self, db: Session, values: LoopItemTaskBind, user_id: int | ||
| ) -> None: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: wecode-ai/Wegent
Length of output: 50372
🏁 Script executed:
Repository: wecode-ai/Wegent
Length of output: 20222
🏁 Script executed:
Repository: wecode-ai/Wegent
Length of output: 26392
Map runtime status transitions to the configured board.
Native projects validate
LoopItemCreateandLoopItemUpdatestatuses againstboard_config.statuses. A custom native board can remove or renamein_progress/in_review, sotrack_cloud_project_task()andupdate_runtime_task_tracking_status()will reject those transitions unless the runtime mapping uses the configured status IDs. Store or look up those IDs when tracking and apply the same mapping to both transitions.📍 Affects 1 file
backend/app/api/endpoints/deliveries.py#L243-L247(this comment)backend/app/api/endpoints/deliveries.py#L275-L300🤖 Prompt for AI Agents