Skip to content

[2890 by Claude Opus 5.5] Project assignees onto the task list API and add the assignee filter - #2907

Merged
integry merged 1 commit into
2888-epic-task-assignment-1m4from
2890/claude-opus-5-5-project-assignees-onto-th-20261009-0042-9j9
Oct 9, 2026
Merged

integry merged 1 commit into
2888-epic-task-assignment-1m4from
2890/claude-opus-5-5-project-assignees-onto-th-20261009-0042-9j9

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #2890

Branch: 2890/claude-opus-5-5-project-assignees-onto-th-20261009-0042-9j9
Commits: ✅ Changes committed (bed7f76)


AI Processing Completed

Execution Details:

Summary:
GET /api/tasks now attaches assignees to every task and accepts an 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.

Detailed Logs:

  • Conversation: 179 messages
  • Session: d1aeb57b-b285-46f1-a52f-5fe386ab9145

Log files stored at:

  • conversation: /tmp/claude-logs/issue-2890-2026-10-09T00-53-17-837Z-conversation.json
  • output: /tmp/claude-logs/issue-2890-2026-10-09T00-53-17-837Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: `GET /api/tasks` now attaches assignees to every task and accepts an `assignee` filter. The filter is applied while rows are selected, so `total`, the page and `totalRuns` all count the same tasks. Th...


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!

…`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.
@propr-dev

propr-dev Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix
Triggered automatically by the requested execution settings.

@propr-dev

propr-dev Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev propr-dev Bot added the ultrafix label Oct 9, 2026
@propr-dev

propr-dev Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

⏳ Ultrafix is waiting for CI before the next /review.

These blocking checks on bed7f76 are holding the loop back:

  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished
  • Select PR check runners — not finished
  • Select PR check runners — not finished
  • Classify changed surfaces — not finished
  • Select PR check runners — not finished
  • Classify changed surfaces — not finished
  • Classify changed surfaces — not finished

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.

@propr-dev

propr-dev Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

Ready 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 — assignee=me uses the authenticated GitHub user ID and rejects unauthenticated requests.

✅ Bounded enrichment and cleanup — Assignees are loaded with one page-scoped query, and task deletion removes assignment rows within the existing transaction.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Cover successful route refresh

Add an integration test for GET /api/tasks?groupBy=task&task=...&syncAssignees=true. The new tests verify refresh through an injected helper callback and route-level rejection when task is absent, but do not exercise successful route wiring to the core service. This would strengthen coverage of the production database connection and returned refreshed assignments; it is optional because the supplied code establishes no concrete wiring defect.

S2: 🟢 Confirm automatic test discovery

The 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.

Score

The 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

  • Model: GPT-6 Astra
  • Time: 27s
  • Tokens: 62,853 (62,233 in / 620 out)
  • Cost: $0.58

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1 S2

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Oct 9, 2026
@integry
integry merged commit 9c3dc2f into 2888-epic-task-assignment-1m4 Oct 9, 2026
60 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant