Skip to content

feat(cli): add --assignee filter to tasks list#3972

Merged
saddlepaddle merged 3 commits into
mainfrom
align-sdk-cli-mcp-both-in-code-2026-05-01-23-27-59
May 2, 2026
Merged

feat(cli): add --assignee filter to tasks list#3972
saddlepaddle merged 3 commits into
mainfrom
align-sdk-cli-mcp-both-in-code-2026-05-01-23-27-59

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented May 2, 2026

Summary

Audited CLI / SDK / MCP-v2 alignment across all five domains (automations, tasks, workspaces, projects, hosts). Found and fixed one drift: the CLI's tasks list was missing the --assignee <userId> filter that both the SDK (assigneeId) and MCP-v2 (assigneeId) already expose. The tRPC procedure has supported it all along — the CLI was the only surface missing it.

After this change, all three surfaces expose the same task.list filter set: statusId, priority, assigneeId, assigneeMe, creatorMe, search, limit, offset.

Other findings (intentional, no fix needed)

  • workspaces.create({ agents }) in the SDK is a higher-level helper that chains workspace.create + automation.create + automation.runNow. CLI/MCP users compose those calls directly. Documented as a defensible asymmetry.
  • v2Project.create / v2Project.delete exist in tRPC as jwtProcedure (added in feat(api): v2Project.delete via JWT, create accepts client-supplied id #3913) but aren't exposed via SDK/CLI/MCP-v2. Those are reserved for cloud-first create pipelines used by desktop and the host service.

Test plan

  • superset tasks list --assignee <user-id> filters tasks to that assignee
  • --assignee-me still works as before
  • CLI typecheck + biome clean

Summary by cubic

Add --assignee <user-id> to tasks list to filter by assignee, aligning the CLI with the SDK and MCP‑v2 (assigneeId on task.list); --assignee-me is unchanged. Also fixes minor desktop lint nits (import order, quote style) with no behavior change.

Written for commit 7dd0bb1. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Added a --assignee option to the tasks list command to filter tasks by assignee user ID.
  • Tests
    • Updated a terminal-related test title for platform handling (no behavior changes).
  • Style
    • Minor import reordering in terminal lifecycle code (no runtime changes).

Brings the CLI in line with the SDK (`assigneeId`) and MCP-v2 (`assigneeId`)
which both already exposed assignee-by-user-id filtering on `task.list`.
The tRPC procedure has supported it all along — the CLI was the only
surface missing it.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6b3d6afc-34c6-4146-8a66-9227821433ca

📥 Commits

Reviewing files that changed from the base of the PR and between fb2ce67 and 7dd0bb1.

📒 Files selected for processing (2)
  • apps/desktop/src/renderer/lib/terminal/terminal-key-event-handler.test.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useTerminalLifecycle.ts
✅ Files skipped from review due to trivial changes (2)
  • apps/desktop/src/renderer/lib/terminal/terminal-key-event-handler.test.ts
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/ContentView/TabsContent/Terminal/hooks/useTerminalLifecycle.ts

📝 Walkthrough

Walkthrough

Adds a new --assignee option to the CLI tasks list command (sent to backend as assigneeId) and includes two unrelated minor edits: a test description string changed in the desktop terminal tests and a minor import reordering in a desktop terminal lifecycle hook.

Changes

CLI Assignee Filter

Layer / File(s) Summary
Option Definition
packages/cli/src/commands/tasks/list/command.ts
Adds assignee string option to the tasks list command.
API Payload Wiring
packages/cli/src/commands/tasks/list/command.ts
Forwards options.assignee as assigneeId in the ctx.api.task.list.query payload.

Terminal Test Description Update

Layer / File(s) Summary
Test Assertion/Text
apps/desktop/src/renderer/lib/terminal/terminal-key-event-handler.test.ts
Updates test case description from double quotes to single quotes for the darwin-platform test; test logic unchanged.

Import Reordering in Terminal Lifecycle Hook

Layer / File(s) Summary
Import Organization
apps/desktop/src/renderer/screens/.../useTerminalLifecycle.ts
Moves installTerminalKeyEventHandler import earlier into the main import block; no behavioral changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through options, tiny and spry,
An assignee flag launched to catch each eye.
Tests trimmed a quote, imports rearranged,
Small tidy hops — the codebase stayed unchanged. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(cli): add --assignee filter to tasks list' directly and clearly describes the main change in the PR, which is adding the --assignee option to the CLI tasks list command.
Description check ✅ Passed The PR description covers the main change (adding --assignee filter), context (alignment audit), rationale, related findings, and a test plan. All critical template sections are adequately addressed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 align-sdk-cli-mcp-both-in-code-2026-05-01-23-27-59

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
Review rate limit: 6/8 reviews remaining, refill in 8 minutes and 9 seconds.

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 2, 2026

Greptile Summary

Adds --assignee <userId> to the CLI tasks list command, closing a surface-alignment gap between the CLI and the SDK/MCP-v2 which already exposed assigneeId. The two-line change is straightforward: a new string() option is declared and forwarded as assigneeId to the existing tRPC query.

Confidence Score: 4/5

Safe to merge; the change is a minimal, additive flag with no breaking impact.

Only P2 findings — a style suggestion about documenting/guarding the overlap between --assignee and --assignee-me. No logic errors or security issues.

No files require special attention.

Important Files Changed

Filename Overview
packages/cli/src/commands/tasks/list/command.ts Adds --assignee <userId> CLI flag mapped to assigneeId on the tRPC query; change is minimal and correct, with a minor style note about undocumented overlap with --assignee-me

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["superset tasks list"] --> B{Options present?}
    B -->|"--assignee &lt;userId&gt;"| C["assigneeId = userId"]
    B -->|"--assignee-me"| D["assigneeMe = true"]
    B -->|both supplied| E["both forwarded (no guard)"]
    C --> F["tRPC task.list.query"]
    D --> F
    E --> F
    F --> G["Returns filtered task rows"]
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/cli/src/commands/tasks/list/command.ts:11-12
**Conflicting filters can be silently combined**

`--assignee <userId>` and `--assignee-me` are mutually exclusive from a user-intent perspective, but neither the CLI nor the underlying tRPC call enforces that constraint. If a user accidentally passes both, both `assigneeId` and `assigneeMe` will be forwarded to the API together. Depending on how the tRPC procedure combines those predicates (AND vs OR), it may silently return an unexpected result set instead of an error. A short guard or at least a description note (e.g. `"Filter by assignee user id (mutually exclusive with --assignee-me)"`) would make the behaviour explicit.

Reviews (1): Last reviewed commit: "feat(cli): add --assignee filter to `tas..." | Re-trigger Greptile

Comment on lines +11 to 12
assignee: string().desc("Filter by assignee user id"),
assigneeMe: boolean().alias("m").desc("Filter to my tasks"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Conflicting filters can be silently combined

--assignee <userId> and --assignee-me are mutually exclusive from a user-intent perspective, but neither the CLI nor the underlying tRPC call enforces that constraint. If a user accidentally passes both, both assigneeId and assigneeMe will be forwarded to the API together. Depending on how the tRPC procedure combines those predicates (AND vs OR), it may silently return an unexpected result set instead of an error. A short guard or at least a description note (e.g. "Filter by assignee user id (mutually exclusive with --assignee-me)") would make the behaviour explicit.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/cli/src/commands/tasks/list/command.ts
Line: 11-12

Comment:
**Conflicting filters can be silently combined**

`--assignee <userId>` and `--assignee-me` are mutually exclusive from a user-intent perspective, but neither the CLI nor the underlying tRPC call enforces that constraint. If a user accidentally passes both, both `assigneeId` and `assigneeMe` will be forwarded to the API together. Depending on how the tRPC procedure combines those predicates (AND vs OR), it may silently return an unexpected result set instead of an error. A short guard or at least a description note (e.g. `"Filter by assignee user id (mutually exclusive with --assignee-me)"`) would make the behaviour explicit.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

Town Hall added 2 commits May 1, 2026 20:16
PR #3968 (terminal key handler refactor) introduced two biome
violations on main: an import sort order and a quote-style nit. Both
auto-fixed by `biome check --write`. No behavior change.
@saddlepaddle saddlepaddle merged commit 2099318 into main May 2, 2026
15 checks passed
saddlepaddle added a commit that referenced this pull request May 2, 2026
Bundles the 5 feat(cli) commits since v0.2.2:
- automations + tasks alignment with SDK and MCP-v2 (#3966)
- cross-device login via OAuth code + PKCE (#3965)
- 'automations prompt' split into 'prompt get' / 'prompt set' (#3959)
- --name filter on automations list (#3952)
- --assignee filter on tasks list (#3972)

Push cli-v0.2.3 after this lands to fire the release pipeline.
@Kitenite Kitenite deleted the align-sdk-cli-mcp-both-in-code-2026-05-01-23-27-59 branch May 6, 2026 04:51
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