Repository navigation
[2890 by Claude Opus 5.5] Project assignees onto the task list API and add the assignee filter - #2907
Conversation
…`assignee` filter. The filter is applied while rows are selected, so `total`, the page and `totalRuns` all count the same tasks. The new test file passes 10 of 10. In a combined run of 161 tests across 13 related API and shared test files, nothing failed. Root `typecheck` and `lint`, the API package's own `tsc` and eslint, and the OpenAPI drift check all pass. I didn't run the full test suite. Nothing visual changed, so I made no previews. What the route does: - Filter values: `all`, `me`, `unassigned`, or a list of logins such as `assignee=octocat,hubot`. - Logins are matched against the cached GitHub profiles, so the list never calls GitHub. A login nobody has cached yields an empty page, not an error. - If a renamed account left an older profile with the same login, the most recently updated one wins. - `me`: it is resolved from `req.user` on the server. It answers 400 when there is no signed-in user, and a client can't pass a different user id in the query string. Bad login input also answers 400 with the shared parser's message. - `unassigned`: it is an existence check, not a NOT IN list. With `groupBy=task`, a task counts as assigned to someone when any of its runs is, and as unassigned only when none of its runs is. - Assignees on each task: every returned task has an `assignees` array, empty when nobody is assigned. They are read in one query per page. If that read fails, the list still loads with empty arrays. - `syncAssignees=true`: this is the refresh from GitHub for the next task's detail view. It only works together with `task=` (otherwise 400) and refreshes only that run. If the refresh fails, the stored set is shown. - Deleting a task now removes its `task_assignees` rows inside the existing transaction. Where I departed from the spec: - `unassigned` in the shared parser: the parser didn't support it, so I added it in `packages/shared/src/assignment.ts`. A user whose login is literally `unassigned` is written as `@unassigned`, the same way `all` and `me` already work. - No calls to the core service: I didn't use core's `loadTaskAssignees` / `taskIdsAssignedTo`, because they always use core's own database connection. Importing core at runtime from `taskHelpers.ts` would also open a global database in tests that check it doesn't. The same reads live in a new `packages/api/routes/taskAssignees.ts` and use the list's own connection. - Filter applied as a subquery: the filter is a subquery in the run query, and a computed column in the grouped selection. It never builds a list of task ids in memory. Other files I changed: - OpenAPI: I added the two new query parameters and an `AttributedUser` type, and regenerated the spec and client types. - Existing tests: - Two tests that count the queries per page now expect 7 instead of 6. - The delete test now also checks that the assignee rows are removed. - I added parser cases for `unassigned`. - Small refactors: I moved two pieces of `getTasks` into helpers so it stays under the lint complexity limit. Two things to know: - `syncAssignees` refreshes one run: it updates only the run named in `task=`, not the other runs of the same pull request or issue. - Missing profiles table: if `github_user_profiles` is missing, a login filter raises an error instead of returning an empty page. Migrated databases always have the table. The new test file isn't in any `npm` test script yet.
|
/ultrafix |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationReady to merge within the reviewed scope. The PR adds cached assignee enrichment and filtering while preserving pagination and grouped-task behavior. Review was static; no commands or tests were run. The supplied current-head status reports 33 passed checks and no blocking failures. ✅ Consistent selection and counts — Run filtering happens before counting and pagination; grouped filtering retains every run of each selected task. ✅ Server-resolved identity — ✅ Bounded enrichment and cleanup — Assignees are loaded with one page-scoped query, and task deletion removes assignment rows within the existing transaction. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Cover successful route refreshAdd an integration test for S2: 🟢 Confirm automatic test discoveryThe implementation summary notes that the new test file is not included in an npm test script. Confirm that the full-suite runner discovers it, or register it if needed. This is a maintenance follow-up rather than a demonstrated correctness blocker; the supplied current-head checks pass. ScoreThe implementation is coherent, with focused coverage of filtering, grouping, identity, fallback behavior, and deletion. No merge-blocking defect was established from the supplied code. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #2890
Branch:
2890/claude-opus-5-5-project-assignees-onto-th-20261009-0042-9j9Commits: ✅ Changes committed (bed7f76)
AI Processing Completed
Execution Details:
Summary:
GET /api/tasksnow attaches assignees to every task and accepts anassigneefilter. The filter is applied while rows are selected, sototal, the page andtotalRunsall count the same tasks. The new test file passes 10 of 10. In a combined run of 161 tests across 13 related API and shared test files, nothing failed. Roottypecheckandlint, the API package's owntscand eslint, and the OpenAPI drift check all pass. I didn't run the full test suite. Nothing visual changed, so I made no previews.What the route does:
all,me,unassigned, or a list of logins such asassignee=octocat,hubot.me: it is resolved fromreq.useron the server. It answers 400 when there is no signed-in user, and a client can't pass a different user id in the query string. Bad login input also answers 400 with the shared parser's message.unassigned: it is an existence check, not a NOT IN list. WithgroupBy=task, a task counts as assigned to someone when any of its runs is, and as unassigned only when none of its runs is.assigneesarray, empty when nobody is assigned. They are read in one query per page. If that read fails, the list still loads with empty arrays.syncAssignees=true: this is the refresh from GitHub for the next task's detail view. It only works together withtask=(otherwise 400) and refreshes only that run. If the refresh fails, the stored set is shown.task_assigneesrows inside the existing transaction.Where I departed from the spec:
unassignedin the shared parser: the parser didn't support it, so I added it inpackages/shared/src/assignment.ts. A user whose login is literallyunassignedis written as@unassigned, the same wayallandmealready work.loadTaskAssignees/taskIdsAssignedTo, because they always use core's own database connection. Importing core at runtime fromtaskHelpers.tswould also open a global database in tests that check it doesn't. The same reads live in a newpackages/api/routes/taskAssignees.tsand use the list's own connection.Other files I changed:
AttributedUsertype, and regenerated the spec and client types.unassigned.getTasksinto helpers so it stays under the lint complexity limit.Two things to know:
syncAssigneesrefreshes one run: it updates only the run named intask=, not the other runs of the same pull request or issue.github_user_profilesis missing, a login filter raises an error instead of returning an empty page. Migrated databases always have the table.The new test file isn't in any
npmtest script yet.Detailed Logs:
d1aeb57b-b285-46f1-a52f-5fe386ab9145Log files stored at:
/tmp/claude-logs/issue-2890-2026-10-09T00-53-17-837Z-conversation.json/tmp/claude-logs/issue-2890-2026-10-09T00-53-17-837Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #2890.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!